diff --git a/lib/admin/admin_request_builder.rb b/lib/admin/admin_request_builder.rb index 96ca3d7537..823f6d1aac 100644 --- a/lib/admin/admin_request_builder.rb +++ b/lib/admin/admin_request_builder.rb @@ -4,6 +4,9 @@ require_relative '../models/o_data_errors_o_data_error' require_relative './admin' require_relative './edge/edge_request_builder' +require_relative './microsoft365_apps/microsoft365_apps_request_builder' +require_relative './people/people_request_builder' +require_relative './report_settings/report_settings_request_builder' require_relative './service_announcement/service_announcement_request_builder' require_relative './sharepoint/sharepoint_request_builder' @@ -19,6 +22,21 @@ def edge() return MicrosoftGraph::Admin::Edge::EdgeRequestBuilder.new(@path_parameters, @request_adapter) end ## + # Provides operations to manage the microsoft365Apps property of the microsoft.graph.admin entity. + def microsoft365_apps() + return MicrosoftGraph::Admin::Microsoft365Apps::Microsoft365AppsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the people property of the microsoft.graph.admin entity. + def people() + return MicrosoftGraph::Admin::People::PeopleRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the reportSettings property of the microsoft.graph.admin entity. + def report_settings() + return MicrosoftGraph::Admin::ReportSettings::ReportSettingsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## # Provides operations to manage the serviceAnnouncement property of the microsoft.graph.admin entity. def service_announcement() return MicrosoftGraph::Admin::ServiceAnnouncement::ServiceAnnouncementRequestBuilder.new(@path_parameters, @request_adapter) @@ -35,7 +53,7 @@ def sharepoint() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/admin{?%24expand,%24select}") end ## ## Get admin @@ -47,8 +65,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Admin.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +80,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Admin.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,15 +90,15 @@ def patch(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,17 +110,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a admin_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AdminRequestBuilder.new(raw_url, @request_adapter) + end ## # Get admin diff --git a/lib/admin/edge/edge_request_builder.rb b/lib/admin/edge/edge_request_builder.rb index 10ea2df2fe..9d2708779e 100644 --- a/lib/admin/edge/edge_request_builder.rb +++ b/lib/admin/edge/edge_request_builder.rb @@ -25,7 +25,7 @@ def internet_explorer_mode() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/edge{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/admin/edge{?%24expand,%24select}") end ## ## Delete navigation property edge for admin @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Edge.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Edge.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a edge_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return EdgeRequestBuilder.new(raw_url, @request_adapter) + end ## # A container for Microsoft Edge resources. Read-only. diff --git a/lib/admin/edge/internet_explorer_mode/internet_explorer_mode_request_builder.rb b/lib/admin/edge/internet_explorer_mode/internet_explorer_mode_request_builder.rb index 59b3072570..60a22fad28 100644 --- a/lib/admin/edge/internet_explorer_mode/internet_explorer_mode_request_builder.rb +++ b/lib/admin/edge/internet_explorer_mode/internet_explorer_mode_request_builder.rb @@ -27,7 +27,7 @@ def site_lists() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/edge/internetExplorerMode{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/admin/edge/internetExplorerMode{?%24expand,%24select}") end ## ## Delete navigation property internetExplorerMode for admin @@ -39,8 +39,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -53,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::InternetExplorerMode.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -69,8 +67,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::InternetExplorerMode.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -80,13 +77,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -96,15 +94,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -116,17 +114,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a internet_explorer_mode_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return InternetExplorerModeRequestBuilder.new(raw_url, @request_adapter) + end ## # A container for Internet Explorer mode resources. diff --git a/lib/admin/edge/internet_explorer_mode/site_lists/count/count_request_builder.rb b/lib/admin/edge/internet_explorer_mode/site_lists/count/count_request_builder.rb index c107b384a6..557042df6a 100644 --- a/lib/admin/edge/internet_explorer_mode/site_lists/count/count_request_builder.rb +++ b/lib/admin/edge/internet_explorer_mode/site_lists/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/edge/internetExplorerMode/siteLists/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/admin/edge/internetExplorerMode/siteLists/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/admin/edge/internet_explorer_mode/site_lists/item/browser_site_list_item_request_builder.rb b/lib/admin/edge/internet_explorer_mode/site_lists/item/browser_site_list_item_request_builder.rb index 2952ccdbce..197b0f7c66 100644 --- a/lib/admin/edge/internet_explorer_mode/site_lists/item/browser_site_list_item_request_builder.rb +++ b/lib/admin/edge/internet_explorer_mode/site_lists/item/browser_site_list_item_request_builder.rb @@ -43,7 +43,7 @@ def sites() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/edge/internetExplorerMode/siteLists/{browserSiteList%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/admin/edge/internetExplorerMode/siteLists/{browserSiteList%2Did}{?%24expand,%24select}") end ## ## Delete a browserSiteList object. @@ -55,8 +55,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -69,8 +68,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::BrowserSiteList.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -85,8 +83,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::BrowserSiteList.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -96,13 +93,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,15 +110,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -132,17 +130,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a browser_site_list_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BrowserSiteListItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Get a browserSiteList that contains browserSite and browserSharedCookie resources. diff --git a/lib/admin/edge/internet_explorer_mode/site_lists/item/publish/publish_post_request_body.rb b/lib/admin/edge/internet_explorer_mode/site_lists/item/publish/publish_post_request_body.rb index 9049d8e869..bb9c975e18 100644 --- a/lib/admin/edge/internet_explorer_mode/site_lists/item/publish/publish_post_request_body.rb +++ b/lib/admin/edge/internet_explorer_mode/site_lists/item/publish/publish_post_request_body.rb @@ -31,22 +31,22 @@ class PublishPostRequestBody # The sites property @sites ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new publishPostRequestBody and sets the default values. + ## Instantiates a new PublishPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/admin/edge/internet_explorer_mode/site_lists/item/publish/publish_request_builder.rb b/lib/admin/edge/internet_explorer_mode/site_lists/item/publish/publish_request_builder.rb index 8b3351a9ef..20b0b67774 100644 --- a/lib/admin/edge/internet_explorer_mode/site_lists/item/publish/publish_request_builder.rb +++ b/lib/admin/edge/internet_explorer_mode/site_lists/item/publish/publish_request_builder.rb @@ -41,8 +41,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::BrowserSiteList.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -54,17 +53,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a publish_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return PublishRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/admin/edge/internet_explorer_mode/site_lists/item/shared_cookies/count/count_request_builder.rb b/lib/admin/edge/internet_explorer_mode/site_lists/item/shared_cookies/count/count_request_builder.rb index d555bf6459..96e38c41f7 100644 --- a/lib/admin/edge/internet_explorer_mode/site_lists/item/shared_cookies/count/count_request_builder.rb +++ b/lib/admin/edge/internet_explorer_mode/site_lists/item/shared_cookies/count/count_request_builder.rb @@ -28,7 +28,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/edge/internetExplorerMode/siteLists/{browserSiteList%2Did}/sharedCookies/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/admin/edge/internetExplorerMode/siteLists/{browserSiteList%2Did}/sharedCookies/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -40,8 +40,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -51,17 +50,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/admin/edge/internet_explorer_mode/site_lists/item/shared_cookies/item/browser_shared_cookie_item_request_builder.rb b/lib/admin/edge/internet_explorer_mode/site_lists/item/shared_cookies/item/browser_shared_cookie_item_request_builder.rb index 85c9ffa047..4487ecfcd4 100644 --- a/lib/admin/edge/internet_explorer_mode/site_lists/item/shared_cookies/item/browser_shared_cookie_item_request_builder.rb +++ b/lib/admin/edge/internet_explorer_mode/site_lists/item/shared_cookies/item/browser_shared_cookie_item_request_builder.rb @@ -29,7 +29,7 @@ class BrowserSharedCookieItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRe ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/edge/internetExplorerMode/siteLists/{browserSiteList%2Did}/sharedCookies/{browserSharedCookie%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/admin/edge/internetExplorerMode/siteLists/{browserSiteList%2Did}/sharedCookies/{browserSharedCookie%2Did}{?%24expand,%24select}") end ## ## Delete a browserSharedCookie from a browserSiteList. @@ -41,8 +41,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -55,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::BrowserSharedCookie.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -71,8 +69,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::BrowserSharedCookie.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -82,13 +79,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -98,15 +96,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -118,17 +116,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a browser_shared_cookie_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BrowserSharedCookieItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Get a session cookie that can be shared between a Microsoft Edge process and an Internet Explorer process, while using Internet Explorer mode. diff --git a/lib/admin/edge/internet_explorer_mode/site_lists/item/shared_cookies/shared_cookies_request_builder.rb b/lib/admin/edge/internet_explorer_mode/site_lists/item/shared_cookies/shared_cookies_request_builder.rb index a751d27c45..1e72621862 100644 --- a/lib/admin/edge/internet_explorer_mode/site_lists/item/shared_cookies/shared_cookies_request_builder.rb +++ b/lib/admin/edge/internet_explorer_mode/site_lists/item/shared_cookies/shared_cookies_request_builder.rb @@ -46,7 +46,7 @@ def by_browser_shared_cookie_id(browser_shared_cookie_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/edge/internetExplorerMode/siteLists/{browserSiteList%2Did}/sharedCookies{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/admin/edge/internetExplorerMode/siteLists/{browserSiteList%2Did}/sharedCookies{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get a list of the browserSharedCookie objects and their properties. @@ -58,8 +58,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::BrowserSharedCookieCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,8 +73,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::BrowserSharedCookie.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -85,15 +83,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -105,17 +103,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a shared_cookies_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SharedCookiesRequestBuilder.new(raw_url, @request_adapter) + end ## # Get a list of the browserSharedCookie objects and their properties. diff --git a/lib/admin/edge/internet_explorer_mode/site_lists/item/sites/count/count_request_builder.rb b/lib/admin/edge/internet_explorer_mode/site_lists/item/sites/count/count_request_builder.rb index 7133e5c60c..ae8cc13fd1 100644 --- a/lib/admin/edge/internet_explorer_mode/site_lists/item/sites/count/count_request_builder.rb +++ b/lib/admin/edge/internet_explorer_mode/site_lists/item/sites/count/count_request_builder.rb @@ -28,7 +28,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/edge/internetExplorerMode/siteLists/{browserSiteList%2Did}/sites/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/admin/edge/internetExplorerMode/siteLists/{browserSiteList%2Did}/sites/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -40,8 +40,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -51,17 +50,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/admin/edge/internet_explorer_mode/site_lists/item/sites/item/browser_site_item_request_builder.rb b/lib/admin/edge/internet_explorer_mode/site_lists/item/sites/item/browser_site_item_request_builder.rb index e2a500ce9f..fb44874dad 100644 --- a/lib/admin/edge/internet_explorer_mode/site_lists/item/sites/item/browser_site_item_request_builder.rb +++ b/lib/admin/edge/internet_explorer_mode/site_lists/item/sites/item/browser_site_item_request_builder.rb @@ -29,7 +29,7 @@ class BrowserSiteItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBui ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/edge/internetExplorerMode/siteLists/{browserSiteList%2Did}/sites/{browserSite%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/admin/edge/internetExplorerMode/siteLists/{browserSiteList%2Did}/sites/{browserSite%2Did}{?%24expand,%24select}") end ## ## Delete a browserSite from a browserSiteList. @@ -41,8 +41,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -55,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::BrowserSite.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -71,8 +69,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::BrowserSite.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -82,13 +79,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -98,15 +96,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -118,17 +116,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a browser_site_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BrowserSiteItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Get a browserSite that resides on a browserSiteList. diff --git a/lib/admin/edge/internet_explorer_mode/site_lists/item/sites/sites_request_builder.rb b/lib/admin/edge/internet_explorer_mode/site_lists/item/sites/sites_request_builder.rb index 8d4d525010..82f7e32190 100644 --- a/lib/admin/edge/internet_explorer_mode/site_lists/item/sites/sites_request_builder.rb +++ b/lib/admin/edge/internet_explorer_mode/site_lists/item/sites/sites_request_builder.rb @@ -46,7 +46,7 @@ def by_browser_site_id(browser_site_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/edge/internetExplorerMode/siteLists/{browserSiteList%2Did}/sites{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/admin/edge/internetExplorerMode/siteLists/{browserSiteList%2Did}/sites{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get a list of the browserSite objects and their properties. @@ -58,8 +58,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::BrowserSiteCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,8 +73,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::BrowserSite.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -85,15 +83,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -105,17 +103,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a sites_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SitesRequestBuilder.new(raw_url, @request_adapter) + end ## # Get a list of the browserSite objects and their properties. diff --git a/lib/admin/edge/internet_explorer_mode/site_lists/site_lists_request_builder.rb b/lib/admin/edge/internet_explorer_mode/site_lists/site_lists_request_builder.rb index dcff595295..f8ec51e3d1 100644 --- a/lib/admin/edge/internet_explorer_mode/site_lists/site_lists_request_builder.rb +++ b/lib/admin/edge/internet_explorer_mode/site_lists/site_lists_request_builder.rb @@ -42,7 +42,7 @@ def by_browser_site_list_id(browser_site_list_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/edge/internetExplorerMode/siteLists{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/admin/edge/internetExplorerMode/siteLists{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get a list of the browserSiteList objects and their properties. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::BrowserSiteListCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::BrowserSiteList.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a site_lists_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SiteListsRequestBuilder.new(raw_url, @request_adapter) + end ## # Get a list of the browserSiteList objects and their properties. diff --git a/lib/chats/item/permission_grants/item/restore/restore.rb b/lib/admin/microsoft365_apps/installation_options/installation_options.rb similarity index 100% rename from lib/chats/item/permission_grants/item/restore/restore.rb rename to lib/admin/microsoft365_apps/installation_options/installation_options.rb diff --git a/lib/admin/microsoft365_apps/installation_options/installation_options_request_builder.rb b/lib/admin/microsoft365_apps/installation_options/installation_options_request_builder.rb new file mode 100644 index 0000000000..c4cb9b98b6 --- /dev/null +++ b/lib/admin/microsoft365_apps/installation_options/installation_options_request_builder.rb @@ -0,0 +1,163 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/m365_apps_installation_options' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../admin' +require_relative '../microsoft365_apps' +require_relative './installation_options' + +module MicrosoftGraph + module Admin + module Microsoft365Apps + module InstallationOptions + ## + # Provides operations to manage the installationOptions property of the microsoft.graph.adminMicrosoft365Apps entity. + class InstallationOptionsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new InstallationOptionsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/admin/microsoft365Apps/installationOptions{?%24expand,%24select}") + end + ## + ## Delete navigation property installationOptions for admin + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Read the properties and relationships of an m365AppsInstallationOptions object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of m365_apps_installation_options + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::M365AppsInstallationOptions.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the properties of an m365AppsInstallationOptions object. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of m365_apps_installation_options + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::M365AppsInstallationOptions.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property installationOptions for admin + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Read the properties and relationships of an m365AppsInstallationOptions object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the properties of an m365AppsInstallationOptions object. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a installation_options_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return InstallationOptionsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Read the properties and relationships of an m365AppsInstallationOptions object. + class InstallationOptionsRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/graph_mobile_lob_app/count/count.rb b/lib/admin/microsoft365_apps/microsoft365_apps.rb similarity index 100% rename from lib/device_app_management/mobile_apps/graph_mobile_lob_app/count/count.rb rename to lib/admin/microsoft365_apps/microsoft365_apps.rb diff --git a/lib/admin/microsoft365_apps/microsoft365_apps_request_builder.rb b/lib/admin/microsoft365_apps/microsoft365_apps_request_builder.rb new file mode 100644 index 0000000000..244876243c --- /dev/null +++ b/lib/admin/microsoft365_apps/microsoft365_apps_request_builder.rb @@ -0,0 +1,166 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/admin_microsoft365_apps' +require_relative '../../models/o_data_errors_o_data_error' +require_relative '../admin' +require_relative './installation_options/installation_options_request_builder' +require_relative './microsoft365_apps' + +module MicrosoftGraph + module Admin + module Microsoft365Apps + ## + # Provides operations to manage the microsoft365Apps property of the microsoft.graph.admin entity. + class Microsoft365AppsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the installationOptions property of the microsoft.graph.adminMicrosoft365Apps entity. + def installation_options() + return MicrosoftGraph::Admin::Microsoft365Apps::InstallationOptions::InstallationOptionsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new Microsoft365AppsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/admin/microsoft365Apps{?%24expand,%24select}") + end + ## + ## Delete navigation property microsoft365Apps for admin + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## A container for the Microsoft 365 apps admin functionality. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of admin_microsoft365_apps + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AdminMicrosoft365Apps.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property microsoft365Apps in admin + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of admin_microsoft365_apps + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AdminMicrosoft365Apps.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property microsoft365Apps for admin + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## A container for the Microsoft 365 apps admin functionality. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property microsoft365Apps in admin + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a microsoft365_apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return Microsoft365AppsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # A container for the Microsoft 365 apps admin functionality. + class Microsoft365AppsRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/graph_mobile_lob_app/graph_mobile_lob_app.rb b/lib/admin/people/item_insights/item_insights.rb similarity index 100% rename from lib/device_app_management/mobile_apps/graph_mobile_lob_app/graph_mobile_lob_app.rb rename to lib/admin/people/item_insights/item_insights.rb diff --git a/lib/admin/people/item_insights/item_insights_request_builder.rb b/lib/admin/people/item_insights/item_insights_request_builder.rb new file mode 100644 index 0000000000..4aeed83cec --- /dev/null +++ b/lib/admin/people/item_insights/item_insights_request_builder.rb @@ -0,0 +1,163 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/insights_settings' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../admin' +require_relative '../people' +require_relative './item_insights' + +module MicrosoftGraph + module Admin + module People + module ItemInsights + ## + # Provides operations to manage the itemInsights property of the microsoft.graph.peopleAdminSettings entity. + class ItemInsightsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new ItemInsightsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/admin/people/itemInsights{?%24expand,%24select}") + end + ## + ## Delete navigation property itemInsights for admin + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Get the properties of an insightsSettings object to display or return item insights in an organization. To learn how to customize the privacy of item insights in an organization, see Customize item insights privacy in Microsoft Graph. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of insights_settings + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::InsightsSettings.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update privacy settings to display or return the specified type of insights in an organization. Currently, itemInsights is the only supported type of settings. To learn more about customizing insights privacy for your organization, see Customize item insights privacy in Microsoft Graph. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of insights_settings + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::InsightsSettings.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property itemInsights for admin + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Get the properties of an insightsSettings object to display or return item insights in an organization. To learn how to customize the privacy of item insights in an organization, see Customize item insights privacy in Microsoft Graph. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update privacy settings to display or return the specified type of insights in an organization. Currently, itemInsights is the only supported type of settings. To learn more about customizing insights privacy for your organization, see Customize item insights privacy in Microsoft Graph. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a item_insights_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ItemInsightsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the properties of an insightsSettings object to display or return item insights in an organization. To learn how to customize the privacy of item insights in an organization, see Customize item insights privacy in Microsoft Graph. + class ItemInsightsRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/graph_mobile_lob_app/graph_mobile_lob_app.rb b/lib/admin/people/people.rb similarity index 100% rename from lib/device_app_management/mobile_apps/item/graph_mobile_lob_app/graph_mobile_lob_app.rb rename to lib/admin/people/people.rb diff --git a/lib/admin/people/people_request_builder.rb b/lib/admin/people/people_request_builder.rb new file mode 100644 index 0000000000..1e5d7f38c7 --- /dev/null +++ b/lib/admin/people/people_request_builder.rb @@ -0,0 +1,113 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/o_data_errors_o_data_error' +require_relative '../../models/people_admin_settings' +require_relative '../admin' +require_relative './item_insights/item_insights_request_builder' +require_relative './people' +require_relative './profile_card_properties/profile_card_properties_request_builder' +require_relative './pronouns/pronouns_request_builder' + +module MicrosoftGraph + module Admin + module People + ## + # Provides operations to manage the people property of the microsoft.graph.admin entity. + class PeopleRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the itemInsights property of the microsoft.graph.peopleAdminSettings entity. + def item_insights() + return MicrosoftGraph::Admin::People::ItemInsights::ItemInsightsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the profileCardProperties property of the microsoft.graph.peopleAdminSettings entity. + def profile_card_properties() + return MicrosoftGraph::Admin::People::ProfileCardProperties::ProfileCardPropertiesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the pronouns property of the microsoft.graph.peopleAdminSettings entity. + def pronouns() + return MicrosoftGraph::Admin::People::Pronouns::PronounsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new PeopleRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/admin/people{?%24expand,%24select}") + end + ## + ## Retrieve the properties and relationships of a peopleAdminSettings object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of people_admin_settings + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::PeopleAdminSettings.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Retrieve the properties and relationships of a peopleAdminSettings object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a people_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return PeopleRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Retrieve the properties and relationships of a peopleAdminSettings object. + class PeopleRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar/calendar_view/count/count.rb b/lib/admin/people/profile_card_properties/count/count.rb similarity index 100% rename from lib/groups/item/calendar/calendar_view/count/count.rb rename to lib/admin/people/profile_card_properties/count/count.rb diff --git a/lib/admin/people/profile_card_properties/count/count_request_builder.rb b/lib/admin/people/profile_card_properties/count/count_request_builder.rb new file mode 100644 index 0000000000..9bcdb93856 --- /dev/null +++ b/lib/admin/people/profile_card_properties/count/count_request_builder.rb @@ -0,0 +1,100 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../admin' +require_relative '../../people' +require_relative '../profile_card_properties' +require_relative './count' + +module MicrosoftGraph + module Admin + module People + module ProfileCardProperties + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/admin/people/profileCardProperties/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar/calendar_view/item/attachments/item/item.rb b/lib/admin/people/profile_card_properties/item/item.rb similarity index 100% rename from lib/groups/item/calendar/calendar_view/item/attachments/item/item.rb rename to lib/admin/people/profile_card_properties/item/item.rb diff --git a/lib/admin/people/profile_card_properties/item/profile_card_property_item_request_builder.rb b/lib/admin/people/profile_card_properties/item/profile_card_property_item_request_builder.rb new file mode 100644 index 0000000000..4649e93e69 --- /dev/null +++ b/lib/admin/people/profile_card_properties/item/profile_card_property_item_request_builder.rb @@ -0,0 +1,166 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../../models/profile_card_property' +require_relative '../../../admin' +require_relative '../../people' +require_relative '../profile_card_properties' +require_relative './item' + +module MicrosoftGraph + module Admin + module People + module ProfileCardProperties + module Item + ## + # Provides operations to manage the profileCardProperties property of the microsoft.graph.peopleAdminSettings entity. + class ProfileCardPropertyItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new ProfileCardPropertyItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/admin/people/profileCardProperties/{profileCardProperty%2Did}{?%24expand,%24select}") + end + ## + ## Delete the profileCardProperty object specified by its directoryPropertyName from the organization's profile card, and remove any localized customizations for that property. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Retrieve the properties of a profileCardProperty entity. The profileCardProperty is identified by its directoryPropertyName property. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of profile_card_property + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ProfileCardProperty.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the properties of a profileCardProperty object, identified by its directoryPropertyName property. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of profile_card_property + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ProfileCardProperty.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete the profileCardProperty object specified by its directoryPropertyName from the organization's profile card, and remove any localized customizations for that property. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Retrieve the properties of a profileCardProperty entity. The profileCardProperty is identified by its directoryPropertyName property. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the properties of a profileCardProperty object, identified by its directoryPropertyName property. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a profile_card_property_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ProfileCardPropertyItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Retrieve the properties of a profileCardProperty entity. The profileCardProperty is identified by its directoryPropertyName property. + class ProfileCardPropertyItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar/calendar_view/item/attachments/attachments.rb b/lib/admin/people/profile_card_properties/profile_card_properties.rb similarity index 100% rename from lib/groups/item/calendar/calendar_view/item/attachments/attachments.rb rename to lib/admin/people/profile_card_properties/profile_card_properties.rb diff --git a/lib/admin/people/profile_card_properties/profile_card_properties_request_builder.rb b/lib/admin/people/profile_card_properties/profile_card_properties_request_builder.rb new file mode 100644 index 0000000000..35d7eb5d8b --- /dev/null +++ b/lib/admin/people/profile_card_properties/profile_card_properties_request_builder.rb @@ -0,0 +1,182 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../../models/profile_card_property' +require_relative '../../../models/profile_card_property_collection_response' +require_relative '../../admin' +require_relative '../people' +require_relative './count/count_request_builder' +require_relative './item/profile_card_property_item_request_builder' +require_relative './profile_card_properties' + +module MicrosoftGraph + module Admin + module People + module ProfileCardProperties + ## + # Provides operations to manage the profileCardProperties property of the microsoft.graph.peopleAdminSettings entity. + class ProfileCardPropertiesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::Admin::People::ProfileCardProperties::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the profileCardProperties property of the microsoft.graph.peopleAdminSettings entity. + ## @param profile_card_property_id The unique identifier of profileCardProperty + ## @return a profile_card_property_item_request_builder + ## + def by_profile_card_property_id(profile_card_property_id) + raise StandardError, 'profile_card_property_id cannot be null' if profile_card_property_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["profileCardProperty%2Did"] = profile_card_property_id + return MicrosoftGraph::Admin::People::ProfileCardProperties::Item::ProfileCardPropertyItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new ProfileCardPropertiesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/admin/people/profileCardProperties{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Get a collection of profileCardProperty resources for an organization. Each resource is identified by its directoryPropertyName property. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of profile_card_property_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ProfileCardPropertyCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create a new profileCardProperty for an organization. The new property is identified by its directoryPropertyName property. For more information about how to add properties to the profile card for an organization, see Add or remove custom attributes on a profile card using the profile card API. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of profile_card_property + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ProfileCardProperty.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get a collection of profileCardProperty resources for an organization. Each resource is identified by its directoryPropertyName property. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create a new profileCardProperty for an organization. The new property is identified by its directoryPropertyName property. For more information about how to add properties to the profile card for an organization, see Add or remove custom attributes on a profile card using the profile card API. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a profile_card_properties_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ProfileCardPropertiesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get a collection of profileCardProperty resources for an organization. Each resource is identified by its directoryPropertyName property. + class ProfileCardPropertiesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar/calendar_view/item/attachments/count/count.rb b/lib/admin/people/pronouns/pronouns.rb similarity index 100% rename from lib/groups/item/calendar/calendar_view/item/attachments/count/count.rb rename to lib/admin/people/pronouns/pronouns.rb diff --git a/lib/admin/people/pronouns/pronouns_request_builder.rb b/lib/admin/people/pronouns/pronouns_request_builder.rb new file mode 100644 index 0000000000..41f0740297 --- /dev/null +++ b/lib/admin/people/pronouns/pronouns_request_builder.rb @@ -0,0 +1,133 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../../models/pronouns_settings' +require_relative '../../admin' +require_relative '../people' +require_relative './pronouns' + +module MicrosoftGraph + module Admin + module People + module Pronouns + ## + # Provides operations to manage the pronouns property of the microsoft.graph.peopleAdminSettings entity. + class PronounsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new PronounsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/admin/people/pronouns{?%24expand,%24select}") + end + ## + ## Get the properties of the pronounsSettings resource for an organization. For more information on settings to manage pronouns support, see Manage pronouns settings for an organization using the Microsoft Graph API. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of pronouns_settings + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::PronounsSettings.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the properties of a pronounsSettings object in an organization. For more information on settings to manage pronouns support, see Manage pronouns settings for an organization using the Microsoft Graph API. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of pronouns_settings + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::PronounsSettings.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the properties of the pronounsSettings resource for an organization. For more information on settings to manage pronouns support, see Manage pronouns settings for an organization using the Microsoft Graph API. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the properties of a pronounsSettings object in an organization. For more information on settings to manage pronouns support, see Manage pronouns settings for an organization using the Microsoft Graph API. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a pronouns_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return PronounsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the properties of the pronounsSettings resource for an organization. For more information on settings to manage pronouns support, see Manage pronouns settings for an organization using the Microsoft Graph API. + class PronounsRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar/calendar_view/item/calendar/calendar.rb b/lib/admin/report_settings/report_settings.rb similarity index 100% rename from lib/groups/item/calendar/calendar_view/item/calendar/calendar.rb rename to lib/admin/report_settings/report_settings.rb diff --git a/lib/admin/report_settings/report_settings_request_builder.rb b/lib/admin/report_settings/report_settings_request_builder.rb new file mode 100644 index 0000000000..d49e8e102f --- /dev/null +++ b/lib/admin/report_settings/report_settings_request_builder.rb @@ -0,0 +1,160 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/admin_report_settings' +require_relative '../../models/o_data_errors_o_data_error' +require_relative '../admin' +require_relative './report_settings' + +module MicrosoftGraph + module Admin + module ReportSettings + ## + # Provides operations to manage the reportSettings property of the microsoft.graph.admin entity. + class ReportSettingsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new ReportSettingsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/admin/reportSettings{?%24expand,%24select}") + end + ## + ## Delete navigation property reportSettings for admin + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Get the tenant-level settings for Microsoft 365 reports. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of admin_report_settings + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AdminReportSettings.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update tenant-level settings for Microsoft 365 reports. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of admin_report_settings + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AdminReportSettings.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property reportSettings for admin + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Get the tenant-level settings for Microsoft 365 reports. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update tenant-level settings for Microsoft 365 reports. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a report_settings_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ReportSettingsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the tenant-level settings for Microsoft 365 reports. + class ReportSettingsRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end +end diff --git a/lib/admin/service_announcement/health_overviews/count/count_request_builder.rb b/lib/admin/service_announcement/health_overviews/count/count_request_builder.rb index 7d97c2053a..924af1c074 100644 --- a/lib/admin/service_announcement/health_overviews/count/count_request_builder.rb +++ b/lib/admin/service_announcement/health_overviews/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/healthOverviews/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/healthOverviews/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/admin/service_announcement/health_overviews/health_overviews_request_builder.rb b/lib/admin/service_announcement/health_overviews/health_overviews_request_builder.rb index f501d02cae..d00775ffc9 100644 --- a/lib/admin/service_announcement/health_overviews/health_overviews_request_builder.rb +++ b/lib/admin/service_announcement/health_overviews/health_overviews_request_builder.rb @@ -40,7 +40,7 @@ def by_service_health_id(service_health_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/healthOverviews{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/healthOverviews{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Retrieve the serviceHealth resources from the healthOverviews navigation property. This operation provides the health report of all subscribed services for a tenant. @@ -52,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceHealthCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -68,8 +67,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceHealth.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -79,15 +77,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -99,17 +97,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a health_overviews_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return HealthOverviewsRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve the serviceHealth resources from the healthOverviews navigation property. This operation provides the health report of all subscribed services for a tenant. diff --git a/lib/admin/service_announcement/health_overviews/item/issues/count/count_request_builder.rb b/lib/admin/service_announcement/health_overviews/item/issues/count/count_request_builder.rb index 8f78dca087..30112d6a3b 100644 --- a/lib/admin/service_announcement/health_overviews/item/issues/count/count_request_builder.rb +++ b/lib/admin/service_announcement/health_overviews/item/issues/count/count_request_builder.rb @@ -26,7 +26,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/healthOverviews/{serviceHealth%2Did}/issues/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/healthOverviews/{serviceHealth%2Did}/issues/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -38,8 +38,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -49,17 +48,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/admin/service_announcement/health_overviews/item/issues/issues_request_builder.rb b/lib/admin/service_announcement/health_overviews/item/issues/issues_request_builder.rb index 19c07fbe6b..06a24ef28f 100644 --- a/lib/admin/service_announcement/health_overviews/item/issues/issues_request_builder.rb +++ b/lib/admin/service_announcement/health_overviews/item/issues/issues_request_builder.rb @@ -44,7 +44,7 @@ def by_service_health_issue_id(service_health_issue_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/healthOverviews/{serviceHealth%2Did}/issues{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/healthOverviews/{serviceHealth%2Did}/issues{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## A collection of issues that happened on the service, with detailed information for each issue. @@ -56,8 +56,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceHealthIssueCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -72,8 +71,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceHealthIssue.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -83,15 +81,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -103,17 +101,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a issues_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return IssuesRequestBuilder.new(raw_url, @request_adapter) + end ## # A collection of issues that happened on the service, with detailed information for each issue. diff --git a/lib/admin/service_announcement/health_overviews/item/issues/item/incident_report/incident_report_request_builder.rb b/lib/admin/service_announcement/health_overviews/item/issues/item/incident_report/incident_report_request_builder.rb index 52cab454b4..a745251c1a 100644 --- a/lib/admin/service_announcement/health_overviews/item/issues/item/incident_report/incident_report_request_builder.rb +++ b/lib/admin/service_announcement/health_overviews/item/issues/item/incident_report/incident_report_request_builder.rb @@ -31,7 +31,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/healthOverviews/{serviceHealth%2Did}/issues/{serviceHealthIssue%2Did}/incidentReport()") end ## - ## Invoke function incidentReport + ## Provide the Post-Incident Review (PIR) document of a specified service issue for tenant. An issue only with status of PostIncidentReviewPublished indicates that the PIR document exists for the issue. The operation returns an error if the specified issue doesn't exist for the tenant or if PIR document does not exist for the issue. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of binary ## @@ -40,26 +40,35 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## - ## Invoke function incidentReport + ## Provide the Post-Incident Review (PIR) document of a specified service issue for tenant. An issue only with status of PostIncidentReviewPublished indicates that the PIR document exists for the issue. The operation returns an error if the specified issue doesn't exist for the tenant or if PIR document does not exist for the issue. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a incident_report_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return IncidentReportRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/admin/service_announcement/health_overviews/item/issues/item/service_health_issue_item_request_builder.rb b/lib/admin/service_announcement/health_overviews/item/issues/item/service_health_issue_item_request_builder.rb index 63d273dc50..08f94649e9 100644 --- a/lib/admin/service_announcement/health_overviews/item/issues/item/service_health_issue_item_request_builder.rb +++ b/lib/admin/service_announcement/health_overviews/item/issues/item/service_health_issue_item_request_builder.rb @@ -33,7 +33,7 @@ def incident_report() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/healthOverviews/{serviceHealth%2Did}/issues/{serviceHealthIssue%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/healthOverviews/{serviceHealth%2Did}/issues/{serviceHealthIssue%2Did}{?%24expand,%24select}") end ## ## Delete navigation property issues for admin @@ -45,8 +45,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -59,8 +58,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceHealthIssue.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -75,8 +73,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceHealthIssue.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -86,13 +83,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -102,15 +100,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -122,17 +120,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a service_health_issue_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ServiceHealthIssueItemRequestBuilder.new(raw_url, @request_adapter) + end ## # A collection of issues that happened on the service, with detailed information for each issue. diff --git a/lib/admin/service_announcement/health_overviews/item/service_health_item_request_builder.rb b/lib/admin/service_announcement/health_overviews/item/service_health_item_request_builder.rb index db0eaa4129..12c841416b 100644 --- a/lib/admin/service_announcement/health_overviews/item/service_health_item_request_builder.rb +++ b/lib/admin/service_announcement/health_overviews/item/service_health_item_request_builder.rb @@ -29,7 +29,7 @@ def issues() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/healthOverviews/{serviceHealth%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/healthOverviews/{serviceHealth%2Did}{?%24expand,%24select}") end ## ## Delete navigation property healthOverviews for admin @@ -41,8 +41,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -55,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceHealth.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -71,8 +69,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceHealth.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -82,13 +79,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -98,15 +96,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -118,17 +116,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a service_health_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ServiceHealthItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve the properties and relationships of a serviceHealth object. This operation provides the health information of a specified service for a tenant. diff --git a/lib/admin/service_announcement/issues/count/count_request_builder.rb b/lib/admin/service_announcement/issues/count/count_request_builder.rb index e7c0134fa7..fab1fcb8e8 100644 --- a/lib/admin/service_announcement/issues/count/count_request_builder.rb +++ b/lib/admin/service_announcement/issues/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/issues/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/issues/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/admin/service_announcement/issues/issues_request_builder.rb b/lib/admin/service_announcement/issues/issues_request_builder.rb index 3a2b5248c2..dc53d73249 100644 --- a/lib/admin/service_announcement/issues/issues_request_builder.rb +++ b/lib/admin/service_announcement/issues/issues_request_builder.rb @@ -40,7 +40,7 @@ def by_service_health_issue_id(service_health_issue_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/issues{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/issues{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Retrieve serviceHealthIssue resources from the issues navigation property. This operation retrieves information about all service health issues that exist for the tenant. @@ -52,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceHealthIssueCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -68,8 +67,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceHealthIssue.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -79,15 +77,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -99,17 +97,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a issues_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return IssuesRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve serviceHealthIssue resources from the issues navigation property. This operation retrieves information about all service health issues that exist for the tenant. diff --git a/lib/admin/service_announcement/issues/item/incident_report/incident_report_request_builder.rb b/lib/admin/service_announcement/issues/item/incident_report/incident_report_request_builder.rb index f14ceb21a3..f7a1d08c88 100644 --- a/lib/admin/service_announcement/issues/item/incident_report/incident_report_request_builder.rb +++ b/lib/admin/service_announcement/issues/item/incident_report/incident_report_request_builder.rb @@ -27,7 +27,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/issues/{serviceHealthIssue%2Did}/incidentReport()") end ## - ## Invoke function incidentReport + ## Provide the Post-Incident Review (PIR) document of a specified service issue for tenant. An issue only with status of PostIncidentReviewPublished indicates that the PIR document exists for the issue. The operation returns an error if the specified issue doesn't exist for the tenant or if PIR document does not exist for the issue. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of binary ## @@ -36,26 +36,35 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## - ## Invoke function incidentReport + ## Provide the Post-Incident Review (PIR) document of a specified service issue for tenant. An issue only with status of PostIncidentReviewPublished indicates that the PIR document exists for the issue. The operation returns an error if the specified issue doesn't exist for the tenant or if PIR document does not exist for the issue. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a incident_report_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return IncidentReportRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/admin/service_announcement/issues/item/service_health_issue_item_request_builder.rb b/lib/admin/service_announcement/issues/item/service_health_issue_item_request_builder.rb index 867e65ddcf..14e5e22e73 100644 --- a/lib/admin/service_announcement/issues/item/service_health_issue_item_request_builder.rb +++ b/lib/admin/service_announcement/issues/item/service_health_issue_item_request_builder.rb @@ -29,7 +29,7 @@ def incident_report() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/issues/{serviceHealthIssue%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/issues/{serviceHealthIssue%2Did}{?%24expand,%24select}") end ## ## Delete navigation property issues for admin @@ -41,8 +41,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -55,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceHealthIssue.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -71,8 +69,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceHealthIssue.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -82,13 +79,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -98,15 +96,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -118,17 +116,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a service_health_issue_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ServiceHealthIssueItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve the properties and relationships of a serviceHealthIssue object. This operation retrieves a specified service health issue for tenant. The operation returns an error if the issue does not exist for the tenant. diff --git a/lib/admin/service_announcement/messages/archive/archive.rb b/lib/admin/service_announcement/messages/archive/archive.rb index 5323b65ebd..1e2f6fecd5 100644 --- a/lib/admin/service_announcement/messages/archive/archive.rb +++ b/lib/admin/service_announcement/messages/archive/archive.rb @@ -1,2 +1,2 @@ require_relative 'archive_post_request_body' -require_relative 'archive_response' +require_relative 'archive_post_response' diff --git a/lib/admin/service_announcement/messages/archive/archive_post_request_body.rb b/lib/admin/service_announcement/messages/archive/archive_post_request_body.rb index a4f154c234..34daa921f1 100644 --- a/lib/admin/service_announcement/messages/archive/archive_post_request_body.rb +++ b/lib/admin/service_announcement/messages/archive/archive_post_request_body.rb @@ -19,22 +19,22 @@ class ArchivePostRequestBody # The messageIds property @message_ids ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new archivePostRequestBody and sets the default values. + ## Instantiates a new ArchivePostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/admin/service_announcement/messages/archive/archive_post_response.rb b/lib/admin/service_announcement/messages/archive/archive_post_response.rb new file mode 100644 index 0000000000..ebf8e35224 --- /dev/null +++ b/lib/admin/service_announcement/messages/archive/archive_post_response.rb @@ -0,0 +1,91 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../admin' +require_relative '../../service_announcement' +require_relative '../messages' +require_relative './archive' + +module MicrosoftGraph + module Admin + module ServiceAnnouncement + module Messages + module Archive + class ArchivePostResponse + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The value property + @value + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new ArchivePostResponse and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a archive_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return ArchivePostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "value" => lambda {|n| @value = n.get_boolean_value() }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_boolean_value("value", @value) + writer.write_additional_data(@additional_data) + end + ## + ## Gets the value property value. The value property + ## @return a boolean + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end +end diff --git a/lib/admin/service_announcement/messages/archive/archive_request_builder.rb b/lib/admin/service_announcement/messages/archive/archive_request_builder.rb index fb6d24eeea..54e8d7e764 100644 --- a/lib/admin/service_announcement/messages/archive/archive_request_builder.rb +++ b/lib/admin/service_announcement/messages/archive/archive_request_builder.rb @@ -28,7 +28,7 @@ def initialize(path_parameters, request_adapter) ## Archive a list of serviceUpdateMessages for the signed in user. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of archive_response + ## @return a Fiber of archive_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -36,9 +36,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Admin::ServiceAnnouncement::Messages::Archive::ArchiveResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Admin::ServiceAnnouncement::Messages::Archive::ArchivePostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Archive a list of serviceUpdateMessages for the signed in user. @@ -49,17 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a archive_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ArchiveRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/admin/service_announcement/messages/archive/archive_response.rb b/lib/admin/service_announcement/messages/archive/archive_response.rb deleted file mode 100644 index 7a7d707183..0000000000 --- a/lib/admin/service_announcement/messages/archive/archive_response.rb +++ /dev/null @@ -1,91 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../admin' -require_relative '../../service_announcement' -require_relative '../messages' -require_relative './archive' - -module MicrosoftGraph - module Admin - module ServiceAnnouncement - module Messages - module Archive - class ArchiveResponse - include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable - ## - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - @additional_data - ## - # The value property - @value - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @return a i_dictionary - ## - def additional_data - return @additional_data - end - ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. - ## @return a void - ## - def additional_data=(value) - @additional_data = value - end - ## - ## Instantiates a new archiveResponse and sets the default values. - ## @return a void - ## - def initialize() - @additional_data = Hash.new - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a archive_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return ArchiveResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return { - "value" => lambda {|n| @value = n.get_boolean_value() }, - } - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_boolean_value("value", @value) - writer.write_additional_data(@additional_data) - end - ## - ## Gets the value property value. The value property - ## @return a boolean - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end -end diff --git a/lib/admin/service_announcement/messages/count/count_request_builder.rb b/lib/admin/service_announcement/messages/count/count_request_builder.rb index 998f48a9c9..415fb6bd85 100644 --- a/lib/admin/service_announcement/messages/count/count_request_builder.rb +++ b/lib/admin/service_announcement/messages/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/messages/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/messages/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/admin/service_announcement/messages/favorite/favorite.rb b/lib/admin/service_announcement/messages/favorite/favorite.rb index 4f9054622f..06d5b02786 100644 --- a/lib/admin/service_announcement/messages/favorite/favorite.rb +++ b/lib/admin/service_announcement/messages/favorite/favorite.rb @@ -1,2 +1,2 @@ require_relative 'favorite_post_request_body' -require_relative 'favorite_response' +require_relative 'favorite_post_response' diff --git a/lib/admin/service_announcement/messages/favorite/favorite_post_request_body.rb b/lib/admin/service_announcement/messages/favorite/favorite_post_request_body.rb index d6e0735045..df916e56bc 100644 --- a/lib/admin/service_announcement/messages/favorite/favorite_post_request_body.rb +++ b/lib/admin/service_announcement/messages/favorite/favorite_post_request_body.rb @@ -19,22 +19,22 @@ class FavoritePostRequestBody # The messageIds property @message_ids ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new favoritePostRequestBody and sets the default values. + ## Instantiates a new FavoritePostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/admin/service_announcement/messages/favorite/favorite_post_response.rb b/lib/admin/service_announcement/messages/favorite/favorite_post_response.rb new file mode 100644 index 0000000000..76b7784411 --- /dev/null +++ b/lib/admin/service_announcement/messages/favorite/favorite_post_response.rb @@ -0,0 +1,91 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../admin' +require_relative '../../service_announcement' +require_relative '../messages' +require_relative './favorite' + +module MicrosoftGraph + module Admin + module ServiceAnnouncement + module Messages + module Favorite + class FavoritePostResponse + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The value property + @value + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new FavoritePostResponse and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a favorite_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return FavoritePostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "value" => lambda {|n| @value = n.get_boolean_value() }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_boolean_value("value", @value) + writer.write_additional_data(@additional_data) + end + ## + ## Gets the value property value. The value property + ## @return a boolean + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end +end diff --git a/lib/admin/service_announcement/messages/favorite/favorite_request_builder.rb b/lib/admin/service_announcement/messages/favorite/favorite_request_builder.rb index be3552c9db..e788d0e5ef 100644 --- a/lib/admin/service_announcement/messages/favorite/favorite_request_builder.rb +++ b/lib/admin/service_announcement/messages/favorite/favorite_request_builder.rb @@ -28,7 +28,7 @@ def initialize(path_parameters, request_adapter) ## Change the status of a list of serviceUpdateMessages to favorite for the signed in user. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of favorite_response + ## @return a Fiber of favorite_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -36,9 +36,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Admin::ServiceAnnouncement::Messages::Favorite::FavoriteResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Admin::ServiceAnnouncement::Messages::Favorite::FavoritePostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Change the status of a list of serviceUpdateMessages to favorite for the signed in user. @@ -49,17 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a favorite_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return FavoriteRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/admin/service_announcement/messages/favorite/favorite_response.rb b/lib/admin/service_announcement/messages/favorite/favorite_response.rb deleted file mode 100644 index 56f648e902..0000000000 --- a/lib/admin/service_announcement/messages/favorite/favorite_response.rb +++ /dev/null @@ -1,91 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../admin' -require_relative '../../service_announcement' -require_relative '../messages' -require_relative './favorite' - -module MicrosoftGraph - module Admin - module ServiceAnnouncement - module Messages - module Favorite - class FavoriteResponse - include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable - ## - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - @additional_data - ## - # The value property - @value - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @return a i_dictionary - ## - def additional_data - return @additional_data - end - ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. - ## @return a void - ## - def additional_data=(value) - @additional_data = value - end - ## - ## Instantiates a new favoriteResponse and sets the default values. - ## @return a void - ## - def initialize() - @additional_data = Hash.new - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a favorite_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return FavoriteResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return { - "value" => lambda {|n| @value = n.get_boolean_value() }, - } - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_boolean_value("value", @value) - writer.write_additional_data(@additional_data) - end - ## - ## Gets the value property value. The value property - ## @return a boolean - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end -end diff --git a/lib/admin/service_announcement/messages/item/attachments/attachments_request_builder.rb b/lib/admin/service_announcement/messages/item/attachments/attachments_request_builder.rb index e64024b209..f536039700 100644 --- a/lib/admin/service_announcement/messages/item/attachments/attachments_request_builder.rb +++ b/lib/admin/service_announcement/messages/item/attachments/attachments_request_builder.rb @@ -44,7 +44,7 @@ def by_service_announcement_attachment_id(service_announcement_attachment_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/messages/{serviceUpdateMessage%2Did}/attachments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/messages/{serviceUpdateMessage%2Did}/attachments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the list of attachments associated with a service message. @@ -56,8 +56,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceAnnouncementAttachmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -72,8 +71,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceAnnouncementAttachment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -83,15 +81,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -103,17 +101,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a attachments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AttachmentsRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the list of attachments associated with a service message. diff --git a/lib/admin/service_announcement/messages/item/attachments/count/count_request_builder.rb b/lib/admin/service_announcement/messages/item/attachments/count/count_request_builder.rb index 7804a2abdf..1b3335ad2a 100644 --- a/lib/admin/service_announcement/messages/item/attachments/count/count_request_builder.rb +++ b/lib/admin/service_announcement/messages/item/attachments/count/count_request_builder.rb @@ -26,7 +26,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/messages/{serviceUpdateMessage%2Did}/attachments/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/messages/{serviceUpdateMessage%2Did}/attachments/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -38,8 +38,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -49,17 +48,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/admin/service_announcement/messages/item/attachments/item/content/content_request_builder.rb b/lib/admin/service_announcement/messages/item/attachments/item/content/content_request_builder.rb index 479a9be1c9..33a2365430 100644 --- a/lib/admin/service_announcement/messages/item/attachments/item/content/content_request_builder.rb +++ b/lib/admin/service_announcement/messages/item/attachments/item/content/content_request_builder.rb @@ -34,6 +34,19 @@ def initialize(path_parameters, request_adapter) ## ## The attachment content. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Read the properties and relationships of a serviceAnnouncementAttachment object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of binary ## def get(request_configuration=nil) @@ -41,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -57,8 +69,7 @@ def put(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceAnnouncementAttachment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,15 +77,33 @@ def put(body, request_configuration=nil) ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## - def to_get_request_information(request_configuration=nil) + def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end request_info.url_template = @url_template request_info.path_parameters = @path_parameters - request_info.http_method = :GET + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Read the properties and relationships of a serviceAnnouncementAttachment object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end ## @@ -86,17 +115,26 @@ def to_get_request_information(request_configuration=nil) def to_put_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PUT - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "", body) + request_info.set_content_from_parsable(@request_adapter, 'application/octet-stream', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PUT + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a content_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContentRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/admin/service_announcement/messages/item/attachments/item/service_announcement_attachment_item_request_builder.rb b/lib/admin/service_announcement/messages/item/attachments/item/service_announcement_attachment_item_request_builder.rb index 919934fe61..c05d413f61 100644 --- a/lib/admin/service_announcement/messages/item/attachments/item/service_announcement_attachment_item_request_builder.rb +++ b/lib/admin/service_announcement/messages/item/attachments/item/service_announcement_attachment_item_request_builder.rb @@ -33,7 +33,7 @@ def content() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/messages/{serviceUpdateMessage%2Did}/attachments/{serviceAnnouncementAttachment%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/messages/{serviceUpdateMessage%2Did}/attachments/{serviceAnnouncementAttachment%2Did}{?%24expand,%24select}") end ## ## Delete navigation property attachments for admin @@ -45,8 +45,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -59,8 +58,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceAnnouncementAttachment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -75,8 +73,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceAnnouncementAttachment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -86,13 +83,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -102,15 +100,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -122,17 +120,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a service_announcement_attachment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ServiceAnnouncementAttachmentItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read the properties and relationships of a serviceAnnouncementAttachment object. diff --git a/lib/admin/service_announcement/messages/item/attachments_archive/attachments_archive_request_builder.rb b/lib/admin/service_announcement/messages/item/attachments_archive/attachments_archive_request_builder.rb index 785587cc4d..c616619102 100644 --- a/lib/admin/service_announcement/messages/item/attachments_archive/attachments_archive_request_builder.rb +++ b/lib/admin/service_announcement/messages/item/attachments_archive/attachments_archive_request_builder.rb @@ -29,6 +29,19 @@ def initialize(path_parameters, request_adapter) ## ## The zip file that contains all attachments for a message. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Get the list of attachments associated with a service message. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of binary ## def get(request_configuration=nil) @@ -36,8 +49,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -52,8 +64,7 @@ def put(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -61,15 +72,33 @@ def put(body, request_configuration=nil) ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## - def to_get_request_information(request_configuration=nil) + def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end request_info.url_template = @url_template request_info.path_parameters = @path_parameters - request_info.http_method = :GET + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Get the list of attachments associated with a service message. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end ## @@ -81,16 +110,26 @@ def to_get_request_information(request_configuration=nil) def to_put_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PUT unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "", body) + request_info.set_content_from_parsable(@request_adapter, 'application/octet-stream', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PUT + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a attachments_archive_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AttachmentsArchiveRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/admin/service_announcement/messages/item/service_update_message_item_request_builder.rb b/lib/admin/service_announcement/messages/item/service_update_message_item_request_builder.rb index 55d06ccf01..d0340e850a 100644 --- a/lib/admin/service_announcement/messages/item/service_update_message_item_request_builder.rb +++ b/lib/admin/service_announcement/messages/item/service_update_message_item_request_builder.rb @@ -35,7 +35,7 @@ def attachments_archive() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/messages/{serviceUpdateMessage%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/messages/{serviceUpdateMessage%2Did}{?%24expand,%24select}") end ## ## Delete navigation property messages for admin @@ -47,8 +47,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -61,8 +60,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceUpdateMessage.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,8 +75,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceUpdateMessage.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -88,13 +85,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -104,15 +102,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -124,17 +122,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a service_update_message_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ServiceUpdateMessageItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve the properties and relationships of a serviceUpdateMessage object. This operation retrieves a specified service update message for the tenant. The operation returns an error if the message does not exist for the tenant. diff --git a/lib/admin/service_announcement/messages/mark_read/mark_read.rb b/lib/admin/service_announcement/messages/mark_read/mark_read.rb index ef84448414..bb9796d621 100644 --- a/lib/admin/service_announcement/messages/mark_read/mark_read.rb +++ b/lib/admin/service_announcement/messages/mark_read/mark_read.rb @@ -1,2 +1,2 @@ require_relative 'mark_read_post_request_body' -require_relative 'mark_read_response' +require_relative 'mark_read_post_response' diff --git a/lib/admin/service_announcement/messages/mark_read/mark_read_post_request_body.rb b/lib/admin/service_announcement/messages/mark_read/mark_read_post_request_body.rb index ea24c4c33d..186576c546 100644 --- a/lib/admin/service_announcement/messages/mark_read/mark_read_post_request_body.rb +++ b/lib/admin/service_announcement/messages/mark_read/mark_read_post_request_body.rb @@ -19,22 +19,22 @@ class MarkReadPostRequestBody # The messageIds property @message_ids ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new markReadPostRequestBody and sets the default values. + ## Instantiates a new MarkReadPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/admin/service_announcement/messages/mark_read/mark_read_post_response.rb b/lib/admin/service_announcement/messages/mark_read/mark_read_post_response.rb new file mode 100644 index 0000000000..1dbd3359ae --- /dev/null +++ b/lib/admin/service_announcement/messages/mark_read/mark_read_post_response.rb @@ -0,0 +1,91 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../admin' +require_relative '../../service_announcement' +require_relative '../messages' +require_relative './mark_read' + +module MicrosoftGraph + module Admin + module ServiceAnnouncement + module Messages + module MarkRead + class MarkReadPostResponse + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The value property + @value + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new MarkReadPostResponse and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a mark_read_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return MarkReadPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "value" => lambda {|n| @value = n.get_boolean_value() }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_boolean_value("value", @value) + writer.write_additional_data(@additional_data) + end + ## + ## Gets the value property value. The value property + ## @return a boolean + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end +end diff --git a/lib/admin/service_announcement/messages/mark_read/mark_read_request_builder.rb b/lib/admin/service_announcement/messages/mark_read/mark_read_request_builder.rb index acaeaf4fc3..1f36ffde98 100644 --- a/lib/admin/service_announcement/messages/mark_read/mark_read_request_builder.rb +++ b/lib/admin/service_announcement/messages/mark_read/mark_read_request_builder.rb @@ -28,7 +28,7 @@ def initialize(path_parameters, request_adapter) ## Mark a list of serviceUpdateMessages as read for the signed in user. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of mark_read_response + ## @return a Fiber of mark_read_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -36,9 +36,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Admin::ServiceAnnouncement::Messages::MarkRead::MarkReadResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Admin::ServiceAnnouncement::Messages::MarkRead::MarkReadPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Mark a list of serviceUpdateMessages as read for the signed in user. @@ -49,17 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mark_read_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MarkReadRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/admin/service_announcement/messages/mark_read/mark_read_response.rb b/lib/admin/service_announcement/messages/mark_read/mark_read_response.rb deleted file mode 100644 index c9f382fdcc..0000000000 --- a/lib/admin/service_announcement/messages/mark_read/mark_read_response.rb +++ /dev/null @@ -1,91 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../admin' -require_relative '../../service_announcement' -require_relative '../messages' -require_relative './mark_read' - -module MicrosoftGraph - module Admin - module ServiceAnnouncement - module Messages - module MarkRead - class MarkReadResponse - include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable - ## - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - @additional_data - ## - # The value property - @value - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @return a i_dictionary - ## - def additional_data - return @additional_data - end - ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. - ## @return a void - ## - def additional_data=(value) - @additional_data = value - end - ## - ## Instantiates a new markReadResponse and sets the default values. - ## @return a void - ## - def initialize() - @additional_data = Hash.new - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a mark_read_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return MarkReadResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return { - "value" => lambda {|n| @value = n.get_boolean_value() }, - } - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_boolean_value("value", @value) - writer.write_additional_data(@additional_data) - end - ## - ## Gets the value property value. The value property - ## @return a boolean - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end -end diff --git a/lib/admin/service_announcement/messages/mark_unread/mark_unread.rb b/lib/admin/service_announcement/messages/mark_unread/mark_unread.rb index 03bff86859..f2f2147043 100644 --- a/lib/admin/service_announcement/messages/mark_unread/mark_unread.rb +++ b/lib/admin/service_announcement/messages/mark_unread/mark_unread.rb @@ -1,2 +1,2 @@ require_relative 'mark_unread_post_request_body' -require_relative 'mark_unread_response' +require_relative 'mark_unread_post_response' diff --git a/lib/admin/service_announcement/messages/mark_unread/mark_unread_post_request_body.rb b/lib/admin/service_announcement/messages/mark_unread/mark_unread_post_request_body.rb index 1fa852aefe..e5981c22f6 100644 --- a/lib/admin/service_announcement/messages/mark_unread/mark_unread_post_request_body.rb +++ b/lib/admin/service_announcement/messages/mark_unread/mark_unread_post_request_body.rb @@ -19,22 +19,22 @@ class MarkUnreadPostRequestBody # The messageIds property @message_ids ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new markUnreadPostRequestBody and sets the default values. + ## Instantiates a new MarkUnreadPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/admin/service_announcement/messages/mark_unread/mark_unread_post_response.rb b/lib/admin/service_announcement/messages/mark_unread/mark_unread_post_response.rb new file mode 100644 index 0000000000..cd82a6a074 --- /dev/null +++ b/lib/admin/service_announcement/messages/mark_unread/mark_unread_post_response.rb @@ -0,0 +1,91 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../admin' +require_relative '../../service_announcement' +require_relative '../messages' +require_relative './mark_unread' + +module MicrosoftGraph + module Admin + module ServiceAnnouncement + module Messages + module MarkUnread + class MarkUnreadPostResponse + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The value property + @value + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new MarkUnreadPostResponse and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a mark_unread_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return MarkUnreadPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "value" => lambda {|n| @value = n.get_boolean_value() }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_boolean_value("value", @value) + writer.write_additional_data(@additional_data) + end + ## + ## Gets the value property value. The value property + ## @return a boolean + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end +end diff --git a/lib/admin/service_announcement/messages/mark_unread/mark_unread_request_builder.rb b/lib/admin/service_announcement/messages/mark_unread/mark_unread_request_builder.rb index 4c78bf4325..23143b163f 100644 --- a/lib/admin/service_announcement/messages/mark_unread/mark_unread_request_builder.rb +++ b/lib/admin/service_announcement/messages/mark_unread/mark_unread_request_builder.rb @@ -28,7 +28,7 @@ def initialize(path_parameters, request_adapter) ## Mark a list of serviceUpdateMessages as unread for the signed in user. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of mark_unread_response + ## @return a Fiber of mark_unread_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -36,9 +36,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Admin::ServiceAnnouncement::Messages::MarkUnread::MarkUnreadResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Admin::ServiceAnnouncement::Messages::MarkUnread::MarkUnreadPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Mark a list of serviceUpdateMessages as unread for the signed in user. @@ -49,17 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mark_unread_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MarkUnreadRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/admin/service_announcement/messages/mark_unread/mark_unread_response.rb b/lib/admin/service_announcement/messages/mark_unread/mark_unread_response.rb deleted file mode 100644 index 2a1d2b26ca..0000000000 --- a/lib/admin/service_announcement/messages/mark_unread/mark_unread_response.rb +++ /dev/null @@ -1,91 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../admin' -require_relative '../../service_announcement' -require_relative '../messages' -require_relative './mark_unread' - -module MicrosoftGraph - module Admin - module ServiceAnnouncement - module Messages - module MarkUnread - class MarkUnreadResponse - include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable - ## - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - @additional_data - ## - # The value property - @value - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @return a i_dictionary - ## - def additional_data - return @additional_data - end - ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. - ## @return a void - ## - def additional_data=(value) - @additional_data = value - end - ## - ## Instantiates a new markUnreadResponse and sets the default values. - ## @return a void - ## - def initialize() - @additional_data = Hash.new - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a mark_unread_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return MarkUnreadResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return { - "value" => lambda {|n| @value = n.get_boolean_value() }, - } - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_boolean_value("value", @value) - writer.write_additional_data(@additional_data) - end - ## - ## Gets the value property value. The value property - ## @return a boolean - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end -end diff --git a/lib/admin/service_announcement/messages/messages_request_builder.rb b/lib/admin/service_announcement/messages/messages_request_builder.rb index 9b99c68f21..7749a4b7af 100644 --- a/lib/admin/service_announcement/messages/messages_request_builder.rb +++ b/lib/admin/service_announcement/messages/messages_request_builder.rb @@ -76,7 +76,7 @@ def by_service_update_message_id(service_update_message_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/messages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement/messages{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Retrieve the serviceUpdateMessage resources from the messages navigation property. This operation retrieves all service update messages that exist for the tenant. @@ -88,8 +88,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceUpdateMessageCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -104,8 +103,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceUpdateMessage.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -115,15 +113,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -135,17 +133,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a messages_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MessagesRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve the serviceUpdateMessage resources from the messages navigation property. This operation retrieves all service update messages that exist for the tenant. diff --git a/lib/admin/service_announcement/messages/unarchive/unarchive.rb b/lib/admin/service_announcement/messages/unarchive/unarchive.rb index f096252cba..0e592965d3 100644 --- a/lib/admin/service_announcement/messages/unarchive/unarchive.rb +++ b/lib/admin/service_announcement/messages/unarchive/unarchive.rb @@ -1,2 +1,2 @@ require_relative 'unarchive_post_request_body' -require_relative 'unarchive_response' +require_relative 'unarchive_post_response' diff --git a/lib/admin/service_announcement/messages/unarchive/unarchive_post_request_body.rb b/lib/admin/service_announcement/messages/unarchive/unarchive_post_request_body.rb index ff8b07fa8e..56200ee3a8 100644 --- a/lib/admin/service_announcement/messages/unarchive/unarchive_post_request_body.rb +++ b/lib/admin/service_announcement/messages/unarchive/unarchive_post_request_body.rb @@ -19,22 +19,22 @@ class UnarchivePostRequestBody # The messageIds property @message_ids ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new unarchivePostRequestBody and sets the default values. + ## Instantiates a new UnarchivePostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/admin/service_announcement/messages/unarchive/unarchive_post_response.rb b/lib/admin/service_announcement/messages/unarchive/unarchive_post_response.rb new file mode 100644 index 0000000000..6a40131c51 --- /dev/null +++ b/lib/admin/service_announcement/messages/unarchive/unarchive_post_response.rb @@ -0,0 +1,91 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../admin' +require_relative '../../service_announcement' +require_relative '../messages' +require_relative './unarchive' + +module MicrosoftGraph + module Admin + module ServiceAnnouncement + module Messages + module Unarchive + class UnarchivePostResponse + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The value property + @value + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new UnarchivePostResponse and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a unarchive_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return UnarchivePostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "value" => lambda {|n| @value = n.get_boolean_value() }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_boolean_value("value", @value) + writer.write_additional_data(@additional_data) + end + ## + ## Gets the value property value. The value property + ## @return a boolean + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end +end diff --git a/lib/admin/service_announcement/messages/unarchive/unarchive_request_builder.rb b/lib/admin/service_announcement/messages/unarchive/unarchive_request_builder.rb index e52fcb3a88..8a7e7316b9 100644 --- a/lib/admin/service_announcement/messages/unarchive/unarchive_request_builder.rb +++ b/lib/admin/service_announcement/messages/unarchive/unarchive_request_builder.rb @@ -28,7 +28,7 @@ def initialize(path_parameters, request_adapter) ## Unarchive a list of serviceUpdateMessages for the signed in user. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of unarchive_response + ## @return a Fiber of unarchive_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -36,9 +36,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Admin::ServiceAnnouncement::Messages::Unarchive::UnarchiveResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Admin::ServiceAnnouncement::Messages::Unarchive::UnarchivePostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Unarchive a list of serviceUpdateMessages for the signed in user. @@ -49,17 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a unarchive_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UnarchiveRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/admin/service_announcement/messages/unarchive/unarchive_response.rb b/lib/admin/service_announcement/messages/unarchive/unarchive_response.rb deleted file mode 100644 index 951cfac3e5..0000000000 --- a/lib/admin/service_announcement/messages/unarchive/unarchive_response.rb +++ /dev/null @@ -1,91 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../admin' -require_relative '../../service_announcement' -require_relative '../messages' -require_relative './unarchive' - -module MicrosoftGraph - module Admin - module ServiceAnnouncement - module Messages - module Unarchive - class UnarchiveResponse - include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable - ## - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - @additional_data - ## - # The value property - @value - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @return a i_dictionary - ## - def additional_data - return @additional_data - end - ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. - ## @return a void - ## - def additional_data=(value) - @additional_data = value - end - ## - ## Instantiates a new unarchiveResponse and sets the default values. - ## @return a void - ## - def initialize() - @additional_data = Hash.new - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a unarchive_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return UnarchiveResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return { - "value" => lambda {|n| @value = n.get_boolean_value() }, - } - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_boolean_value("value", @value) - writer.write_additional_data(@additional_data) - end - ## - ## Gets the value property value. The value property - ## @return a boolean - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end -end diff --git a/lib/admin/service_announcement/messages/unfavorite/unfavorite.rb b/lib/admin/service_announcement/messages/unfavorite/unfavorite.rb index cce41bc8d6..a9bb903be2 100644 --- a/lib/admin/service_announcement/messages/unfavorite/unfavorite.rb +++ b/lib/admin/service_announcement/messages/unfavorite/unfavorite.rb @@ -1,2 +1,2 @@ require_relative 'unfavorite_post_request_body' -require_relative 'unfavorite_response' +require_relative 'unfavorite_post_response' diff --git a/lib/admin/service_announcement/messages/unfavorite/unfavorite_post_request_body.rb b/lib/admin/service_announcement/messages/unfavorite/unfavorite_post_request_body.rb index 4bea822e6c..69e922d476 100644 --- a/lib/admin/service_announcement/messages/unfavorite/unfavorite_post_request_body.rb +++ b/lib/admin/service_announcement/messages/unfavorite/unfavorite_post_request_body.rb @@ -19,22 +19,22 @@ class UnfavoritePostRequestBody # The messageIds property @message_ids ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new unfavoritePostRequestBody and sets the default values. + ## Instantiates a new UnfavoritePostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/admin/service_announcement/messages/unfavorite/unfavorite_post_response.rb b/lib/admin/service_announcement/messages/unfavorite/unfavorite_post_response.rb new file mode 100644 index 0000000000..bf91ccd4ba --- /dev/null +++ b/lib/admin/service_announcement/messages/unfavorite/unfavorite_post_response.rb @@ -0,0 +1,91 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../admin' +require_relative '../../service_announcement' +require_relative '../messages' +require_relative './unfavorite' + +module MicrosoftGraph + module Admin + module ServiceAnnouncement + module Messages + module Unfavorite + class UnfavoritePostResponse + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The value property + @value + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new UnfavoritePostResponse and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a unfavorite_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return UnfavoritePostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "value" => lambda {|n| @value = n.get_boolean_value() }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_boolean_value("value", @value) + writer.write_additional_data(@additional_data) + end + ## + ## Gets the value property value. The value property + ## @return a boolean + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end +end diff --git a/lib/admin/service_announcement/messages/unfavorite/unfavorite_request_builder.rb b/lib/admin/service_announcement/messages/unfavorite/unfavorite_request_builder.rb index 7dc57dcf12..60b9f5c430 100644 --- a/lib/admin/service_announcement/messages/unfavorite/unfavorite_request_builder.rb +++ b/lib/admin/service_announcement/messages/unfavorite/unfavorite_request_builder.rb @@ -28,7 +28,7 @@ def initialize(path_parameters, request_adapter) ## Remove the favorite status of serviceUpdateMessages for the signed in user. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of unfavorite_response + ## @return a Fiber of unfavorite_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -36,9 +36,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Admin::ServiceAnnouncement::Messages::Unfavorite::UnfavoriteResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Admin::ServiceAnnouncement::Messages::Unfavorite::UnfavoritePostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Remove the favorite status of serviceUpdateMessages for the signed in user. @@ -49,17 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a unfavorite_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UnfavoriteRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/admin/service_announcement/messages/unfavorite/unfavorite_response.rb b/lib/admin/service_announcement/messages/unfavorite/unfavorite_response.rb deleted file mode 100644 index 5f83394609..0000000000 --- a/lib/admin/service_announcement/messages/unfavorite/unfavorite_response.rb +++ /dev/null @@ -1,91 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../admin' -require_relative '../../service_announcement' -require_relative '../messages' -require_relative './unfavorite' - -module MicrosoftGraph - module Admin - module ServiceAnnouncement - module Messages - module Unfavorite - class UnfavoriteResponse - include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable - ## - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - @additional_data - ## - # The value property - @value - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @return a i_dictionary - ## - def additional_data - return @additional_data - end - ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. - ## @return a void - ## - def additional_data=(value) - @additional_data = value - end - ## - ## Instantiates a new unfavoriteResponse and sets the default values. - ## @return a void - ## - def initialize() - @additional_data = Hash.new - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a unfavorite_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return UnfavoriteResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return { - "value" => lambda {|n| @value = n.get_boolean_value() }, - } - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_boolean_value("value", @value) - writer.write_additional_data(@additional_data) - end - ## - ## Gets the value property value. The value property - ## @return a boolean - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end -end diff --git a/lib/admin/service_announcement/service_announcement_request_builder.rb b/lib/admin/service_announcement/service_announcement_request_builder.rb index 54cc981d40..b3f5652733 100644 --- a/lib/admin/service_announcement/service_announcement_request_builder.rb +++ b/lib/admin/service_announcement/service_announcement_request_builder.rb @@ -37,7 +37,7 @@ def messages() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/admin/serviceAnnouncement{?%24expand,%24select}") end ## ## Delete navigation property serviceAnnouncement for admin @@ -49,8 +49,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -63,8 +62,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceAnnouncement.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -79,8 +77,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceAnnouncement.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -90,13 +87,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -106,15 +104,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -126,17 +124,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a service_announcement_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ServiceAnnouncementRequestBuilder.new(raw_url, @request_adapter) + end ## # A container for service communications resources. Read-only. diff --git a/lib/admin/sharepoint/settings/settings_request_builder.rb b/lib/admin/sharepoint/settings/settings_request_builder.rb index ef24f3b2ba..486b926543 100644 --- a/lib/admin/sharepoint/settings/settings_request_builder.rb +++ b/lib/admin/sharepoint/settings/settings_request_builder.rb @@ -21,7 +21,7 @@ class SettingsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/sharepoint/settings{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/admin/sharepoint/settings{?%24expand,%24select}") end ## ## Delete navigation property settings for admin @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SharepointSettings.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SharepointSettings.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a settings_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SettingsRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the tenant-level settings for SharePoint and OneDrive. diff --git a/lib/admin/sharepoint/sharepoint_request_builder.rb b/lib/admin/sharepoint/sharepoint_request_builder.rb index b32c14dbc2..004cf58f02 100644 --- a/lib/admin/sharepoint/sharepoint_request_builder.rb +++ b/lib/admin/sharepoint/sharepoint_request_builder.rb @@ -25,7 +25,7 @@ def settings() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/admin/sharepoint{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/admin/sharepoint{?%24expand,%24select}") end ## ## Delete navigation property sharepoint for admin @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Sharepoint.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Sharepoint.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a sharepoint_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SharepointRequestBuilder.new(raw_url, @request_adapter) + end ## # Get sharepoint from admin diff --git a/lib/agreement_acceptances/agreement_acceptances_request_builder.rb b/lib/agreement_acceptances/agreement_acceptances_request_builder.rb index b9655173ee..3467c9019d 100644 --- a/lib/agreement_acceptances/agreement_acceptances_request_builder.rb +++ b/lib/agreement_acceptances/agreement_acceptances_request_builder.rb @@ -30,7 +30,7 @@ def by_agreement_acceptance_id(agreement_acceptance_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/agreementAcceptances{?%24search,%24select}") + super(path_parameters, request_adapter, "{+baseurl}/agreementAcceptances{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get entities from agreementAcceptances @@ -42,8 +42,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementAcceptanceCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -58,8 +57,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementAcceptance.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -69,15 +67,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -89,22 +87,43 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a agreement_acceptances_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AgreementAcceptancesRequestBuilder.new(raw_url, @request_adapter) + end ## # Get entities from agreementAcceptances class AgreementAcceptancesRequestBuilderGetQueryParameters + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby ## # Search items by search phrases attr_accessor :search @@ -112,6 +131,12 @@ class AgreementAcceptancesRequestBuilderGetQueryParameters # Select properties to be returned attr_accessor :select ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## ## Maps the query parameters names to their encoded names for the URI template parsing. ## @param original_name The original query parameter name in the class. ## @return a string @@ -119,10 +144,22 @@ class AgreementAcceptancesRequestBuilderGetQueryParameters def get_query_parameter(original_name) raise StandardError, 'original_name cannot be null' if original_name.nil? case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" when "search" return "%24search" when "select" return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" else return original_name end diff --git a/lib/agreement_acceptances/item/agreement_acceptance_item_request_builder.rb b/lib/agreement_acceptances/item/agreement_acceptance_item_request_builder.rb index 9ee6de49d6..b1f06e459d 100644 --- a/lib/agreement_acceptances/item/agreement_acceptance_item_request_builder.rb +++ b/lib/agreement_acceptances/item/agreement_acceptance_item_request_builder.rb @@ -31,8 +31,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,8 +44,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementAcceptance.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -61,8 +59,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementAcceptance.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -72,13 +69,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -88,15 +86,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -108,17 +106,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a agreement_acceptance_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AgreementAcceptanceItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Get entity from agreementAcceptances by key diff --git a/lib/agreements/agreements_request_builder.rb b/lib/agreements/agreements_request_builder.rb index 4c96328460..55efe4d3c2 100644 --- a/lib/agreements/agreements_request_builder.rb +++ b/lib/agreements/agreements_request_builder.rb @@ -30,7 +30,7 @@ def by_agreement_id(agreement_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/agreements{?%24search,%24select}") + super(path_parameters, request_adapter, "{+baseurl}/agreements{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get entities from agreements @@ -42,8 +42,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -58,8 +57,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Agreement.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -69,15 +67,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -89,22 +87,43 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a agreements_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AgreementsRequestBuilder.new(raw_url, @request_adapter) + end ## # Get entities from agreements class AgreementsRequestBuilderGetQueryParameters + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby ## # Search items by search phrases attr_accessor :search @@ -112,6 +131,12 @@ class AgreementsRequestBuilderGetQueryParameters # Select properties to be returned attr_accessor :select ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## ## Maps the query parameters names to their encoded names for the URI template parsing. ## @param original_name The original query parameter name in the class. ## @return a string @@ -119,10 +144,22 @@ class AgreementsRequestBuilderGetQueryParameters def get_query_parameter(original_name) raise StandardError, 'original_name cannot be null' if original_name.nil? case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" when "search" return "%24search" when "select" return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" else return original_name end diff --git a/lib/agreements/item/acceptances/acceptances_request_builder.rb b/lib/agreements/item/acceptances/acceptances_request_builder.rb index 7d4759e199..15bc3e7502 100644 --- a/lib/agreements/item/acceptances/acceptances_request_builder.rb +++ b/lib/agreements/item/acceptances/acceptances_request_builder.rb @@ -40,10 +40,10 @@ def by_agreement_acceptance_id(agreement_acceptance_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/acceptances{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/acceptances{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Get the details about the acceptance records for a specific agreement. + ## Read-only. Information about acceptances of this agreement. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of agreement_acceptance_collection_response ## @@ -52,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementAcceptanceCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -68,26 +67,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementAcceptance.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Get the details about the acceptance records for a specific agreement. + ## Read-only. Information about acceptances of this agreement. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -99,20 +97,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a acceptances_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AcceptancesRequestBuilder.new(raw_url, @request_adapter) + end ## - # Get the details about the acceptance records for a specific agreement. + # Read-only. Information about acceptances of this agreement. class AcceptancesRequestBuilderGetQueryParameters ## diff --git a/lib/agreements/item/acceptances/count/count_request_builder.rb b/lib/agreements/item/acceptances/count/count_request_builder.rb index 92412381fa..4231edd944 100644 --- a/lib/agreements/item/acceptances/count/count_request_builder.rb +++ b/lib/agreements/item/acceptances/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/acceptances/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/acceptances/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/agreements/item/acceptances/item/agreement_acceptance_item_request_builder.rb b/lib/agreements/item/acceptances/item/agreement_acceptance_item_request_builder.rb index 866f8709f7..b273e6c75a 100644 --- a/lib/agreements/item/acceptances/item/agreement_acceptance_item_request_builder.rb +++ b/lib/agreements/item/acceptances/item/agreement_acceptance_item_request_builder.rb @@ -23,7 +23,7 @@ class AgreementAcceptanceItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRe ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/acceptances/{agreementAcceptance%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/acceptances/{agreementAcceptance%2Did}{?%24expand,%24select}") end ## ## Delete navigation property acceptances for agreements @@ -35,8 +35,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementAcceptance.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -65,8 +63,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementAcceptance.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,13 +73,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -92,15 +90,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,17 +110,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a agreement_acceptance_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AgreementAcceptanceItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read-only. Information about acceptances of this agreement. diff --git a/lib/agreements/item/agreement_item_request_builder.rb b/lib/agreements/item/agreement_item_request_builder.rb index ac188f5495..b1c8d55ccc 100644 --- a/lib/agreements/item/agreement_item_request_builder.rb +++ b/lib/agreements/item/agreement_item_request_builder.rb @@ -49,8 +49,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -63,8 +62,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Agreement.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -79,8 +77,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Agreement.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -90,13 +87,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -106,15 +104,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -126,17 +124,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a agreement_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AgreementItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Get entity from agreements by key diff --git a/lib/agreements/item/file/file_request_builder.rb b/lib/agreements/item/file/file_request_builder.rb index 2969552fe5..1126f9b453 100644 --- a/lib/agreements/item/file/file_request_builder.rb +++ b/lib/agreements/item/file/file_request_builder.rb @@ -27,7 +27,7 @@ def localizations() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/file{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/file{?%24expand,%24select}") end ## ## Delete navigation property file for agreements @@ -39,8 +39,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -53,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementFile.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -69,8 +67,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementFile.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -80,13 +77,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -96,15 +94,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -116,17 +114,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a file_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return FileRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve the details of an agreement file, including the language and version information. The default file can have multiple versions, each with its own language, that can be retrieved by specifying the Accept-Language header. diff --git a/lib/agreements/item/file/localizations/count/count_request_builder.rb b/lib/agreements/item/file/localizations/count/count_request_builder.rb index 51a49eaafc..021691d9d2 100644 --- a/lib/agreements/item/file/localizations/count/count_request_builder.rb +++ b/lib/agreements/item/file/localizations/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/file/localizations/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/file/localizations/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/agreements/item/file/localizations/item/agreement_file_localization_item_request_builder.rb b/lib/agreements/item/file/localizations/item/agreement_file_localization_item_request_builder.rb index 77d2457115..08e3a3c5fd 100644 --- a/lib/agreements/item/file/localizations/item/agreement_file_localization_item_request_builder.rb +++ b/lib/agreements/item/file/localizations/item/agreement_file_localization_item_request_builder.rb @@ -31,7 +31,7 @@ def versions() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/file/localizations/{agreementFileLocalization%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/file/localizations/{agreementFileLocalization%2Did}{?%24expand,%24select}") end ## ## Delete navigation property localizations for agreements @@ -43,8 +43,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -57,8 +56,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementFileLocalization.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -73,8 +71,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementFileLocalization.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -84,13 +81,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -100,15 +98,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -120,17 +118,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a agreement_file_localization_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AgreementFileLocalizationItemRequestBuilder.new(raw_url, @request_adapter) + end ## # The localized version of the terms of use agreement files attached to the agreement. diff --git a/lib/agreements/item/file/localizations/item/versions/count/count_request_builder.rb b/lib/agreements/item/file/localizations/item/versions/count/count_request_builder.rb index df88395fc2..7b0e1bc240 100644 --- a/lib/agreements/item/file/localizations/item/versions/count/count_request_builder.rb +++ b/lib/agreements/item/file/localizations/item/versions/count/count_request_builder.rb @@ -28,7 +28,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/file/localizations/{agreementFileLocalization%2Did}/versions/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/file/localizations/{agreementFileLocalization%2Did}/versions/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -40,8 +40,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -51,17 +50,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/agreements/item/file/localizations/item/versions/item/agreement_file_version_item_request_builder.rb b/lib/agreements/item/file/localizations/item/versions/item/agreement_file_version_item_request_builder.rb index 59c0383a01..55ca0cf623 100644 --- a/lib/agreements/item/file/localizations/item/versions/item/agreement_file_version_item_request_builder.rb +++ b/lib/agreements/item/file/localizations/item/versions/item/agreement_file_version_item_request_builder.rb @@ -29,7 +29,7 @@ class AgreementFileVersionItemRequestBuilder < MicrosoftKiotaAbstractions::BaseR ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/file/localizations/{agreementFileLocalization%2Did}/versions/{agreementFileVersion%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/file/localizations/{agreementFileLocalization%2Did}/versions/{agreementFileVersion%2Did}{?%24expand,%24select}") end ## ## Delete navigation property versions for agreements @@ -41,12 +41,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + ## Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of agreement_file_version ## @@ -55,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementFileVersion.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -71,8 +69,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementFileVersion.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -82,31 +79,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + ## Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -118,20 +116,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a agreement_file_version_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AgreementFileVersionItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + # Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. class AgreementFileVersionItemRequestBuilderGetQueryParameters ## diff --git a/lib/agreements/item/file/localizations/item/versions/versions_request_builder.rb b/lib/agreements/item/file/localizations/item/versions/versions_request_builder.rb index 9ed3a6bc0c..8e292f6b05 100644 --- a/lib/agreements/item/file/localizations/item/versions/versions_request_builder.rb +++ b/lib/agreements/item/file/localizations/item/versions/versions_request_builder.rb @@ -46,10 +46,10 @@ def by_agreement_file_version_id(agreement_file_version_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/file/localizations/{agreementFileLocalization%2Did}/versions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/file/localizations/{agreementFileLocalization%2Did}/versions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + ## Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of agreement_file_version_collection_response ## @@ -58,8 +58,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementFileVersionCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,26 +73,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementFileVersion.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + ## Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -105,20 +103,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a versions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return VersionsRequestBuilder.new(raw_url, @request_adapter) + end ## - # Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + # Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. class VersionsRequestBuilderGetQueryParameters ## diff --git a/lib/agreements/item/file/localizations/localizations_request_builder.rb b/lib/agreements/item/file/localizations/localizations_request_builder.rb index 723461bbed..0fdd9378a2 100644 --- a/lib/agreements/item/file/localizations/localizations_request_builder.rb +++ b/lib/agreements/item/file/localizations/localizations_request_builder.rb @@ -42,7 +42,7 @@ def by_agreement_file_localization_id(agreement_file_localization_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/file/localizations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/file/localizations{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get a list of the default and localized agreement files. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementFileLocalizationCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementFileLocalization.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a localizations_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return LocalizationsRequestBuilder.new(raw_url, @request_adapter) + end ## # Get a list of the default and localized agreement files. diff --git a/lib/agreements/item/files/count/count_request_builder.rb b/lib/agreements/item/files/count/count_request_builder.rb index 99d4920d10..92bebc7dfd 100644 --- a/lib/agreements/item/files/count/count_request_builder.rb +++ b/lib/agreements/item/files/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/files/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/files/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/agreements/item/files/files_request_builder.rb b/lib/agreements/item/files/files_request_builder.rb index eb9b82ec49..772b7e1941 100644 --- a/lib/agreements/item/files/files_request_builder.rb +++ b/lib/agreements/item/files/files_request_builder.rb @@ -40,7 +40,7 @@ def by_agreement_file_localization_id(agreement_file_localization_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/files{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/files{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## PDFs linked to this agreement. This property is in the process of being deprecated. Use the file property instead. Supports $expand. @@ -52,12 +52,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementFileLocalizationCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Create a new localized agreement file. + ## Create new navigation property to files for agreements ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of agreement_file_localization @@ -68,8 +67,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementFileLocalization.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -79,19 +77,19 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Create a new localized agreement file. + ## Create new navigation property to files for agreements ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -99,17 +97,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a files_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return FilesRequestBuilder.new(raw_url, @request_adapter) + end ## # PDFs linked to this agreement. This property is in the process of being deprecated. Use the file property instead. Supports $expand. diff --git a/lib/agreements/item/files/item/agreement_file_localization_item_request_builder.rb b/lib/agreements/item/files/item/agreement_file_localization_item_request_builder.rb index 47137f1065..ddfd78e069 100644 --- a/lib/agreements/item/files/item/agreement_file_localization_item_request_builder.rb +++ b/lib/agreements/item/files/item/agreement_file_localization_item_request_builder.rb @@ -29,7 +29,7 @@ def versions() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/files/{agreementFileLocalization%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/files/{agreementFileLocalization%2Did}{?%24expand,%24select}") end ## ## Delete navigation property files for agreements @@ -41,8 +41,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -55,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementFileLocalization.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -71,8 +69,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementFileLocalization.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -82,13 +79,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -98,15 +96,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -118,17 +116,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a agreement_file_localization_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AgreementFileLocalizationItemRequestBuilder.new(raw_url, @request_adapter) + end ## # PDFs linked to this agreement. This property is in the process of being deprecated. Use the file property instead. Supports $expand. diff --git a/lib/agreements/item/files/item/versions/count/count_request_builder.rb b/lib/agreements/item/files/item/versions/count/count_request_builder.rb index b1b03a4c6c..6035633750 100644 --- a/lib/agreements/item/files/item/versions/count/count_request_builder.rb +++ b/lib/agreements/item/files/item/versions/count/count_request_builder.rb @@ -26,7 +26,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/files/{agreementFileLocalization%2Did}/versions/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/files/{agreementFileLocalization%2Did}/versions/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -38,8 +38,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -49,17 +48,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/agreements/item/files/item/versions/item/agreement_file_version_item_request_builder.rb b/lib/agreements/item/files/item/versions/item/agreement_file_version_item_request_builder.rb index 68a2d78069..61dcf128b8 100644 --- a/lib/agreements/item/files/item/versions/item/agreement_file_version_item_request_builder.rb +++ b/lib/agreements/item/files/item/versions/item/agreement_file_version_item_request_builder.rb @@ -27,7 +27,7 @@ class AgreementFileVersionItemRequestBuilder < MicrosoftKiotaAbstractions::BaseR ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/files/{agreementFileLocalization%2Did}/versions/{agreementFileVersion%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/files/{agreementFileLocalization%2Did}/versions/{agreementFileVersion%2Did}{?%24expand,%24select}") end ## ## Delete navigation property versions for agreements @@ -39,12 +39,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + ## Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of agreement_file_version ## @@ -53,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementFileVersion.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -69,8 +67,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementFileVersion.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -80,31 +77,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + ## Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -116,20 +114,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a agreement_file_version_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AgreementFileVersionItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + # Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. class AgreementFileVersionItemRequestBuilderGetQueryParameters ## diff --git a/lib/agreements/item/files/item/versions/versions_request_builder.rb b/lib/agreements/item/files/item/versions/versions_request_builder.rb index 51855fc81b..405a36e436 100644 --- a/lib/agreements/item/files/item/versions/versions_request_builder.rb +++ b/lib/agreements/item/files/item/versions/versions_request_builder.rb @@ -44,10 +44,10 @@ def by_agreement_file_version_id(agreement_file_version_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/files/{agreementFileLocalization%2Did}/versions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/agreements/{agreement%2Did}/files/{agreementFileLocalization%2Did}/versions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + ## Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of agreement_file_version_collection_response ## @@ -56,8 +56,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementFileVersionCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -72,26 +71,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AgreementFileVersion.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + ## Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -103,20 +101,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a versions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return VersionsRequestBuilder.new(raw_url, @request_adapter) + end ## - # Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + # Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant. class VersionsRequestBuilderGetQueryParameters ## diff --git a/lib/app_catalogs/app_catalogs_request_builder.rb b/lib/app_catalogs/app_catalogs_request_builder.rb index 0dae3d8621..b448aaea21 100644 --- a/lib/app_catalogs/app_catalogs_request_builder.rb +++ b/lib/app_catalogs/app_catalogs_request_builder.rb @@ -23,7 +23,7 @@ def teams_apps() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/appCatalogs{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/appCatalogs{?%24expand,%24select}") end ## ## Get appCatalogs @@ -35,8 +35,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AppCatalogs.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -51,8 +50,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AppCatalogs.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -62,15 +60,15 @@ def patch(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -82,17 +80,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a app_catalogs_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AppCatalogsRequestBuilder.new(raw_url, @request_adapter) + end ## # Get appCatalogs diff --git a/lib/app_catalogs/teams_apps/count/count_request_builder.rb b/lib/app_catalogs/teams_apps/count/count_request_builder.rb index 606e387820..54ca3fb0a0 100644 --- a/lib/app_catalogs/teams_apps/count/count_request_builder.rb +++ b/lib/app_catalogs/teams_apps/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/appCatalogs/teamsApps/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/appCatalogs/teamsApps/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/app_catalogs/teams_apps/item/app_definitions/app_definitions_request_builder.rb b/lib/app_catalogs/teams_apps/item/app_definitions/app_definitions_request_builder.rb index a5cbef9366..6aa33c8107 100644 --- a/lib/app_catalogs/teams_apps/item/app_definitions/app_definitions_request_builder.rb +++ b/lib/app_catalogs/teams_apps/item/app_definitions/app_definitions_request_builder.rb @@ -42,7 +42,7 @@ def by_teams_app_definition_id(teams_app_definition_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/appCatalogs/teamsApps/{teamsApp%2Did}/appDefinitions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/appCatalogs/teamsApps/{teamsApp%2Did}/appDefinitions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## The details for each version of the app. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TeamsAppDefinitionCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TeamsAppDefinition.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a app_definitions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AppDefinitionsRequestBuilder.new(raw_url, @request_adapter) + end ## # The details for each version of the app. diff --git a/lib/app_catalogs/teams_apps/item/app_definitions/count/count_request_builder.rb b/lib/app_catalogs/teams_apps/item/app_definitions/count/count_request_builder.rb index c452a9f9e8..41f2fefa2f 100644 --- a/lib/app_catalogs/teams_apps/item/app_definitions/count/count_request_builder.rb +++ b/lib/app_catalogs/teams_apps/item/app_definitions/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/appCatalogs/teamsApps/{teamsApp%2Did}/appDefinitions/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/appCatalogs/teamsApps/{teamsApp%2Did}/appDefinitions/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/app_catalogs/teams_apps/item/app_definitions/item/bot/bot_request_builder.rb b/lib/app_catalogs/teams_apps/item/app_definitions/item/bot/bot_request_builder.rb index 69214c91ac..53e45da34d 100644 --- a/lib/app_catalogs/teams_apps/item/app_definitions/item/bot/bot_request_builder.rb +++ b/lib/app_catalogs/teams_apps/item/app_definitions/item/bot/bot_request_builder.rb @@ -27,7 +27,7 @@ class BotRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/appCatalogs/teamsApps/{teamsApp%2Did}/appDefinitions/{teamsAppDefinition%2Did}/bot{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/appCatalogs/teamsApps/{teamsApp%2Did}/appDefinitions/{teamsAppDefinition%2Did}/bot{?%24expand,%24select}") end ## ## Delete navigation property bot for appCatalogs @@ -39,8 +39,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -53,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TeamworkBot.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -69,8 +67,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TeamworkBot.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -80,13 +77,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -96,15 +94,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -116,17 +114,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a bot_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BotRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the bot associated with a specific definition of the TeamsApp. diff --git a/lib/app_catalogs/teams_apps/item/app_definitions/item/teams_app_definition_item_request_builder.rb b/lib/app_catalogs/teams_apps/item/app_definitions/item/teams_app_definition_item_request_builder.rb index 80f7a59fa4..28bd2c270e 100644 --- a/lib/app_catalogs/teams_apps/item/app_definitions/item/teams_app_definition_item_request_builder.rb +++ b/lib/app_catalogs/teams_apps/item/app_definitions/item/teams_app_definition_item_request_builder.rb @@ -31,7 +31,7 @@ def bot() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/appCatalogs/teamsApps/{teamsApp%2Did}/appDefinitions/{teamsAppDefinition%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/appCatalogs/teamsApps/{teamsApp%2Did}/appDefinitions/{teamsAppDefinition%2Did}{?%24expand,%24select}") end ## ## Delete navigation property appDefinitions for appCatalogs @@ -43,8 +43,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -57,12 +56,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TeamsAppDefinition.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Publish an app to the Microsoft Teams apps catalog.Specifically, this API publishes the app to your organization's catalog (the tenant app catalog);the created resource will have a distributionMethod property value of organization. The requiresReview property allows any user to submit an app for review by an administrator. Admins can approve or reject these apps via this API or the Microsoft Teams admin center. + ## Publish an app to the Microsoft Teams app catalog.Specifically, this API publishes the app to your organization's catalog (the tenant app catalog);the created resource has a distributionMethod property value of organization. The requiresReview property allows any user to submit an app for review by an administrator. Admins can approve or reject these apps via this API or the Microsoft Teams admin center. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of teams_app_definition @@ -73,8 +71,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TeamsAppDefinition.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -84,13 +81,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -100,19 +98,19 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Publish an app to the Microsoft Teams apps catalog.Specifically, this API publishes the app to your organization's catalog (the tenant app catalog);the created resource will have a distributionMethod property value of organization. The requiresReview property allows any user to submit an app for review by an administrator. Admins can approve or reject these apps via this API or the Microsoft Teams admin center. + ## Publish an app to the Microsoft Teams app catalog.Specifically, this API publishes the app to your organization's catalog (the tenant app catalog);the created resource has a distributionMethod property value of organization. The requiresReview property allows any user to submit an app for review by an administrator. Admins can approve or reject these apps via this API or the Microsoft Teams admin center. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -120,17 +118,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a teams_app_definition_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TeamsAppDefinitionItemRequestBuilder.new(raw_url, @request_adapter) + end ## # The details for each version of the app. diff --git a/lib/app_catalogs/teams_apps/item/teams_app_item_request_builder.rb b/lib/app_catalogs/teams_apps/item/teams_app_item_request_builder.rb index 811ab19869..e9056bf8b9 100644 --- a/lib/app_catalogs/teams_apps/item/teams_app_item_request_builder.rb +++ b/lib/app_catalogs/teams_apps/item/teams_app_item_request_builder.rb @@ -27,10 +27,10 @@ def app_definitions() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/appCatalogs/teamsApps/{teamsApp%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/appCatalogs/teamsApps/{teamsApp%2Did}{?%24expand,%24select}") end ## - ## Delete teamsApp + ## Delete an app from an organization's app catalog (the tenant app catalog). To delete an app, the distributionMethod property for the app must be set to organization. You can also use this API to remove a submitted app from the review process. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void ## @@ -39,8 +39,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -53,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TeamsApp.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -69,24 +67,24 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TeamsApp.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Delete teamsApp + ## Delete an app from an organization's app catalog (the tenant app catalog). To delete an app, the distributionMethod property for the app must be set to organization. You can also use this API to remove a submitted app from the review process. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -96,15 +94,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -116,17 +114,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a teams_app_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TeamsAppItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Get teamsApps from appCatalogs diff --git a/lib/app_catalogs/teams_apps/teams_apps_request_builder.rb b/lib/app_catalogs/teams_apps/teams_apps_request_builder.rb index 4cc7b23ddd..8376b60f9e 100644 --- a/lib/app_catalogs/teams_apps/teams_apps_request_builder.rb +++ b/lib/app_catalogs/teams_apps/teams_apps_request_builder.rb @@ -38,10 +38,10 @@ def by_teams_app_id(teams_app_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/appCatalogs/teamsApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/appCatalogs/teamsApps{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## List apps from the Microsoft Teams app catalog.This includes apps from the Microsoft Teams store, as well as apps from your organization's app catalog (the tenant app catalog). To get apps from your organization's app catalog only, specify organization as the distributionMethod in the request. + ## List apps from the Microsoft Teams app catalog, including apps from the Microsoft Teams store and apps from your organization's app catalog (the tenant app catalog). To get apps from your organization's app catalog only, specify organization as the distributionMethod in the request. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of teams_app_collection_response ## @@ -50,12 +50,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TeamsAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Publish an app to the Microsoft Teams apps catalog.Specifically, this API publishes the app to your organization's catalog (the tenant app catalog);the created resource will have a distributionMethod property value of organization. The requiresReview property allows any user to submit an app for review by an administrator. Admins can approve or reject these apps via this API or the Microsoft Teams admin center. + ## Publish an app to the Microsoft Teams app catalog.Specifically, this API publishes the app to your organization's catalog (the tenant app catalog);the created resource has a distributionMethod property value of organization. The requiresReview property allows any user to submit an app for review by an administrator. Admins can approve or reject these apps via this API or the Microsoft Teams admin center. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of teams_app @@ -66,30 +65,29 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TeamsApp.create_from_discriminator_value(pn) }, error_mapping) end ## - ## List apps from the Microsoft Teams app catalog.This includes apps from the Microsoft Teams store, as well as apps from your organization's app catalog (the tenant app catalog). To get apps from your organization's app catalog only, specify organization as the distributionMethod in the request. + ## List apps from the Microsoft Teams app catalog, including apps from the Microsoft Teams store and apps from your organization's app catalog (the tenant app catalog). To get apps from your organization's app catalog only, specify organization as the distributionMethod in the request. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Publish an app to the Microsoft Teams apps catalog.Specifically, this API publishes the app to your organization's catalog (the tenant app catalog);the created resource will have a distributionMethod property value of organization. The requiresReview property allows any user to submit an app for review by an administrator. Admins can approve or reject these apps via this API or the Microsoft Teams admin center. + ## Publish an app to the Microsoft Teams app catalog.Specifically, this API publishes the app to your organization's catalog (the tenant app catalog);the created resource has a distributionMethod property value of organization. The requiresReview property allows any user to submit an app for review by an administrator. Admins can approve or reject these apps via this API or the Microsoft Teams admin center. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -97,20 +95,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a teams_apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TeamsAppsRequestBuilder.new(raw_url, @request_adapter) + end ## - # List apps from the Microsoft Teams app catalog.This includes apps from the Microsoft Teams store, as well as apps from your organization's app catalog (the tenant app catalog). To get apps from your organization's app catalog only, specify organization as the distributionMethod in the request. + # List apps from the Microsoft Teams app catalog, including apps from the Microsoft Teams store and apps from your organization's app catalog (the tenant app catalog). To get apps from your organization's app catalog only, specify organization as the distributionMethod in the request. class TeamsAppsRequestBuilderGetQueryParameters ## diff --git a/lib/application_templates/application_templates_request_builder.rb b/lib/application_templates/application_templates_request_builder.rb index 1c632699ec..693a3650bd 100644 --- a/lib/application_templates/application_templates_request_builder.rb +++ b/lib/application_templates/application_templates_request_builder.rb @@ -35,10 +35,10 @@ def by_application_template_id(application_template_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applicationTemplates{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applicationTemplates{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Retrieve a list of applicationTemplate objects from the Azure AD application gallery. + ## Retrieve a list of applicationTemplate objects from the Microsoft Entra application gallery. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of application_template_collection_response ## @@ -47,31 +47,39 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ApplicationTemplateCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Retrieve a list of applicationTemplate objects from the Azure AD application gallery. + ## Retrieve a list of applicationTemplate objects from the Microsoft Entra application gallery. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a application_templates_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ApplicationTemplatesRequestBuilder.new(raw_url, @request_adapter) + end ## - # Retrieve a list of applicationTemplate objects from the Azure AD application gallery. + # Retrieve a list of applicationTemplate objects from the Microsoft Entra application gallery. class ApplicationTemplatesRequestBuilderGetQueryParameters ## diff --git a/lib/application_templates/count/count_request_builder.rb b/lib/application_templates/count/count_request_builder.rb index 5edd1fa0c3..8e880bab67 100644 --- a/lib/application_templates/count/count_request_builder.rb +++ b/lib/application_templates/count/count_request_builder.rb @@ -18,7 +18,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applicationTemplates/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/applicationTemplates/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -30,8 +30,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -41,17 +40,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/application_templates/item/application_template_item_request_builder.rb b/lib/application_templates/item/application_template_item_request_builder.rb index db46ae9654..dc8dfa2a78 100644 --- a/lib/application_templates/item/application_template_item_request_builder.rb +++ b/lib/application_templates/item/application_template_item_request_builder.rb @@ -25,7 +25,7 @@ def instantiate() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applicationTemplates/{applicationTemplate%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applicationTemplates/{applicationTemplate%2Did}{?%24expand,%24select}") end ## ## Retrieve the properties of an applicationTemplate object. @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ApplicationTemplate.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a application_template_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ApplicationTemplateItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve the properties of an applicationTemplate object. diff --git a/lib/application_templates/item/instantiate/instantiate_post_request_body.rb b/lib/application_templates/item/instantiate/instantiate_post_request_body.rb index 5828f5c0d9..4b014bdf6b 100644 --- a/lib/application_templates/item/instantiate/instantiate_post_request_body.rb +++ b/lib/application_templates/item/instantiate/instantiate_post_request_body.rb @@ -17,22 +17,25 @@ class InstantiatePostRequestBody # The displayName property @display_name ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + # The serviceManagementReference property + @service_management_reference + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new instantiatePostRequestBody and sets the default values. + ## Instantiates a new InstantiatePostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -69,6 +72,7 @@ def display_name=(value) def get_field_deserializers() return { "displayName" => lambda {|n| @display_name = n.get_string_value() }, + "serviceManagementReference" => lambda {|n| @service_management_reference = n.get_string_value() }, } end ## @@ -79,8 +83,24 @@ def get_field_deserializers() def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? writer.write_string_value("displayName", @display_name) + writer.write_string_value("serviceManagementReference", @service_management_reference) writer.write_additional_data(@additional_data) end + ## + ## Gets the serviceManagementReference property value. The serviceManagementReference property + ## @return a string + ## + def service_management_reference + return @service_management_reference + end + ## + ## Sets the serviceManagementReference property value. The serviceManagementReference property + ## @param value Value to set for the serviceManagementReference property. + ## @return a void + ## + def service_management_reference=(value) + @service_management_reference = value + end end end end diff --git a/lib/application_templates/item/instantiate/instantiate_request_builder.rb b/lib/application_templates/item/instantiate/instantiate_request_builder.rb index 989ce2fa02..7c10c8f6fa 100644 --- a/lib/application_templates/item/instantiate/instantiate_request_builder.rb +++ b/lib/application_templates/item/instantiate/instantiate_request_builder.rb @@ -24,7 +24,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/applicationTemplates/{applicationTemplate%2Did}/instantiate") end ## - ## Add an instance of an application from the Azure AD application gallery into your directory. You can also use this API to instantiate non-gallery apps. Use the following ID for the applicationTemplate object: 8adf8e6e-67b2-4cf2-a259-e3dc5476c621. + ## Add an instance of an application from the Microsoft Entra application gallery into your directory. For non-gallery apps, use an application template with one of the following IDs to configure different single sign-on (SSO) modes like SAML SSO and password-based SSO. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of application_service_principal @@ -35,12 +35,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ApplicationServicePrincipal.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Add an instance of an application from the Azure AD application gallery into your directory. You can also use this API to instantiate non-gallery apps. Use the following ID for the applicationTemplate object: 8adf8e6e-67b2-4cf2-a259-e3dc5476c621. + ## Add an instance of an application from the Microsoft Entra application gallery into your directory. For non-gallery apps, use an application template with one of the following IDs to configure different single sign-on (SSO) modes like SAML SSO and password-based SSO. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -48,17 +47,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a instantiate_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return InstantiateRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/applications_request_builder.rb b/lib/applications/applications_request_builder.rb index 6d678342cc..611abf72a2 100644 --- a/lib/applications/applications_request_builder.rb +++ b/lib/applications/applications_request_builder.rb @@ -60,7 +60,7 @@ def by_application_id(application_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the list of applications in this organization. @@ -72,8 +72,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ApplicationCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -88,8 +87,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Application.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -99,15 +97,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -119,17 +117,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a applications_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ApplicationsRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the list of applications in this organization. diff --git a/lib/applications/count/count_request_builder.rb b/lib/applications/count/count_request_builder.rb index 932b137e45..eae16c822c 100644 --- a/lib/applications/count/count_request_builder.rb +++ b/lib/applications/count/count_request_builder.rb @@ -18,7 +18,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/applications/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -30,8 +30,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -41,17 +40,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/applications/delta/delta.rb b/lib/applications/delta/delta.rb index 0c348d20cb..8a3dc08b72 100644 --- a/lib/applications/delta/delta.rb +++ b/lib/applications/delta/delta.rb @@ -1 +1 @@ -require_relative 'delta_response' +require_relative 'delta_get_response' diff --git a/lib/applications/delta/delta_get_response.rb b/lib/applications/delta/delta_get_response.rb new file mode 100644 index 0000000000..17f06d5d7d --- /dev/null +++ b/lib/applications/delta/delta_get_response.rb @@ -0,0 +1,69 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/application' +require_relative '../../models/base_delta_function_response' +require_relative '../applications' +require_relative './delta' + +module MicrosoftGraph + module Applications + module Delta + class DeltaGetResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new DeltaGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a delta_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return DeltaGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Application.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a application + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/applications/delta/delta_request_builder.rb b/lib/applications/delta/delta_request_builder.rb index 1dfdf9264a..cf20263883 100644 --- a/lib/applications/delta/delta_request_builder.rb +++ b/lib/applications/delta/delta_request_builder.rb @@ -18,49 +18,60 @@ class DeltaRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/applications/delta(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Invoke function delta + ## Get newly created, updated, or deleted applications without performing a full read of the entire resource collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of delta_response + ## @return a Fiber of delta_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Applications::Delta::DeltaResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Applications::Delta::DeltaGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Invoke function delta + ## Get newly created, updated, or deleted applications without performing a full read of the entire resource collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a delta_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeltaRequestBuilder.new(raw_url, @request_adapter) + end ## - # Invoke function delta + # Get newly created, updated, or deleted applications without performing a full read of the entire resource collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. class DeltaRequestBuilderGetQueryParameters ## # Include count of items attr_accessor :count ## + # Expand related entities + attr_accessor :expand + ## # Filter items by property values attr_accessor :filter ## @@ -88,6 +99,8 @@ def get_query_parameter(original_name) case original_name when "count" return "%24count" + when "expand" + return "%24expand" when "filter" return "%24filter" when "orderby" diff --git a/lib/applications/delta/delta_response.rb b/lib/applications/delta/delta_response.rb deleted file mode 100644 index f1a5008a68..0000000000 --- a/lib/applications/delta/delta_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../microsoft_graph' -require_relative '../../models/application' -require_relative '../../models/base_delta_function_response' -require_relative '../applications' -require_relative './delta' - -module MicrosoftGraph - module Applications - module Delta - class DeltaResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new deltaResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a delta_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return DeltaResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Application.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a application - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end -end diff --git a/lib/applications/get_available_extension_properties/get_available_extension_properties.rb b/lib/applications/get_available_extension_properties/get_available_extension_properties.rb index b6fee576bf..ce1b642cad 100644 --- a/lib/applications/get_available_extension_properties/get_available_extension_properties.rb +++ b/lib/applications/get_available_extension_properties/get_available_extension_properties.rb @@ -1,2 +1,2 @@ require_relative 'get_available_extension_properties_post_request_body' -require_relative 'get_available_extension_properties_response' +require_relative 'get_available_extension_properties_post_response' diff --git a/lib/applications/get_available_extension_properties/get_available_extension_properties_post_request_body.rb b/lib/applications/get_available_extension_properties/get_available_extension_properties_post_request_body.rb index cfd82c9c0b..b0c7f515b8 100644 --- a/lib/applications/get_available_extension_properties/get_available_extension_properties_post_request_body.rb +++ b/lib/applications/get_available_extension_properties/get_available_extension_properties_post_request_body.rb @@ -15,22 +15,22 @@ class GetAvailableExtensionPropertiesPostRequestBody # The isSyncedFromOnPremises property @is_synced_from_on_premises ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getAvailableExtensionPropertiesPostRequestBody and sets the default values. + ## Instantiates a new GetAvailableExtensionPropertiesPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/applications/get_available_extension_properties/get_available_extension_properties_post_response.rb b/lib/applications/get_available_extension_properties/get_available_extension_properties_post_response.rb new file mode 100644 index 0000000000..dc9d1df2ff --- /dev/null +++ b/lib/applications/get_available_extension_properties/get_available_extension_properties_post_response.rb @@ -0,0 +1,69 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/base_collection_pagination_count_response' +require_relative '../../models/extension_property' +require_relative '../applications' +require_relative './get_available_extension_properties' + +module MicrosoftGraph + module Applications + module GetAvailableExtensionProperties + class GetAvailableExtensionPropertiesPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetAvailableExtensionPropertiesPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_available_extension_properties_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetAvailableExtensionPropertiesPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ExtensionProperty.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a extension_property + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/applications/get_available_extension_properties/get_available_extension_properties_request_builder.rb b/lib/applications/get_available_extension_properties/get_available_extension_properties_request_builder.rb index 2edae38c75..1d3ad52d61 100644 --- a/lib/applications/get_available_extension_properties/get_available_extension_properties_request_builder.rb +++ b/lib/applications/get_available_extension_properties/get_available_extension_properties_request_builder.rb @@ -21,10 +21,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/applications/getAvailableExtensionProperties") end ## - ## Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + ## Return all directory extension definitions that are registered in a directory, including through multitenant apps. The following entities support extension properties: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_available_extension_properties_response + ## @return a Fiber of get_available_extension_properties_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -32,12 +32,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Applications::GetAvailableExtensionProperties::GetAvailableExtensionPropertiesResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Applications::GetAvailableExtensionProperties::GetAvailableExtensionPropertiesPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + ## Return all directory extension definitions that are registered in a directory, including through multitenant apps. The following entities support extension properties: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -45,17 +44,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_available_extension_properties_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetAvailableExtensionPropertiesRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/get_available_extension_properties/get_available_extension_properties_response.rb b/lib/applications/get_available_extension_properties/get_available_extension_properties_response.rb deleted file mode 100644 index 56f65a9d28..0000000000 --- a/lib/applications/get_available_extension_properties/get_available_extension_properties_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../microsoft_graph' -require_relative '../../models/base_collection_pagination_count_response' -require_relative '../../models/extension_property' -require_relative '../applications' -require_relative './get_available_extension_properties' - -module MicrosoftGraph - module Applications - module GetAvailableExtensionProperties - class GetAvailableExtensionPropertiesResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getAvailableExtensionPropertiesResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_available_extension_properties_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetAvailableExtensionPropertiesResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ExtensionProperty.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a extension_property - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end -end diff --git a/lib/applications/get_by_ids/get_by_ids.rb b/lib/applications/get_by_ids/get_by_ids.rb index e4b0824834..131a179969 100644 --- a/lib/applications/get_by_ids/get_by_ids.rb +++ b/lib/applications/get_by_ids/get_by_ids.rb @@ -1,2 +1,2 @@ require_relative 'get_by_ids_post_request_body' -require_relative 'get_by_ids_response' +require_relative 'get_by_ids_post_response' diff --git a/lib/applications/get_by_ids/get_by_ids_post_request_body.rb b/lib/applications/get_by_ids/get_by_ids_post_request_body.rb index e1c9d39050..6d073d4578 100644 --- a/lib/applications/get_by_ids/get_by_ids_post_request_body.rb +++ b/lib/applications/get_by_ids/get_by_ids_post_request_body.rb @@ -18,22 +18,22 @@ class GetByIdsPostRequestBody # The types property @types ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getByIdsPostRequestBody and sets the default values. + ## Instantiates a new GetByIdsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/applications/get_by_ids/get_by_ids_post_response.rb b/lib/applications/get_by_ids/get_by_ids_post_response.rb new file mode 100644 index 0000000000..2f2bd90b8e --- /dev/null +++ b/lib/applications/get_by_ids/get_by_ids_post_response.rb @@ -0,0 +1,69 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/base_collection_pagination_count_response' +require_relative '../../models/directory_object' +require_relative '../applications' +require_relative './get_by_ids' + +module MicrosoftGraph + module Applications + module GetByIds + class GetByIdsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetByIdsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_by_ids_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetByIdsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a directory_object + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/applications/get_by_ids/get_by_ids_request_builder.rb b/lib/applications/get_by_ids/get_by_ids_request_builder.rb index ad10e50a42..5fcd347150 100644 --- a/lib/applications/get_by_ids/get_by_ids_request_builder.rb +++ b/lib/applications/get_by_ids/get_by_ids_request_builder.rb @@ -24,7 +24,7 @@ def initialize(path_parameters, request_adapter) ## Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_by_ids_response + ## @return a Fiber of get_by_ids_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -32,9 +32,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Applications::GetByIds::GetByIdsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Applications::GetByIds::GetByIdsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: @@ -45,17 +44,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_by_ids_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetByIdsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/get_by_ids/get_by_ids_response.rb b/lib/applications/get_by_ids/get_by_ids_response.rb deleted file mode 100644 index eb4a643f55..0000000000 --- a/lib/applications/get_by_ids/get_by_ids_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../microsoft_graph' -require_relative '../../models/base_collection_pagination_count_response' -require_relative '../../models/directory_object' -require_relative '../applications' -require_relative './get_by_ids' - -module MicrosoftGraph - module Applications - module GetByIds - class GetByIdsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getByIdsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_by_ids_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetByIdsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a directory_object - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end -end diff --git a/lib/applications/item/add_key/add_key_post_request_body.rb b/lib/applications/item/add_key/add_key_post_request_body.rb index 6f211cc98b..b09d977a3b 100644 --- a/lib/applications/item/add_key/add_key_post_request_body.rb +++ b/lib/applications/item/add_key/add_key_post_request_body.rb @@ -25,22 +25,22 @@ class AddKeyPostRequestBody # The proof property @proof ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new addKeyPostRequestBody and sets the default values. + ## Instantiates a new AddKeyPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/applications/item/add_key/add_key_request_builder.rb b/lib/applications/item/add_key/add_key_request_builder.rb index 8b4da979a9..bfa3168c75 100644 --- a/lib/applications/item/add_key/add_key_request_builder.rb +++ b/lib/applications/item/add_key/add_key_request_builder.rb @@ -24,7 +24,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/addKey") end ## - ## Add a key credential to an application. This method, along with removeKey can be used by an application to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. Applications that don’t have any existing valid certificates (no certificates have been added yet, or all certificates have expired), won’t be able to use this service action. You can use the Update application operation to perform an update instead. + ## Add a key credential to an application. This method, along with removeKey can be used by an application to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. Applications that don't have any existing valid certificates (no certificates have been added yet, or all certificates have expired), won't be able to use this service action. You can use the Update application operation to perform an update instead. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of key_credential @@ -35,12 +35,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::KeyCredential.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Add a key credential to an application. This method, along with removeKey can be used by an application to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. Applications that don’t have any existing valid certificates (no certificates have been added yet, or all certificates have expired), won’t be able to use this service action. You can use the Update application operation to perform an update instead. + ## Add a key credential to an application. This method, along with removeKey can be used by an application to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. Applications that don't have any existing valid certificates (no certificates have been added yet, or all certificates have expired), won't be able to use this service action. You can use the Update application operation to perform an update instead. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -48,17 +47,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a add_key_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AddKeyRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/item/add_password/add_password_post_request_body.rb b/lib/applications/item/add_password/add_password_post_request_body.rb index 605126243a..0461f41dfc 100644 --- a/lib/applications/item/add_password/add_password_post_request_body.rb +++ b/lib/applications/item/add_password/add_password_post_request_body.rb @@ -18,22 +18,22 @@ class AddPasswordPostRequestBody # The passwordCredential property @password_credential ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new addPasswordPostRequestBody and sets the default values. + ## Instantiates a new AddPasswordPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/applications/item/add_password/add_password_request_builder.rb b/lib/applications/item/add_password/add_password_request_builder.rb index a1e4a2978e..d14521ecec 100644 --- a/lib/applications/item/add_password/add_password_request_builder.rb +++ b/lib/applications/item/add_password/add_password_request_builder.rb @@ -24,7 +24,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/addPassword") end ## - ## Adds a strong password or secret to an application. + ## Adds a strong password or secret to an application. You can also add passwords while creating the application. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of password_credential @@ -35,12 +35,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::PasswordCredential.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Adds a strong password or secret to an application. + ## Adds a strong password or secret to an application. You can also add passwords while creating the application. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -48,17 +47,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a add_password_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AddPasswordRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/item/app_management_policies/app_management_policies_request_builder.rb b/lib/applications/item/app_management_policies/app_management_policies_request_builder.rb index bf74c383d8..bd54e8fc04 100644 --- a/lib/applications/item/app_management_policies/app_management_policies_request_builder.rb +++ b/lib/applications/item/app_management_policies/app_management_policies_request_builder.rb @@ -29,7 +29,7 @@ def ref() end ## ## Gets an item from the MicrosoftGraph.applications.item.appManagementPolicies.item collection - ## @param app_management_policy_id Unique identifier of the item + ## @param app_management_policy_id The unique identifier of appManagementPolicy ## @return a app_management_policy_item_request_builder ## def by_app_management_policy_id(app_management_policy_id) @@ -45,7 +45,7 @@ def by_app_management_policy_id(app_management_policy_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/appManagementPolicies{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/appManagementPolicies{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## The appManagementPolicy applied to this application. @@ -57,8 +57,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AppManagementPolicyCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -68,17 +67,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a app_management_policies_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AppManagementPoliciesRequestBuilder.new(raw_url, @request_adapter) + end ## # The appManagementPolicy applied to this application. diff --git a/lib/applications/item/app_management_policies/count/count_request_builder.rb b/lib/applications/item/app_management_policies/count/count_request_builder.rb index 3e1bf37948..881d32c511 100644 --- a/lib/applications/item/app_management_policies/count/count_request_builder.rb +++ b/lib/applications/item/app_management_policies/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/appManagementPolicies/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/appManagementPolicies/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/applications/item/app_management_policies/item/ref/ref_request_builder.rb b/lib/applications/item/app_management_policies/item/ref/ref_request_builder.rb index 2cc3c0d103..644eb5be6a 100644 --- a/lib/applications/item/app_management_policies/item/ref/ref_request_builder.rb +++ b/lib/applications/item/app_management_policies/item/ref/ref_request_builder.rb @@ -24,7 +24,7 @@ class RefRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/appManagementPolicies/{appManagementPolicy%2Did}/$ref{?%40id*}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/appManagementPolicies/{appManagementPolicy%2Did}/$ref") end ## ## Remove an appManagementPolicy policy object from an application or service principal object. When you remove the appManagementPolicy, the application or service principal adopts the tenant-wide tenantAppManagementPolicy setting. @@ -36,8 +36,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,38 +46,24 @@ def delete(request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end - ## - # Remove an appManagementPolicy policy object from an application or service principal object. When you remove the appManagementPolicy, the application or service principal adopts the tenant-wide tenantAppManagementPolicy setting. - class RefRequestBuilderDeleteQueryParameters - - ## - # Delete Uri - attr_accessor :id - ## - ## Maps the query parameters names to their encoded names for the URI template parsing. - ## @param original_name The original query parameter name in the class. - ## @return a string - ## - def get_query_parameter(original_name) - raise StandardError, 'original_name cannot be null' if original_name.nil? - case original_name - when "id" - return "%40id" - else - return original_name - end - end + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ref_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RefRequestBuilder.new(raw_url, @request_adapter) end end end diff --git a/lib/applications/item/app_management_policies/ref/ref_request_builder.rb b/lib/applications/item/app_management_policies/ref/ref_request_builder.rb index 66be8afd53..27a8537875 100644 --- a/lib/applications/item/app_management_policies/ref/ref_request_builder.rb +++ b/lib/applications/item/app_management_policies/ref/ref_request_builder.rb @@ -24,7 +24,20 @@ class RefRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/appManagementPolicies/$ref{?%24top,%24skip,%24search,%24filter,%24count,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/appManagementPolicies/$ref?@id={%40id}{&%24count,%24filter,%24orderby,%24search,%24skip,%24top}") + end + ## + ## Remove an appManagementPolicy policy object from an application or service principal object. When you remove the appManagementPolicy, the application or service principal adopts the tenant-wide tenantAppManagementPolicy setting. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) end ## ## The appManagementPolicy applied to this application. @@ -36,8 +49,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::StringCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,26 +64,43 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## + ## Remove an appManagementPolicy policy object from an application or service principal object. When you remove the appManagementPolicy, the application or service principal adopts the tenant-wide tenantAppManagementPolicy setting. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = '{+baseurl}/applications/{application%2Did}/appManagementPolicies/$ref?@id={%40id}' + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## ## The appManagementPolicy applied to this application. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = '{+baseurl}/applications/{application%2Did}/appManagementPolicies/$ref{?%24count,%24filter,%24orderby,%24search,%24skip,%24top}' + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -83,16 +112,49 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = '{+baseurl}/applications/{application%2Did}/appManagementPolicies/$ref' + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ref_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RefRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Remove an appManagementPolicy policy object from an application or service principal object. When you remove the appManagementPolicy, the application or service principal adopts the tenant-wide tenantAppManagementPolicy setting. + class RefRequestBuilderDeleteQueryParameters + + ## + # The delete Uri + attr_accessor :id + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "id" + return "%40id" + else + return original_name + end + end + end ## # The appManagementPolicy applied to this application. diff --git a/lib/applications/item/application_item_request_builder.rb b/lib/applications/item/application_item_request_builder.rb index 2150da9884..f8a0782030 100644 --- a/lib/applications/item/application_item_request_builder.rb +++ b/lib/applications/item/application_item_request_builder.rb @@ -11,6 +11,7 @@ require_relative './created_on_behalf_of/created_on_behalf_of_request_builder' require_relative './extension_properties/extension_properties_request_builder' require_relative './federated_identity_credentials/federated_identity_credentials_request_builder' +require_relative './federated_identity_credentials_with_name/federated_identity_credentials_with_name_request_builder' require_relative './get_member_groups/get_member_groups_request_builder' require_relative './get_member_objects/get_member_objects_request_builder' require_relative './home_realm_discovery_policies/home_realm_discovery_policies_request_builder' @@ -145,7 +146,7 @@ def unset_verified_publisher() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}{?%24expand,%24select}") end ## ## Delete an application object. When deleted, apps are moved to a temporary container and can be restored within 30 days. After that time, they are permanently deleted. @@ -157,11 +158,19 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## + ## Provides operations to manage the federatedIdentityCredentials property of the microsoft.graph.application entity. + ## @param name Alternate key of federatedIdentityCredential + ## @return a federated_identity_credentials_with_name_request_builder + ## + def federated_identity_credentials_with_name(name) + raise StandardError, 'name cannot be null' if name.nil? + return FederatedIdentityCredentialsWithNameRequestBuilder.new(@path_parameters, @request_adapter, name) + end + ## ## Get the properties and relationships of an application object. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of application @@ -171,12 +180,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Application.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Update the properties of an application object. + ## Create a new application object if it doesn't exist, or update the properties of an existing application object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of application @@ -187,8 +195,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Application.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -198,13 +205,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -214,19 +222,19 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Update the properties of an application object. + ## Create a new application object if it doesn't exist, or update the properties of an existing application object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -234,17 +242,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a application_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ApplicationItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the properties and relationships of an application object. diff --git a/lib/applications/item/check_member_groups/check_member_groups.rb b/lib/applications/item/check_member_groups/check_member_groups.rb index 938b908522..98148024fe 100644 --- a/lib/applications/item/check_member_groups/check_member_groups.rb +++ b/lib/applications/item/check_member_groups/check_member_groups.rb @@ -1,2 +1,2 @@ require_relative 'check_member_groups_post_request_body' -require_relative 'check_member_groups_response' +require_relative 'check_member_groups_post_response' diff --git a/lib/applications/item/check_member_groups/check_member_groups_post_request_body.rb b/lib/applications/item/check_member_groups/check_member_groups_post_request_body.rb index 39e524886f..a30e21c86a 100644 --- a/lib/applications/item/check_member_groups/check_member_groups_post_request_body.rb +++ b/lib/applications/item/check_member_groups/check_member_groups_post_request_body.rb @@ -17,22 +17,22 @@ class CheckMemberGroupsPostRequestBody # The groupIds property @group_ids ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new checkMemberGroupsPostRequestBody and sets the default values. + ## Instantiates a new CheckMemberGroupsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/applications/item/check_member_groups/check_member_groups_post_response.rb b/lib/applications/item/check_member_groups/check_member_groups_post_response.rb new file mode 100644 index 0000000000..874e1173c7 --- /dev/null +++ b/lib/applications/item/check_member_groups/check_member_groups_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../applications' +require_relative '../item' +require_relative './check_member_groups' + +module MicrosoftGraph + module Applications + module Item + module CheckMemberGroups + class CheckMemberGroupsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new CheckMemberGroupsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a check_member_groups_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CheckMemberGroupsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/applications/item/check_member_groups/check_member_groups_request_builder.rb b/lib/applications/item/check_member_groups/check_member_groups_request_builder.rb index b6026177e7..64f62e1de3 100644 --- a/lib/applications/item/check_member_groups/check_member_groups_request_builder.rb +++ b/lib/applications/item/check_member_groups/check_member_groups_request_builder.rb @@ -23,10 +23,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/checkMemberGroups") end ## - ## Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + ## Check for membership in a specified list of group IDs, and return from that list the IDs of groups where a specified object is a member. The specified object can be of one of the following types:- user- group- service principal- organizational contact- device- directory object This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of check_member_groups_response + ## @return a Fiber of check_member_groups_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,12 +34,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Applications::Item::CheckMemberGroups::CheckMemberGroupsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Applications::Item::CheckMemberGroups::CheckMemberGroupsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + ## Check for membership in a specified list of group IDs, and return from that list the IDs of groups where a specified object is a member. The specified object can be of one of the following types:- user- group- service principal- organizational contact- device- directory object This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a check_member_groups_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CheckMemberGroupsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/item/check_member_groups/check_member_groups_response.rb b/lib/applications/item/check_member_groups/check_member_groups_response.rb deleted file mode 100644 index b38c29521c..0000000000 --- a/lib/applications/item/check_member_groups/check_member_groups_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../applications' -require_relative '../item' -require_relative './check_member_groups' - -module MicrosoftGraph - module Applications - module Item - module CheckMemberGroups - class CheckMemberGroupsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new checkMemberGroupsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a check_member_groups_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return CheckMemberGroupsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/applications/item/check_member_objects/check_member_objects.rb b/lib/applications/item/check_member_objects/check_member_objects.rb index 67fbf971e7..1826285d49 100644 --- a/lib/applications/item/check_member_objects/check_member_objects.rb +++ b/lib/applications/item/check_member_objects/check_member_objects.rb @@ -1,2 +1,2 @@ require_relative 'check_member_objects_post_request_body' -require_relative 'check_member_objects_response' +require_relative 'check_member_objects_post_response' diff --git a/lib/applications/item/check_member_objects/check_member_objects_post_request_body.rb b/lib/applications/item/check_member_objects/check_member_objects_post_request_body.rb index e8c83db13f..5356d095ab 100644 --- a/lib/applications/item/check_member_objects/check_member_objects_post_request_body.rb +++ b/lib/applications/item/check_member_objects/check_member_objects_post_request_body.rb @@ -17,22 +17,22 @@ class CheckMemberObjectsPostRequestBody # The ids property @ids ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new checkMemberObjectsPostRequestBody and sets the default values. + ## Instantiates a new CheckMemberObjectsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/applications/item/check_member_objects/check_member_objects_post_response.rb b/lib/applications/item/check_member_objects/check_member_objects_post_response.rb new file mode 100644 index 0000000000..bdd7daa4a2 --- /dev/null +++ b/lib/applications/item/check_member_objects/check_member_objects_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../applications' +require_relative '../item' +require_relative './check_member_objects' + +module MicrosoftGraph + module Applications + module Item + module CheckMemberObjects + class CheckMemberObjectsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new CheckMemberObjectsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a check_member_objects_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CheckMemberObjectsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/applications/item/check_member_objects/check_member_objects_request_builder.rb b/lib/applications/item/check_member_objects/check_member_objects_request_builder.rb index 7244f6e072..3b4ed99340 100644 --- a/lib/applications/item/check_member_objects/check_member_objects_request_builder.rb +++ b/lib/applications/item/check_member_objects/check_member_objects_request_builder.rb @@ -26,7 +26,7 @@ def initialize(path_parameters, request_adapter) ## Invoke action checkMemberObjects ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of check_member_objects_response + ## @return a Fiber of check_member_objects_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,9 +34,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Applications::Item::CheckMemberObjects::CheckMemberObjectsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Applications::Item::CheckMemberObjects::CheckMemberObjectsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Invoke action checkMemberObjects @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a check_member_objects_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CheckMemberObjectsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/item/check_member_objects/check_member_objects_response.rb b/lib/applications/item/check_member_objects/check_member_objects_response.rb deleted file mode 100644 index e6b325c386..0000000000 --- a/lib/applications/item/check_member_objects/check_member_objects_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../applications' -require_relative '../item' -require_relative './check_member_objects' - -module MicrosoftGraph - module Applications - module Item - module CheckMemberObjects - class CheckMemberObjectsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new checkMemberObjectsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a check_member_objects_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return CheckMemberObjectsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/applications/item/created_on_behalf_of/created_on_behalf_of_request_builder.rb b/lib/applications/item/created_on_behalf_of/created_on_behalf_of_request_builder.rb index a0e3a37ec4..6f4b98b350 100644 --- a/lib/applications/item/created_on_behalf_of/created_on_behalf_of_request_builder.rb +++ b/lib/applications/item/created_on_behalf_of/created_on_behalf_of_request_builder.rb @@ -21,7 +21,7 @@ class CreatedOnBehalfOfRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestB ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/createdOnBehalfOf{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/createdOnBehalfOf{?%24expand,%24select}") end ## ## Supports $filter (/$count eq 0, /$count ne 0). Read-only. @@ -33,8 +33,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -44,17 +43,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a created_on_behalf_of_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CreatedOnBehalfOfRequestBuilder.new(raw_url, @request_adapter) + end ## # Supports $filter (/$count eq 0, /$count ne 0). Read-only. diff --git a/lib/applications/item/extension_properties/count/count_request_builder.rb b/lib/applications/item/extension_properties/count/count_request_builder.rb index 8346176f7e..bc6a0cb65b 100644 --- a/lib/applications/item/extension_properties/count/count_request_builder.rb +++ b/lib/applications/item/extension_properties/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/extensionProperties/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/extensionProperties/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/applications/item/extension_properties/extension_properties_request_builder.rb b/lib/applications/item/extension_properties/extension_properties_request_builder.rb index c7fca0a4e1..ee5ff4f53b 100644 --- a/lib/applications/item/extension_properties/extension_properties_request_builder.rb +++ b/lib/applications/item/extension_properties/extension_properties_request_builder.rb @@ -40,7 +40,7 @@ def by_extension_property_id(extension_property_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/extensionProperties{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/extensionProperties{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Retrieve the list of directory extension definitions, represented by extensionProperty objects on an application. @@ -52,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExtensionPropertyCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -68,8 +67,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExtensionProperty.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -79,15 +77,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -99,17 +97,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a extension_properties_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ExtensionPropertiesRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve the list of directory extension definitions, represented by extensionProperty objects on an application. diff --git a/lib/applications/item/extension_properties/item/extension_property_item_request_builder.rb b/lib/applications/item/extension_properties/item/extension_property_item_request_builder.rb index 0e60b6cc6f..bbab718b7b 100644 --- a/lib/applications/item/extension_properties/item/extension_property_item_request_builder.rb +++ b/lib/applications/item/extension_properties/item/extension_property_item_request_builder.rb @@ -23,7 +23,7 @@ class ExtensionPropertyItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequ ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/extensionProperties/{extensionProperty%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/extensionProperties/{extensionProperty%2Did}{?%24expand,%24select}") end ## ## Delete a directory extension definition represented by an extensionProperty object. You can delete only directory extensions that aren't synced from on-premises active directory (AD). @@ -35,8 +35,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExtensionProperty.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -65,8 +63,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExtensionProperty.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,13 +73,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -92,15 +90,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,17 +110,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a extension_property_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ExtensionPropertyItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read a directory extension definition represented by an extensionProperty object. diff --git a/lib/applications/item/federated_identity_credentials/count/count_request_builder.rb b/lib/applications/item/federated_identity_credentials/count/count_request_builder.rb index 446197d792..15d75055e3 100644 --- a/lib/applications/item/federated_identity_credentials/count/count_request_builder.rb +++ b/lib/applications/item/federated_identity_credentials/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/federatedIdentityCredentials/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/federatedIdentityCredentials/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/applications/item/federated_identity_credentials/federated_identity_credentials_request_builder.rb b/lib/applications/item/federated_identity_credentials/federated_identity_credentials_request_builder.rb index c279723e80..8adb4024f4 100644 --- a/lib/applications/item/federated_identity_credentials/federated_identity_credentials_request_builder.rb +++ b/lib/applications/item/federated_identity_credentials/federated_identity_credentials_request_builder.rb @@ -40,7 +40,7 @@ def by_federated_identity_credential_id(federated_identity_credential_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/federatedIdentityCredentials{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/federatedIdentityCredentials{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get a list of the federatedIdentityCredential objects and their properties. @@ -52,12 +52,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::FederatedIdentityCredentialCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Create a new federatedIdentityCredential object for an application. By configuring a trust relationship between your Azure AD application registration and the identity provider for your compute platform, you can use tokens issued by that platform to authenticate with Microsoft identity platform and call APIs in the Microsoft ecosystem. Maximum of 20 objects can be added to an application. + ## Create a new federatedIdentityCredential object for an application. By configuring a trust relationship between your Microsoft Entra application registration and the identity provider for your compute platform, you can use tokens issued by that platform to authenticate with Microsoft identity platform and call APIs in the Microsoft ecosystem. Maximum of 20 objects can be added to an application. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of federated_identity_credential @@ -68,8 +67,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::FederatedIdentityCredential.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -79,19 +77,19 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Create a new federatedIdentityCredential object for an application. By configuring a trust relationship between your Azure AD application registration and the identity provider for your compute platform, you can use tokens issued by that platform to authenticate with Microsoft identity platform and call APIs in the Microsoft ecosystem. Maximum of 20 objects can be added to an application. + ## Create a new federatedIdentityCredential object for an application. By configuring a trust relationship between your Microsoft Entra application registration and the identity provider for your compute platform, you can use tokens issued by that platform to authenticate with Microsoft identity platform and call APIs in the Microsoft ecosystem. Maximum of 20 objects can be added to an application. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -99,17 +97,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a federated_identity_credentials_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return FederatedIdentityCredentialsRequestBuilder.new(raw_url, @request_adapter) + end ## # Get a list of the federatedIdentityCredential objects and their properties. diff --git a/lib/applications/item/federated_identity_credentials/item/federated_identity_credential_item_request_builder.rb b/lib/applications/item/federated_identity_credentials/item/federated_identity_credential_item_request_builder.rb index 6b34c0a8de..5b200936a1 100644 --- a/lib/applications/item/federated_identity_credentials/item/federated_identity_credential_item_request_builder.rb +++ b/lib/applications/item/federated_identity_credentials/item/federated_identity_credential_item_request_builder.rb @@ -23,7 +23,7 @@ class FederatedIdentityCredentialItemRequestBuilder < MicrosoftKiotaAbstractions ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/federatedIdentityCredentials/{federatedIdentityCredential%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/federatedIdentityCredentials/{federatedIdentityCredential%2Did}{?%24expand,%24select}") end ## ## Delete a federatedIdentityCredential object from an application. @@ -35,8 +35,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,12 +48,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::FederatedIdentityCredential.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Update the properties of a federatedIdentityCredential object. + ## Create a new federatedIdentityCredential object for an application if it doesn't exist, or update the properties of an existing federatedIdentityCredential object. By configuring a trust relationship between your Microsoft Entra application registration and the identity provider for your compute platform, you can use tokens issued by that platform to authenticate with Microsoft identity platform and call APIs in the Microsoft ecosystem. Maximum of 20 objects can be added to an application. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of federated_identity_credential @@ -65,8 +63,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::FederatedIdentityCredential.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,13 +73,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -92,19 +90,19 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Update the properties of a federatedIdentityCredential object. + ## Create a new federatedIdentityCredential object for an application if it doesn't exist, or update the properties of an existing federatedIdentityCredential object. By configuring a trust relationship between your Microsoft Entra application registration and the identity provider for your compute platform, you can use tokens issued by that platform to authenticate with Microsoft identity platform and call APIs in the Microsoft ecosystem. Maximum of 20 objects can be added to an application. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -112,17 +110,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a federated_identity_credential_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return FederatedIdentityCredentialItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read the properties and relationships of a federatedIdentityCredential object. diff --git a/lib/groups/item/calendar/calendar_view/item/dismiss_reminder/dismiss_reminder.rb b/lib/applications/item/federated_identity_credentials_with_name/federated_identity_credentials_with_name.rb similarity index 100% rename from lib/groups/item/calendar/calendar_view/item/dismiss_reminder/dismiss_reminder.rb rename to lib/applications/item/federated_identity_credentials_with_name/federated_identity_credentials_with_name.rb diff --git a/lib/applications/item/federated_identity_credentials_with_name/federated_identity_credentials_with_name_request_builder.rb b/lib/applications/item/federated_identity_credentials_with_name/federated_identity_credentials_with_name_request_builder.rb new file mode 100644 index 0000000000..7b779c6290 --- /dev/null +++ b/lib/applications/item/federated_identity_credentials_with_name/federated_identity_credentials_with_name_request_builder.rb @@ -0,0 +1,164 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/federated_identity_credential' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../applications' +require_relative '../item' +require_relative './federated_identity_credentials_with_name' + +module MicrosoftGraph + module Applications + module Item + module FederatedIdentityCredentialsWithName + ## + # Provides operations to manage the federatedIdentityCredentials property of the microsoft.graph.application entity. + class FederatedIdentityCredentialsWithNameRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new FederatedIdentityCredentialsWithNameRequestBuilder and sets the default values. + ## @param name Alternate key of federatedIdentityCredential + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter, name=nil) + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/federatedIdentityCredentials(name='{name}'){?%24expand,%24select}") + end + ## + ## Delete a federatedIdentityCredential object from an application. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Read the properties and relationships of a federatedIdentityCredential object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of federated_identity_credential + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::FederatedIdentityCredential.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create a new federatedIdentityCredential object for an application if it doesn't exist, or update the properties of an existing federatedIdentityCredential object. By configuring a trust relationship between your Microsoft Entra application registration and the identity provider for your compute platform, you can use tokens issued by that platform to authenticate with Microsoft identity platform and call APIs in the Microsoft ecosystem. Maximum of 20 objects can be added to an application. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of federated_identity_credential + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::FederatedIdentityCredential.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete a federatedIdentityCredential object from an application. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Read the properties and relationships of a federatedIdentityCredential object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create a new federatedIdentityCredential object for an application if it doesn't exist, or update the properties of an existing federatedIdentityCredential object. By configuring a trust relationship between your Microsoft Entra application registration and the identity provider for your compute platform, you can use tokens issued by that platform to authenticate with Microsoft identity platform and call APIs in the Microsoft ecosystem. Maximum of 20 objects can be added to an application. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a federated_identity_credentials_with_name_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return FederatedIdentityCredentialsWithNameRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Read the properties and relationships of a federatedIdentityCredential object. + class FederatedIdentityCredentialsWithNameRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/applications/item/get_member_groups/get_member_groups.rb b/lib/applications/item/get_member_groups/get_member_groups.rb index 0a25b012ea..9190b99738 100644 --- a/lib/applications/item/get_member_groups/get_member_groups.rb +++ b/lib/applications/item/get_member_groups/get_member_groups.rb @@ -1,2 +1,2 @@ require_relative 'get_member_groups_post_request_body' -require_relative 'get_member_groups_response' +require_relative 'get_member_groups_post_response' diff --git a/lib/applications/item/get_member_groups/get_member_groups_post_request_body.rb b/lib/applications/item/get_member_groups/get_member_groups_post_request_body.rb index b6d20c734d..b7e7e5e863 100644 --- a/lib/applications/item/get_member_groups/get_member_groups_post_request_body.rb +++ b/lib/applications/item/get_member_groups/get_member_groups_post_request_body.rb @@ -17,22 +17,22 @@ class GetMemberGroupsPostRequestBody # The securityEnabledOnly property @security_enabled_only ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getMemberGroupsPostRequestBody and sets the default values. + ## Instantiates a new GetMemberGroupsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/applications/item/get_member_groups/get_member_groups_post_response.rb b/lib/applications/item/get_member_groups/get_member_groups_post_response.rb new file mode 100644 index 0000000000..b8a9fc48cb --- /dev/null +++ b/lib/applications/item/get_member_groups/get_member_groups_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../applications' +require_relative '../item' +require_relative './get_member_groups' + +module MicrosoftGraph + module Applications + module Item + module GetMemberGroups + class GetMemberGroupsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetMemberGroupsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_member_groups_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetMemberGroupsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/applications/item/get_member_groups/get_member_groups_request_builder.rb b/lib/applications/item/get_member_groups/get_member_groups_request_builder.rb index be6feaf0ff..999b784698 100644 --- a/lib/applications/item/get_member_groups/get_member_groups_request_builder.rb +++ b/lib/applications/item/get_member_groups/get_member_groups_request_builder.rb @@ -23,10 +23,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/getMemberGroups") end ## - ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. + ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the DirectoryResultSizeLimitExceeded error code. If you get the DirectoryResultSizeLimitExceeded error code, use the List group transitive memberOf API instead. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_member_groups_response + ## @return a Fiber of get_member_groups_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,12 +34,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Applications::Item::GetMemberGroups::GetMemberGroupsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Applications::Item::GetMemberGroups::GetMemberGroupsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. + ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the DirectoryResultSizeLimitExceeded error code. If you get the DirectoryResultSizeLimitExceeded error code, use the List group transitive memberOf API instead. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_member_groups_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetMemberGroupsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/item/get_member_groups/get_member_groups_response.rb b/lib/applications/item/get_member_groups/get_member_groups_response.rb deleted file mode 100644 index f6ee31caf9..0000000000 --- a/lib/applications/item/get_member_groups/get_member_groups_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../applications' -require_relative '../item' -require_relative './get_member_groups' - -module MicrosoftGraph - module Applications - module Item - module GetMemberGroups - class GetMemberGroupsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getMemberGroupsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_member_groups_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetMemberGroupsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/applications/item/get_member_objects/get_member_objects.rb b/lib/applications/item/get_member_objects/get_member_objects.rb index 40edad6b9e..f7a486b0f9 100644 --- a/lib/applications/item/get_member_objects/get_member_objects.rb +++ b/lib/applications/item/get_member_objects/get_member_objects.rb @@ -1,2 +1,2 @@ require_relative 'get_member_objects_post_request_body' -require_relative 'get_member_objects_response' +require_relative 'get_member_objects_post_response' diff --git a/lib/applications/item/get_member_objects/get_member_objects_post_request_body.rb b/lib/applications/item/get_member_objects/get_member_objects_post_request_body.rb index 97b1f5e86f..69576268c6 100644 --- a/lib/applications/item/get_member_objects/get_member_objects_post_request_body.rb +++ b/lib/applications/item/get_member_objects/get_member_objects_post_request_body.rb @@ -17,22 +17,22 @@ class GetMemberObjectsPostRequestBody # The securityEnabledOnly property @security_enabled_only ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getMemberObjectsPostRequestBody and sets the default values. + ## Instantiates a new GetMemberObjectsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/applications/item/get_member_objects/get_member_objects_post_response.rb b/lib/applications/item/get_member_objects/get_member_objects_post_response.rb new file mode 100644 index 0000000000..8251ae3162 --- /dev/null +++ b/lib/applications/item/get_member_objects/get_member_objects_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../applications' +require_relative '../item' +require_relative './get_member_objects' + +module MicrosoftGraph + module Applications + module Item + module GetMemberObjects + class GetMemberObjectsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetMemberObjectsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_member_objects_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetMemberObjectsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/applications/item/get_member_objects/get_member_objects_request_builder.rb b/lib/applications/item/get_member_objects/get_member_objects_request_builder.rb index 4e48ffae4c..2e54f76673 100644 --- a/lib/applications/item/get_member_objects/get_member_objects_request_builder.rb +++ b/lib/applications/item/get_member_objects/get_member_objects_request_builder.rb @@ -23,10 +23,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/getMemberObjects") end ## - ## Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + ## Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:- user- group- service principal- organizational contact- device- directory object This function is transitive. Only users and role-enabled groups can be members of directory roles. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_member_objects_response + ## @return a Fiber of get_member_objects_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,12 +34,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Applications::Item::GetMemberObjects::GetMemberObjectsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Applications::Item::GetMemberObjects::GetMemberObjectsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + ## Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:- user- group- service principal- organizational contact- device- directory object This function is transitive. Only users and role-enabled groups can be members of directory roles. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_member_objects_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetMemberObjectsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/item/get_member_objects/get_member_objects_response.rb b/lib/applications/item/get_member_objects/get_member_objects_response.rb deleted file mode 100644 index 06241de551..0000000000 --- a/lib/applications/item/get_member_objects/get_member_objects_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../applications' -require_relative '../item' -require_relative './get_member_objects' - -module MicrosoftGraph - module Applications - module Item - module GetMemberObjects - class GetMemberObjectsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getMemberObjectsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_member_objects_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetMemberObjectsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/applications/item/home_realm_discovery_policies/count/count_request_builder.rb b/lib/applications/item/home_realm_discovery_policies/count/count_request_builder.rb index 5879c12c7a..40f118d13a 100644 --- a/lib/applications/item/home_realm_discovery_policies/count/count_request_builder.rb +++ b/lib/applications/item/home_realm_discovery_policies/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/homeRealmDiscoveryPolicies/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/homeRealmDiscoveryPolicies/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/applications/item/home_realm_discovery_policies/home_realm_discovery_policies_request_builder.rb b/lib/applications/item/home_realm_discovery_policies/home_realm_discovery_policies_request_builder.rb index 3b9ccf7b58..ebc4b71a5f 100644 --- a/lib/applications/item/home_realm_discovery_policies/home_realm_discovery_policies_request_builder.rb +++ b/lib/applications/item/home_realm_discovery_policies/home_realm_discovery_policies_request_builder.rb @@ -39,7 +39,7 @@ def by_home_realm_discovery_policy_id(home_realm_discovery_policy_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/homeRealmDiscoveryPolicies{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/homeRealmDiscoveryPolicies{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get homeRealmDiscoveryPolicies from applications @@ -51,8 +51,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::HomeRealmDiscoveryPolicyCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -62,17 +61,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a home_realm_discovery_policies_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return HomeRealmDiscoveryPoliciesRequestBuilder.new(raw_url, @request_adapter) + end ## # Get homeRealmDiscoveryPolicies from applications diff --git a/lib/applications/item/home_realm_discovery_policies/item/home_realm_discovery_policy_item_request_builder.rb b/lib/applications/item/home_realm_discovery_policies/item/home_realm_discovery_policy_item_request_builder.rb index ee2d746e1a..52de1e6fff 100644 --- a/lib/applications/item/home_realm_discovery_policies/item/home_realm_discovery_policy_item_request_builder.rb +++ b/lib/applications/item/home_realm_discovery_policies/item/home_realm_discovery_policy_item_request_builder.rb @@ -23,7 +23,7 @@ class HomeRealmDiscoveryPolicyItemRequestBuilder < MicrosoftKiotaAbstractions::B ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/homeRealmDiscoveryPolicies/{homeRealmDiscoveryPolicy%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/homeRealmDiscoveryPolicies/{homeRealmDiscoveryPolicy%2Did}{?%24expand,%24select}") end ## ## Get homeRealmDiscoveryPolicies from applications @@ -35,8 +35,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::HomeRealmDiscoveryPolicy.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -46,17 +45,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a home_realm_discovery_policy_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return HomeRealmDiscoveryPolicyItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Get homeRealmDiscoveryPolicies from applications diff --git a/lib/applications/item/logo/logo_request_builder.rb b/lib/applications/item/logo/logo_request_builder.rb index c863f875f1..32774b90ab 100644 --- a/lib/applications/item/logo/logo_request_builder.rb +++ b/lib/applications/item/logo/logo_request_builder.rb @@ -25,6 +25,19 @@ def initialize(path_parameters, request_adapter) ## ## The main logo for the application. Not nullable. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The main logo for the application. Not nullable. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of binary ## def get(request_configuration=nil) @@ -32,8 +45,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -48,8 +60,7 @@ def put(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -57,15 +68,33 @@ def put(body, request_configuration=nil) ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## - def to_get_request_information(request_configuration=nil) + def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end request_info.url_template = @url_template request_info.path_parameters = @path_parameters - request_info.http_method = :GET + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The main logo for the application. Not nullable. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end ## @@ -77,16 +106,26 @@ def to_get_request_information(request_configuration=nil) def to_put_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PUT unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "", body) + request_info.set_content_from_parsable(@request_adapter, 'application/octet-stream', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PUT + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a logo_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return LogoRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/item/owners/count/count_request_builder.rb b/lib/applications/item/owners/count/count_request_builder.rb index 3081760675..14610c55d9 100644 --- a/lib/applications/item/owners/count/count_request_builder.rb +++ b/lib/applications/item/owners/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/applications/item/owners/graph_app_role_assignment/count/count_request_builder.rb b/lib/applications/item/owners/graph_app_role_assignment/count/count_request_builder.rb index 1b5ad90d14..6d7ea2c959 100644 --- a/lib/applications/item/owners/graph_app_role_assignment/count/count_request_builder.rb +++ b/lib/applications/item/owners/graph_app_role_assignment/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/graph.appRoleAssignment/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/graph.appRoleAssignment/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/applications/item/owners/graph_app_role_assignment/graph_app_role_assignment_request_builder.rb b/lib/applications/item/owners/graph_app_role_assignment/graph_app_role_assignment_request_builder.rb index 6008f699c7..2aff686e08 100644 --- a/lib/applications/item/owners/graph_app_role_assignment/graph_app_role_assignment_request_builder.rb +++ b/lib/applications/item/owners/graph_app_role_assignment/graph_app_role_assignment_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/graph.appRoleAssignment{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/graph.appRoleAssignment{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.appRoleAssignment in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AppRoleAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_app_role_assignment_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphAppRoleAssignmentRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.appRoleAssignment in the microsoft.graph.directoryObject collection diff --git a/lib/applications/item/owners/graph_endpoint/count/count_request_builder.rb b/lib/applications/item/owners/graph_endpoint/count/count_request_builder.rb index c29b81f833..8655def82b 100644 --- a/lib/applications/item/owners/graph_endpoint/count/count_request_builder.rb +++ b/lib/applications/item/owners/graph_endpoint/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/graph.endpoint/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/graph.endpoint/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/applications/item/owners/graph_endpoint/graph_endpoint_request_builder.rb b/lib/applications/item/owners/graph_endpoint/graph_endpoint_request_builder.rb index ff42bf7241..75bf27ae76 100644 --- a/lib/applications/item/owners/graph_endpoint/graph_endpoint_request_builder.rb +++ b/lib/applications/item/owners/graph_endpoint/graph_endpoint_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/graph.endpoint{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/graph.endpoint{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.endpoint in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::EndpointCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_endpoint_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphEndpointRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.endpoint in the microsoft.graph.directoryObject collection diff --git a/lib/applications/item/owners/graph_service_principal/count/count_request_builder.rb b/lib/applications/item/owners/graph_service_principal/count/count_request_builder.rb index a20bd13c9f..ade69eff41 100644 --- a/lib/applications/item/owners/graph_service_principal/count/count_request_builder.rb +++ b/lib/applications/item/owners/graph_service_principal/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/graph.servicePrincipal/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/graph.servicePrincipal/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/applications/item/owners/graph_service_principal/graph_service_principal_request_builder.rb b/lib/applications/item/owners/graph_service_principal/graph_service_principal_request_builder.rb index fe483c3dbf..e8e0838551 100644 --- a/lib/applications/item/owners/graph_service_principal/graph_service_principal_request_builder.rb +++ b/lib/applications/item/owners/graph_service_principal/graph_service_principal_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/graph.servicePrincipal{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/graph.servicePrincipal{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.servicePrincipal in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServicePrincipalCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_service_principal_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphServicePrincipalRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.servicePrincipal in the microsoft.graph.directoryObject collection diff --git a/lib/applications/item/owners/graph_user/count/count_request_builder.rb b/lib/applications/item/owners/graph_user/count/count_request_builder.rb index 55ba6a2088..c491c1e96b 100644 --- a/lib/applications/item/owners/graph_user/count/count_request_builder.rb +++ b/lib/applications/item/owners/graph_user/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/graph.user/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/graph.user/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/applications/item/owners/graph_user/graph_user_request_builder.rb b/lib/applications/item/owners/graph_user/graph_user_request_builder.rb index 0480310489..ac0fdec414 100644 --- a/lib/applications/item/owners/graph_user/graph_user_request_builder.rb +++ b/lib/applications/item/owners/graph_user/graph_user_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/graph.user{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/graph.user{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.user in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_user_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphUserRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.user in the microsoft.graph.directoryObject collection diff --git a/lib/applications/item/owners/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.rb b/lib/applications/item/owners/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.rb index c8d3f0530e..25420a4490 100644 --- a/lib/applications/item/owners/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.rb +++ b/lib/applications/item/owners/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.rb @@ -25,7 +25,7 @@ class GraphAppRoleAssignmentRequestBuilder < MicrosoftKiotaAbstractions::BaseReq ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/{directoryObject%2Did}/graph.appRoleAssignment{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/{directoryObject%2Did}/graph.appRoleAssignment{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.appRoleAssignment @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AppRoleAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_app_role_assignment_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphAppRoleAssignmentRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.appRoleAssignment diff --git a/lib/applications/item/owners/item/graph_endpoint/graph_endpoint_request_builder.rb b/lib/applications/item/owners/item/graph_endpoint/graph_endpoint_request_builder.rb index 8846096ade..881502f7d2 100644 --- a/lib/applications/item/owners/item/graph_endpoint/graph_endpoint_request_builder.rb +++ b/lib/applications/item/owners/item/graph_endpoint/graph_endpoint_request_builder.rb @@ -25,7 +25,7 @@ class GraphEndpointRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuild ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/{directoryObject%2Did}/graph.endpoint{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/{directoryObject%2Did}/graph.endpoint{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.endpoint @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Endpoint.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_endpoint_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphEndpointRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.endpoint diff --git a/lib/applications/item/owners/item/graph_service_principal/graph_service_principal_request_builder.rb b/lib/applications/item/owners/item/graph_service_principal/graph_service_principal_request_builder.rb index d64cdf2bf5..6468ea7736 100644 --- a/lib/applications/item/owners/item/graph_service_principal/graph_service_principal_request_builder.rb +++ b/lib/applications/item/owners/item/graph_service_principal/graph_service_principal_request_builder.rb @@ -25,7 +25,7 @@ class GraphServicePrincipalRequestBuilder < MicrosoftKiotaAbstractions::BaseRequ ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/{directoryObject%2Did}/graph.servicePrincipal{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/{directoryObject%2Did}/graph.servicePrincipal{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.servicePrincipal @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServicePrincipal.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_service_principal_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphServicePrincipalRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.servicePrincipal diff --git a/lib/applications/item/owners/item/graph_user/graph_user_request_builder.rb b/lib/applications/item/owners/item/graph_user/graph_user_request_builder.rb index 0b0c42e552..c20b053b73 100644 --- a/lib/applications/item/owners/item/graph_user/graph_user_request_builder.rb +++ b/lib/applications/item/owners/item/graph_user/graph_user_request_builder.rb @@ -25,7 +25,7 @@ class GraphUserRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/{directoryObject%2Did}/graph.user{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/{directoryObject%2Did}/graph.user{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.user @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::User.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_user_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphUserRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.user diff --git a/lib/applications/item/owners/item/ref/ref_request_builder.rb b/lib/applications/item/owners/item/ref/ref_request_builder.rb index c5dd67297f..1ce3aa60f8 100644 --- a/lib/applications/item/owners/item/ref/ref_request_builder.rb +++ b/lib/applications/item/owners/item/ref/ref_request_builder.rb @@ -24,7 +24,7 @@ class RefRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/{directoryObject%2Did}/$ref{?%40id*}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/{directoryObject%2Did}/$ref") end ## ## Remove an owner from an application. As a recommended best practice, apps should have at least two owners. @@ -36,8 +36,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,38 +46,24 @@ def delete(request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end - ## - # Remove an owner from an application. As a recommended best practice, apps should have at least two owners. - class RefRequestBuilderDeleteQueryParameters - - ## - # Delete Uri - attr_accessor :id - ## - ## Maps the query parameters names to their encoded names for the URI template parsing. - ## @param original_name The original query parameter name in the class. - ## @return a string - ## - def get_query_parameter(original_name) - raise StandardError, 'original_name cannot be null' if original_name.nil? - case original_name - when "id" - return "%40id" - else - return original_name - end - end + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ref_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RefRequestBuilder.new(raw_url, @request_adapter) end end end diff --git a/lib/applications/item/owners/owners_request_builder.rb b/lib/applications/item/owners/owners_request_builder.rb index 77d0b4b34b..3439c3a6be 100644 --- a/lib/applications/item/owners/owners_request_builder.rb +++ b/lib/applications/item/owners/owners_request_builder.rb @@ -53,7 +53,7 @@ def ref() end ## ## Gets an item from the MicrosoftGraph.applications.item.owners.item collection - ## @param directory_object_id Unique identifier of the item + ## @param directory_object_id The unique identifier of directoryObject ## @return a directory_object_item_request_builder ## def by_directory_object_id(directory_object_id) @@ -69,10 +69,10 @@ def by_directory_object_id(directory_object_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Directory objects that are owners of the application. Read-only. Nullable. Supports $expand, $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1), and $select nested in $expand. + ## Retrieve a list of owners for an application that are directoryObject types. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_object_collection_response ## @@ -81,31 +81,39 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObjectCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Directory objects that are owners of the application. Read-only. Nullable. Supports $expand, $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1), and $select nested in $expand. + ## Retrieve a list of owners for an application that are directoryObject types. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a owners_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return OwnersRequestBuilder.new(raw_url, @request_adapter) + end ## - # Directory objects that are owners of the application. Read-only. Nullable. Supports $expand, $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1), and $select nested in $expand. + # Retrieve a list of owners for an application that are directoryObject types. class OwnersRequestBuilderGetQueryParameters ## diff --git a/lib/applications/item/owners/ref/ref_request_builder.rb b/lib/applications/item/owners/ref/ref_request_builder.rb index fae7573514..04b413117e 100644 --- a/lib/applications/item/owners/ref/ref_request_builder.rb +++ b/lib/applications/item/owners/ref/ref_request_builder.rb @@ -24,10 +24,23 @@ class RefRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/$ref{?%24top,%24skip,%24search,%24filter,%24count,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/owners/$ref?@id={%40id}{&%24count,%24filter,%24orderby,%24search,%24skip,%24top}") end ## - ## Directory objects that are owners of the application. Read-only. Nullable. Supports $expand, $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1), and $select nested in $expand. + ## Remove an owner from an application. As a recommended best practice, apps should have at least two owners. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Retrieve a list of owners for an application that are directoryObject types. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of string_collection_response ## @@ -36,12 +49,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::StringCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Add an owner to an application by posting to the owners collection. + ## Add an owner to an application. Application owners can be individual users, the associated service principal, or another service principal. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void @@ -52,30 +64,47 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Directory objects that are owners of the application. Read-only. Nullable. Supports $expand, $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1), and $select nested in $expand. + ## Remove an owner from an application. As a recommended best practice, apps should have at least two owners. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## - def to_get_request_information(request_configuration=nil) + def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = '{+baseurl}/applications/{application%2Did}/owners/$ref?@id={%40id}' request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Retrieve a list of owners for an application that are directoryObject types. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = '{+baseurl}/applications/{application%2Did}/owners/$ref{?%24count,%24filter,%24orderby,%24search,%24skip,%24top}' + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Add an owner to an application by posting to the owners collection. + ## Add an owner to an application. Application owners can be individual users, the associated service principal, or another service principal. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -83,19 +112,52 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = '{+baseurl}/applications/{application%2Did}/owners/$ref' + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ref_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RefRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Remove an owner from an application. As a recommended best practice, apps should have at least two owners. + class RefRequestBuilderDeleteQueryParameters + + ## + # The delete Uri + attr_accessor :id + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "id" + return "%40id" + else + return original_name + end + end + end ## - # Directory objects that are owners of the application. Read-only. Nullable. Supports $expand, $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1), and $select nested in $expand. + # Retrieve a list of owners for an application that are directoryObject types. class RefRequestBuilderGetQueryParameters ## diff --git a/lib/applications/item/remove_key/remove_key_post_request_body.rb b/lib/applications/item/remove_key/remove_key_post_request_body.rb index c6abd4fb02..fd88f20ea0 100644 --- a/lib/applications/item/remove_key/remove_key_post_request_body.rb +++ b/lib/applications/item/remove_key/remove_key_post_request_body.rb @@ -20,22 +20,22 @@ class RemoveKeyPostRequestBody # The proof property @proof ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new removeKeyPostRequestBody and sets the default values. + ## Instantiates a new RemoveKeyPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/applications/item/remove_key/remove_key_request_builder.rb b/lib/applications/item/remove_key/remove_key_request_builder.rb index d3300506e8..6626fa5d63 100644 --- a/lib/applications/item/remove_key/remove_key_request_builder.rb +++ b/lib/applications/item/remove_key/remove_key_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a remove_key_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RemoveKeyRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/item/remove_password/remove_password_post_request_body.rb b/lib/applications/item/remove_password/remove_password_post_request_body.rb index 5565d56678..69d284850a 100644 --- a/lib/applications/item/remove_password/remove_password_post_request_body.rb +++ b/lib/applications/item/remove_password/remove_password_post_request_body.rb @@ -17,22 +17,22 @@ class RemovePasswordPostRequestBody # The keyId property @key_id ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new removePasswordPostRequestBody and sets the default values. + ## Instantiates a new RemovePasswordPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/applications/item/remove_password/remove_password_request_builder.rb b/lib/applications/item/remove_password/remove_password_request_builder.rb index e85dff5522..5b90f4cfe5 100644 --- a/lib/applications/item/remove_password/remove_password_request_builder.rb +++ b/lib/applications/item/remove_password/remove_password_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a remove_password_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RemovePasswordRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/item/restore/restore_request_builder.rb b/lib/applications/item/restore/restore_request_builder.rb index 8f9cf11b5f..bbb20eda3d 100644 --- a/lib/applications/item/restore/restore_request_builder.rb +++ b/lib/applications/item/restore/restore_request_builder.rb @@ -24,7 +24,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/restore") end ## - ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. Restore a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_object ## @@ -33,27 +33,35 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. Restore a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a restore_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RestoreRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/item/set_verified_publisher/set_verified_publisher_post_request_body.rb b/lib/applications/item/set_verified_publisher/set_verified_publisher_post_request_body.rb index 43a660c33e..ed96ac58c3 100644 --- a/lib/applications/item/set_verified_publisher/set_verified_publisher_post_request_body.rb +++ b/lib/applications/item/set_verified_publisher/set_verified_publisher_post_request_body.rb @@ -17,22 +17,22 @@ class SetVerifiedPublisherPostRequestBody # The verifiedPublisherId property @verified_publisher_id ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new setVerifiedPublisherPostRequestBody and sets the default values. + ## Instantiates a new SetVerifiedPublisherPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/applications/item/set_verified_publisher/set_verified_publisher_request_builder.rb b/lib/applications/item/set_verified_publisher/set_verified_publisher_request_builder.rb index 89af25803a..808279152c 100644 --- a/lib/applications/item/set_verified_publisher/set_verified_publisher_request_builder.rb +++ b/lib/applications/item/set_verified_publisher/set_verified_publisher_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a set_verified_publisher_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SetVerifiedPublisherRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/item/synchronization/acquire_access_token/acquire_access_token_post_request_body.rb b/lib/applications/item/synchronization/acquire_access_token/acquire_access_token_post_request_body.rb index 9d9fc433cc..db0210dd3d 100644 --- a/lib/applications/item/synchronization/acquire_access_token/acquire_access_token_post_request_body.rb +++ b/lib/applications/item/synchronization/acquire_access_token/acquire_access_token_post_request_body.rb @@ -20,22 +20,22 @@ class AcquireAccessTokenPostRequestBody # The credentials property @credentials ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new acquireAccessTokenPostRequestBody and sets the default values. + ## Instantiates a new AcquireAccessTokenPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/applications/item/synchronization/acquire_access_token/acquire_access_token_request_builder.rb b/lib/applications/item/synchronization/acquire_access_token/acquire_access_token_request_builder.rb index a7ea17d590..36bd071e7e 100644 --- a/lib/applications/item/synchronization/acquire_access_token/acquire_access_token_request_builder.rb +++ b/lib/applications/item/synchronization/acquire_access_token/acquire_access_token_request_builder.rb @@ -25,7 +25,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/acquireAccessToken") end ## - ## Acquire an OAuth access token to authorize the Azure AD provisioning service to provision users into an application. + ## Acquire an OAuth access token to authorize the Microsoft Entra provisioning service to provision users into an application. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void @@ -36,12 +36,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Acquire an OAuth access token to authorize the Azure AD provisioning service to provision users into an application. + ## Acquire an OAuth access token to authorize the Microsoft Entra provisioning service to provision users into an application. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a acquire_access_token_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AcquireAccessTokenRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/item/synchronization/jobs/count/count_request_builder.rb b/lib/applications/item/synchronization/jobs/count/count_request_builder.rb index 3455e85182..ae3f3661a0 100644 --- a/lib/applications/item/synchronization/jobs/count/count_request_builder.rb +++ b/lib/applications/item/synchronization/jobs/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/groups/item/calendar/calendar_view/item/extensions/count/count.rb b/lib/applications/item/synchronization/jobs/item/bulk_upload/bulk_upload.rb similarity index 100% rename from lib/groups/item/calendar/calendar_view/item/extensions/count/count.rb rename to lib/applications/item/synchronization/jobs/item/bulk_upload/bulk_upload.rb diff --git a/lib/applications/item/synchronization/jobs/item/bulk_upload/bulk_upload_request_builder.rb b/lib/applications/item/synchronization/jobs/item/bulk_upload/bulk_upload_request_builder.rb new file mode 100644 index 0000000000..561717a0c4 --- /dev/null +++ b/lib/applications/item/synchronization/jobs/item/bulk_upload/bulk_upload_request_builder.rb @@ -0,0 +1,178 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/bulk_upload' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../applications' +require_relative '../../../../item' +require_relative '../../../synchronization' +require_relative '../../jobs' +require_relative '../item' +require_relative './bulk_upload' +require_relative './value/content_request_builder' + +module MicrosoftGraph + module Applications + module Item + module Synchronization + module Jobs + module Item + module BulkUpload + ## + # Provides operations to manage the bulkUpload property of the microsoft.graph.synchronizationJob entity. + class BulkUploadRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the media for the application entity. + def content() + return MicrosoftGraph::Applications::Item::Synchronization::Jobs::Item::BulkUpload::Value::ContentRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new BulkUploadRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/bulkUpload{?%24expand,%24select}") + end + ## + ## Delete navigation property bulkUpload for applications + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The bulk upload operation for the job. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of bulk_upload + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::BulkUpload.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property bulkUpload in applications + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of bulk_upload + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::BulkUpload.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property bulkUpload for applications + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The bulk upload operation for the job. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property bulkUpload in applications + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a bulk_upload_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BulkUploadRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The bulk upload operation for the job. + class BulkUploadRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/applications/item/synchronization/jobs/item/bulk_upload/value/content_request_builder.rb b/lib/applications/item/synchronization/jobs/item/bulk_upload/value/content_request_builder.rb new file mode 100644 index 0000000000..bc47cfca15 --- /dev/null +++ b/lib/applications/item/synchronization/jobs/item/bulk_upload/value/content_request_builder.rb @@ -0,0 +1,145 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../applications' +require_relative '../../../../../item' +require_relative '../../../../synchronization' +require_relative '../../../jobs' +require_relative '../../item' +require_relative '../bulk_upload' +require_relative './value' + +module MicrosoftGraph + module Applications + module Item + module Synchronization + module Jobs + module Item + module BulkUpload + module Value + ## + # Provides operations to manage the media for the application entity. + class ContentRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new ContentRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/bulkUpload/$value") + end + ## + ## The bulk upload operation for the job. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The bulk upload operation for the job. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of binary + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, Binary, error_mapping) + end + ## + ## The bulk upload operation for the job. + ## @param body Binary request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of binary + ## + def put(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_put_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, Binary, error_mapping) + end + ## + ## The bulk upload operation for the job. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The bulk upload operation for the job. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') + return request_info + end + ## + ## The bulk upload operation for the job. + ## @param body Binary request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_put_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/octet-stream', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PUT + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a content_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContentRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar/calendar_view/item/extensions/extensions.rb b/lib/applications/item/synchronization/jobs/item/bulk_upload/value/value.rb similarity index 100% rename from lib/groups/item/calendar/calendar_view/item/extensions/extensions.rb rename to lib/applications/item/synchronization/jobs/item/bulk_upload/value/value.rb diff --git a/lib/applications/item/synchronization/jobs/item/pause/pause_request_builder.rb b/lib/applications/item/synchronization/jobs/item/pause/pause_request_builder.rb index ac11fee685..4105628a8a 100644 --- a/lib/applications/item/synchronization/jobs/item/pause/pause_request_builder.rb +++ b/lib/applications/item/synchronization/jobs/item/pause/pause_request_builder.rb @@ -38,8 +38,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,15 +48,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a pause_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return PauseRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/item/synchronization/jobs/item/provision_on_demand/provision_on_demand_post_request_body.rb b/lib/applications/item/synchronization/jobs/item/provision_on_demand/provision_on_demand_post_request_body.rb index d5a6f2e9ee..43abc0279f 100644 --- a/lib/applications/item/synchronization/jobs/item/provision_on_demand/provision_on_demand_post_request_body.rb +++ b/lib/applications/item/synchronization/jobs/item/provision_on_demand/provision_on_demand_post_request_body.rb @@ -24,22 +24,22 @@ class ProvisionOnDemandPostRequestBody # The parameters property @parameters ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new provisionOnDemandPostRequestBody and sets the default values. + ## Instantiates a new ProvisionOnDemandPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/applications/item/synchronization/jobs/item/provision_on_demand/provision_on_demand_request_builder.rb b/lib/applications/item/synchronization/jobs/item/provision_on_demand/provision_on_demand_request_builder.rb index baae208dc4..4653065da4 100644 --- a/lib/applications/item/synchronization/jobs/item/provision_on_demand/provision_on_demand_request_builder.rb +++ b/lib/applications/item/synchronization/jobs/item/provision_on_demand/provision_on_demand_request_builder.rb @@ -30,7 +30,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/provisionOnDemand") end ## - ## Select a user and provision the account on-demand. The rate limit for this API is 5 requests per 10 seconds. + ## Select a user and provision the account on-demand. The rate limit for this API is 5 requests per 10 seconds. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of string_key_string_value_pair @@ -41,12 +41,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::StringKeyStringValuePair.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Select a user and provision the account on-demand. The rate limit for this API is 5 requests per 10 seconds. + ## Select a user and provision the account on-demand. The rate limit for this API is 5 requests per 10 seconds. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -54,17 +53,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a provision_on_demand_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ProvisionOnDemandRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/item/synchronization/jobs/item/restart/restart_post_request_body.rb b/lib/applications/item/synchronization/jobs/item/restart/restart_post_request_body.rb index cfdc7b33ba..2715e1e150 100644 --- a/lib/applications/item/synchronization/jobs/item/restart/restart_post_request_body.rb +++ b/lib/applications/item/synchronization/jobs/item/restart/restart_post_request_body.rb @@ -24,22 +24,22 @@ class RestartPostRequestBody # The criteria property @criteria ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new restartPostRequestBody and sets the default values. + ## Instantiates a new RestartPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/applications/item/synchronization/jobs/item/restart/restart_request_builder.rb b/lib/applications/item/synchronization/jobs/item/restart/restart_request_builder.rb index 297d79c346..dbb3baed15 100644 --- a/lib/applications/item/synchronization/jobs/item/restart/restart_request_builder.rb +++ b/lib/applications/item/synchronization/jobs/item/restart/restart_request_builder.rb @@ -40,8 +40,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -53,16 +52,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a restart_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RestartRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/item/synchronization/jobs/item/schema/directories/count/count_request_builder.rb b/lib/applications/item/synchronization/jobs/item/schema/directories/count/count_request_builder.rb index 7d357a0ff1..032663a03d 100644 --- a/lib/applications/item/synchronization/jobs/item/schema/directories/count/count_request_builder.rb +++ b/lib/applications/item/synchronization/jobs/item/schema/directories/count/count_request_builder.rb @@ -30,7 +30,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/directories/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/directories/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -42,8 +42,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -53,17 +52,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/applications/item/synchronization/jobs/item/schema/directories/directories_request_builder.rb b/lib/applications/item/synchronization/jobs/item/schema/directories/directories_request_builder.rb index 90bf949c1a..5e0da97cec 100644 --- a/lib/applications/item/synchronization/jobs/item/schema/directories/directories_request_builder.rb +++ b/lib/applications/item/synchronization/jobs/item/schema/directories/directories_request_builder.rb @@ -48,7 +48,7 @@ def by_directory_definition_id(directory_definition_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/directories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/directories{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Contains the collection of directories and all of their objects. @@ -60,8 +60,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryDefinitionCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,8 +75,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryDefinition.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -87,15 +85,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -107,17 +105,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a directories_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DirectoriesRequestBuilder.new(raw_url, @request_adapter) + end ## # Contains the collection of directories and all of their objects. diff --git a/lib/applications/item/synchronization/jobs/item/schema/directories/item/directory_definition_item_request_builder.rb b/lib/applications/item/synchronization/jobs/item/schema/directories/item/directory_definition_item_request_builder.rb index 359d2e0497..dc2c282b1e 100644 --- a/lib/applications/item/synchronization/jobs/item/schema/directories/item/directory_definition_item_request_builder.rb +++ b/lib/applications/item/synchronization/jobs/item/schema/directories/item/directory_definition_item_request_builder.rb @@ -37,7 +37,7 @@ def discover() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/directories/{directoryDefinition%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/directories/{directoryDefinition%2Did}{?%24expand,%24select}") end ## ## Delete navigation property directories for applications @@ -49,8 +49,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -63,8 +62,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryDefinition.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -79,8 +77,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryDefinition.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -90,13 +87,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -106,15 +104,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -126,17 +124,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a directory_definition_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DirectoryDefinitionItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Contains the collection of directories and all of their objects. diff --git a/lib/applications/item/synchronization/jobs/item/schema/directories/item/discover/discover_request_builder.rb b/lib/applications/item/synchronization/jobs/item/schema/directories/item/discover/discover_request_builder.rb index b40161aef6..1cdf78ca87 100644 --- a/lib/applications/item/synchronization/jobs/item/schema/directories/item/discover/discover_request_builder.rb +++ b/lib/applications/item/synchronization/jobs/item/schema/directories/item/discover/discover_request_builder.rb @@ -45,8 +45,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryDefinition.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,16 +55,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a discover_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DiscoverRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/item/synchronization/jobs/item/schema/filter_operators/filter_operators.rb b/lib/applications/item/synchronization/jobs/item/schema/filter_operators/filter_operators.rb index 6c8bfb6bb1..fd838a4112 100644 --- a/lib/applications/item/synchronization/jobs/item/schema/filter_operators/filter_operators.rb +++ b/lib/applications/item/synchronization/jobs/item/schema/filter_operators/filter_operators.rb @@ -1 +1 @@ -require_relative 'filter_operators_response' +require_relative 'filter_operators_get_response' diff --git a/lib/applications/item/synchronization/jobs/item/schema/filter_operators/filter_operators_get_response.rb b/lib/applications/item/synchronization/jobs/item/schema/filter_operators/filter_operators_get_response.rb new file mode 100644 index 0000000000..79f8487726 --- /dev/null +++ b/lib/applications/item/synchronization/jobs/item/schema/filter_operators/filter_operators_get_response.rb @@ -0,0 +1,84 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/base_collection_pagination_count_response' +require_relative '../../../../../../../models/filter_operator_schema' +require_relative '../../../../../../applications' +require_relative '../../../../../item' +require_relative '../../../../synchronization' +require_relative '../../../jobs' +require_relative '../../item' +require_relative '../schema' +require_relative './filter_operators' + +module MicrosoftGraph + module Applications + module Item + module Synchronization + module Jobs + module Item + module Schema + module FilterOperators + class FilterOperatorsGetResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new FilterOperatorsGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a filter_operators_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return FilterOperatorsGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::FilterOperatorSchema.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a filter_operator_schema + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end + end + end + end +end diff --git a/lib/applications/item/synchronization/jobs/item/schema/filter_operators/filter_operators_request_builder.rb b/lib/applications/item/synchronization/jobs/item/schema/filter_operators/filter_operators_request_builder.rb index 26adb85692..8fc399c23a 100644 --- a/lib/applications/item/synchronization/jobs/item/schema/filter_operators/filter_operators_request_builder.rb +++ b/lib/applications/item/synchronization/jobs/item/schema/filter_operators/filter_operators_request_builder.rb @@ -28,49 +28,60 @@ class FilterOperatorsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBui ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/filterOperators(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/filterOperators(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Invoke function filterOperators + ## List all operators supported in the scoping filters. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of filter_operators_response + ## @return a Fiber of filter_operators_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Applications::Item::Synchronization::Jobs::Item::Schema::FilterOperators::FilterOperatorsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Applications::Item::Synchronization::Jobs::Item::Schema::FilterOperators::FilterOperatorsGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Invoke function filterOperators + ## List all operators supported in the scoping filters. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a filter_operators_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return FilterOperatorsRequestBuilder.new(raw_url, @request_adapter) + end ## - # Invoke function filterOperators + # List all operators supported in the scoping filters. class FilterOperatorsRequestBuilderGetQueryParameters ## # Include count of items attr_accessor :count ## + # Expand related entities + attr_accessor :expand + ## # Filter items by property values attr_accessor :filter ## @@ -98,6 +109,8 @@ def get_query_parameter(original_name) case original_name when "count" return "%24count" + when "expand" + return "%24expand" when "filter" return "%24filter" when "orderby" diff --git a/lib/applications/item/synchronization/jobs/item/schema/filter_operators/filter_operators_response.rb b/lib/applications/item/synchronization/jobs/item/schema/filter_operators/filter_operators_response.rb deleted file mode 100644 index 534deee72b..0000000000 --- a/lib/applications/item/synchronization/jobs/item/schema/filter_operators/filter_operators_response.rb +++ /dev/null @@ -1,84 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/base_collection_pagination_count_response' -require_relative '../../../../../../../models/filter_operator_schema' -require_relative '../../../../../../applications' -require_relative '../../../../../item' -require_relative '../../../../synchronization' -require_relative '../../../jobs' -require_relative '../../item' -require_relative '../schema' -require_relative './filter_operators' - -module MicrosoftGraph - module Applications - module Item - module Synchronization - module Jobs - module Item - module Schema - module FilterOperators - class FilterOperatorsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new filterOperatorsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a filter_operators_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return FilterOperatorsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::FilterOperatorSchema.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a filter_operator_schema - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end - end - end - end -end diff --git a/lib/applications/item/synchronization/jobs/item/schema/functions/functions.rb b/lib/applications/item/synchronization/jobs/item/schema/functions/functions.rb index 83e3ceed1d..f3acee0863 100644 --- a/lib/applications/item/synchronization/jobs/item/schema/functions/functions.rb +++ b/lib/applications/item/synchronization/jobs/item/schema/functions/functions.rb @@ -1 +1 @@ -require_relative 'functions_response' +require_relative 'functions_get_response' diff --git a/lib/applications/item/synchronization/jobs/item/schema/functions/functions_get_response.rb b/lib/applications/item/synchronization/jobs/item/schema/functions/functions_get_response.rb new file mode 100644 index 0000000000..410e62d22f --- /dev/null +++ b/lib/applications/item/synchronization/jobs/item/schema/functions/functions_get_response.rb @@ -0,0 +1,84 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/attribute_mapping_function_schema' +require_relative '../../../../../../../models/base_collection_pagination_count_response' +require_relative '../../../../../../applications' +require_relative '../../../../../item' +require_relative '../../../../synchronization' +require_relative '../../../jobs' +require_relative '../../item' +require_relative '../schema' +require_relative './functions' + +module MicrosoftGraph + module Applications + module Item + module Synchronization + module Jobs + module Item + module Schema + module Functions + class FunctionsGetResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new FunctionsGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a functions_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return FunctionsGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AttributeMappingFunctionSchema.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a attribute_mapping_function_schema + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end + end + end + end +end diff --git a/lib/applications/item/synchronization/jobs/item/schema/functions/functions_request_builder.rb b/lib/applications/item/synchronization/jobs/item/schema/functions/functions_request_builder.rb index da84da96d0..ad3ba548d6 100644 --- a/lib/applications/item/synchronization/jobs/item/schema/functions/functions_request_builder.rb +++ b/lib/applications/item/synchronization/jobs/item/schema/functions/functions_request_builder.rb @@ -28,49 +28,60 @@ class FunctionsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/functions(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/functions(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Invoke function functions + ## List all the functions currently supported in the attributeMappingSource. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of functions_response + ## @return a Fiber of functions_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Applications::Item::Synchronization::Jobs::Item::Schema::Functions::FunctionsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Applications::Item::Synchronization::Jobs::Item::Schema::Functions::FunctionsGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Invoke function functions + ## List all the functions currently supported in the attributeMappingSource. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a functions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return FunctionsRequestBuilder.new(raw_url, @request_adapter) + end ## - # Invoke function functions + # List all the functions currently supported in the attributeMappingSource. class FunctionsRequestBuilderGetQueryParameters ## # Include count of items attr_accessor :count ## + # Expand related entities + attr_accessor :expand + ## # Filter items by property values attr_accessor :filter ## @@ -98,6 +109,8 @@ def get_query_parameter(original_name) case original_name when "count" return "%24count" + when "expand" + return "%24expand" when "filter" return "%24filter" when "orderby" diff --git a/lib/applications/item/synchronization/jobs/item/schema/functions/functions_response.rb b/lib/applications/item/synchronization/jobs/item/schema/functions/functions_response.rb deleted file mode 100644 index f76cdedcc5..0000000000 --- a/lib/applications/item/synchronization/jobs/item/schema/functions/functions_response.rb +++ /dev/null @@ -1,84 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/attribute_mapping_function_schema' -require_relative '../../../../../../../models/base_collection_pagination_count_response' -require_relative '../../../../../../applications' -require_relative '../../../../../item' -require_relative '../../../../synchronization' -require_relative '../../../jobs' -require_relative '../../item' -require_relative '../schema' -require_relative './functions' - -module MicrosoftGraph - module Applications - module Item - module Synchronization - module Jobs - module Item - module Schema - module Functions - class FunctionsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new functionsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a functions_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return FunctionsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AttributeMappingFunctionSchema.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a attribute_mapping_function_schema - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end - end - end - end -end diff --git a/lib/applications/item/synchronization/jobs/item/schema/parse_expression/parse_expression_post_request_body.rb b/lib/applications/item/synchronization/jobs/item/schema/parse_expression/parse_expression_post_request_body.rb index dc61822811..b6c993a7dd 100644 --- a/lib/applications/item/synchronization/jobs/item/schema/parse_expression/parse_expression_post_request_body.rb +++ b/lib/applications/item/synchronization/jobs/item/schema/parse_expression/parse_expression_post_request_body.rb @@ -33,22 +33,22 @@ class ParseExpressionPostRequestBody # The testInputObject property @test_input_object ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new parseExpressionPostRequestBody and sets the default values. + ## Instantiates a new ParseExpressionPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/applications/item/synchronization/jobs/item/schema/parse_expression/parse_expression_request_builder.rb b/lib/applications/item/synchronization/jobs/item/schema/parse_expression/parse_expression_request_builder.rb index f2985d3aa1..067686d440 100644 --- a/lib/applications/item/synchronization/jobs/item/schema/parse_expression/parse_expression_request_builder.rb +++ b/lib/applications/item/synchronization/jobs/item/schema/parse_expression/parse_expression_request_builder.rb @@ -32,7 +32,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/parseExpression") end ## - ## Parse a given string expression into an attributeMappingSource object. For more information about expressions, see Writing Expressions for Attribute Mappings in Azure Active Directory. + ## Parse a given string expression into an attributeMappingSource object. For more information about expressions, see Writing Expressions for Attribute Mappings in Microsoft Entra ID. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of parse_expression_response @@ -43,12 +43,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ParseExpressionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Parse a given string expression into an attributeMappingSource object. For more information about expressions, see Writing Expressions for Attribute Mappings in Azure Active Directory. + ## Parse a given string expression into an attributeMappingSource object. For more information about expressions, see Writing Expressions for Attribute Mappings in Microsoft Entra ID. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a parse_expression_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ParseExpressionRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/item/synchronization/jobs/item/schema/schema_request_builder.rb b/lib/applications/item/synchronization/jobs/item/schema/schema_request_builder.rb index 9b96b1123a..6e41d33bc0 100644 --- a/lib/applications/item/synchronization/jobs/item/schema/schema_request_builder.rb +++ b/lib/applications/item/synchronization/jobs/item/schema/schema_request_builder.rb @@ -51,7 +51,7 @@ def parse_expression() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema{?%24expand,%24select}") end ## ## Delete navigation property schema for applications @@ -63,12 +63,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Retrieve the schema for a given synchronization job or template. + ## The synchronization schema configured for the job. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of synchronization_schema ## @@ -77,12 +76,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SynchronizationSchema.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Update the synchronization schema for a given job or template. This method fully replaces the current schema with the one provided in the request. To update the schema of a template, make the call on the application object. You must be the owner of the application. + ## Update the navigation property schema in applications ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of synchronization_schema @@ -93,8 +91,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SynchronizationSchema.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -104,35 +101,36 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Retrieve the schema for a given synchronization job or template. + ## The synchronization schema configured for the job. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Update the synchronization schema for a given job or template. This method fully replaces the current schema with the one provided in the request. To update the schema of a template, make the call on the application object. You must be the owner of the application. + ## Update the navigation property schema in applications ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -140,20 +138,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a schema_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SchemaRequestBuilder.new(raw_url, @request_adapter) + end ## - # Retrieve the schema for a given synchronization job or template. + # The synchronization schema configured for the job. class SchemaRequestBuilderGetQueryParameters ## diff --git a/lib/applications/item/synchronization/jobs/item/start/start_request_builder.rb b/lib/applications/item/synchronization/jobs/item/start/start_request_builder.rb index 0a0ad930f1..b283e17ba0 100644 --- a/lib/applications/item/synchronization/jobs/item/start/start_request_builder.rb +++ b/lib/applications/item/synchronization/jobs/item/start/start_request_builder.rb @@ -29,7 +29,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/start") end ## - ## Start an existing synchronization job. If the job is in a paused state, it will continue processing changes from the point where it was paused. If the job is in quarantine, the quarantine status will be cleared. Do not create scripts to call the start job continuously while it's running because that can cause the service to stop running. Use the start job only when the job is currently paused or in quarantine. + ## Start an existing synchronization job. If the job is in a paused state, it continues processing changes from the point where it was paused. If the job is in quarantine, the quarantine status is cleared. Don't create scripts to call the start job continuously while it's running because that can cause the service to stop running. Use the start job only when the job is currently paused or in quarantine. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void ## @@ -38,26 +38,35 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Start an existing synchronization job. If the job is in a paused state, it will continue processing changes from the point where it was paused. If the job is in quarantine, the quarantine status will be cleared. Do not create scripts to call the start job continuously while it's running because that can cause the service to stop running. Use the start job only when the job is currently paused or in quarantine. + ## Start an existing synchronization job. If the job is in a paused state, it continues processing changes from the point where it was paused. If the job is in quarantine, the quarantine status is cleared. Don't create scripts to call the start job continuously while it's running because that can cause the service to stop running. Use the start job only when the job is currently paused or in quarantine. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a start_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return StartRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/item/synchronization/jobs/item/synchronization_job_item_request_builder.rb b/lib/applications/item/synchronization/jobs/item/synchronization_job_item_request_builder.rb index 13c67b215b..917501d999 100644 --- a/lib/applications/item/synchronization/jobs/item/synchronization_job_item_request_builder.rb +++ b/lib/applications/item/synchronization/jobs/item/synchronization_job_item_request_builder.rb @@ -6,6 +6,7 @@ require_relative '../../../item' require_relative '../../synchronization' require_relative '../jobs' +require_relative './bulk_upload/bulk_upload_request_builder' require_relative './item' require_relative './pause/pause_request_builder' require_relative './provision_on_demand/provision_on_demand_request_builder' @@ -24,6 +25,11 @@ module Item # Provides operations to manage the jobs property of the microsoft.graph.synchronization entity. class SynchronizationJobItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + ## + # Provides operations to manage the bulkUpload property of the microsoft.graph.synchronizationJob entity. + def bulk_upload() + return MicrosoftGraph::Applications::Item::Synchronization::Jobs::Item::BulkUpload::BulkUploadRequestBuilder.new(@path_parameters, @request_adapter) + end ## # Provides operations to call the pause method. def pause() @@ -61,10 +67,10 @@ def validate_credentials() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}{?%24expand,%24select}") end ## - ## Stop the synchronization job, and permanently delete all the state associated with it. Synchronized accounts are left as-is. + ## Delete navigation property jobs for applications ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void ## @@ -73,12 +79,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Retrieve the existing synchronization job and its properties. + ## Performs synchronization by periodically running in the background, polling for changes in one directory, and pushing them to another directory. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of synchronization_job ## @@ -87,8 +92,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SynchronizationJob.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -103,42 +107,42 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SynchronizationJob.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Stop the synchronization job, and permanently delete all the state associated with it. Synchronized accounts are left as-is. + ## Delete navigation property jobs for applications ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Retrieve the existing synchronization job and its properties. + ## Performs synchronization by periodically running in the background, polling for changes in one directory, and pushing them to another directory. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -150,20 +154,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a synchronization_job_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SynchronizationJobItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Retrieve the existing synchronization job and its properties. + # Performs synchronization by periodically running in the background, polling for changes in one directory, and pushing them to another directory. class SynchronizationJobItemRequestBuilderGetQueryParameters ## diff --git a/lib/applications/item/synchronization/jobs/item/validate_credentials/validate_credentials_post_request_body.rb b/lib/applications/item/synchronization/jobs/item/validate_credentials/validate_credentials_post_request_body.rb index 919a562590..0fcccbe9ab 100644 --- a/lib/applications/item/synchronization/jobs/item/validate_credentials/validate_credentials_post_request_body.rb +++ b/lib/applications/item/synchronization/jobs/item/validate_credentials/validate_credentials_post_request_body.rb @@ -33,15 +33,15 @@ class ValidateCredentialsPostRequestBody # The useSavedCredentials property @use_saved_credentials ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -63,7 +63,7 @@ def application_identifier=(value) @application_identifier = value end ## - ## Instantiates a new validateCredentialsPostRequestBody and sets the default values. + ## Instantiates a new ValidateCredentialsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/applications/item/synchronization/jobs/item/validate_credentials/validate_credentials_request_builder.rb b/lib/applications/item/synchronization/jobs/item/validate_credentials/validate_credentials_request_builder.rb index 67e0d9683c..9eb4ab1e47 100644 --- a/lib/applications/item/synchronization/jobs/item/validate_credentials/validate_credentials_request_builder.rb +++ b/lib/applications/item/synchronization/jobs/item/validate_credentials/validate_credentials_request_builder.rb @@ -40,8 +40,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -53,16 +52,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a validate_credentials_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ValidateCredentialsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/item/synchronization/jobs/jobs_request_builder.rb b/lib/applications/item/synchronization/jobs/jobs_request_builder.rb index 8d057d692a..0b7b9c5fb1 100644 --- a/lib/applications/item/synchronization/jobs/jobs_request_builder.rb +++ b/lib/applications/item/synchronization/jobs/jobs_request_builder.rb @@ -48,10 +48,10 @@ def by_synchronization_job_id(synchronization_job_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## List existing jobs for a given application instance (service principal). + ## Performs synchronization by periodically running in the background, polling for changes in one directory, and pushing them to another directory. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of synchronization_job_collection_response ## @@ -60,12 +60,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SynchronizationJobCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Create new synchronization job with a default synchronization schema. The job is created in a disabled state. Call Start job to start synchronization. + ## Create new navigation property to jobs for applications ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of synchronization_job @@ -76,30 +75,29 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SynchronizationJob.create_from_discriminator_value(pn) }, error_mapping) end ## - ## List existing jobs for a given application instance (service principal). + ## Performs synchronization by periodically running in the background, polling for changes in one directory, and pushing them to another directory. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Create new synchronization job with a default synchronization schema. The job is created in a disabled state. Call Start job to start synchronization. + ## Create new navigation property to jobs for applications ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -107,20 +105,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a jobs_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return JobsRequestBuilder.new(raw_url, @request_adapter) + end ## - # List existing jobs for a given application instance (service principal). + # Performs synchronization by periodically running in the background, polling for changes in one directory, and pushing them to another directory. class JobsRequestBuilderGetQueryParameters ## diff --git a/lib/applications/item/synchronization/jobs/validate_credentials/validate_credentials_post_request_body.rb b/lib/applications/item/synchronization/jobs/validate_credentials/validate_credentials_post_request_body.rb index 48297f19fe..f3abb1b27c 100644 --- a/lib/applications/item/synchronization/jobs/validate_credentials/validate_credentials_post_request_body.rb +++ b/lib/applications/item/synchronization/jobs/validate_credentials/validate_credentials_post_request_body.rb @@ -31,15 +31,15 @@ class ValidateCredentialsPostRequestBody # The useSavedCredentials property @use_saved_credentials ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -61,7 +61,7 @@ def application_identifier=(value) @application_identifier = value end ## - ## Instantiates a new validateCredentialsPostRequestBody and sets the default values. + ## Instantiates a new ValidateCredentialsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/applications/item/synchronization/jobs/validate_credentials/validate_credentials_request_builder.rb b/lib/applications/item/synchronization/jobs/validate_credentials/validate_credentials_request_builder.rb index 3089793574..57f31fda1e 100644 --- a/lib/applications/item/synchronization/jobs/validate_credentials/validate_credentials_request_builder.rb +++ b/lib/applications/item/synchronization/jobs/validate_credentials/validate_credentials_request_builder.rb @@ -38,8 +38,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,16 +50,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a validate_credentials_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ValidateCredentialsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/item/synchronization/secrets/count/count_request_builder.rb b/lib/applications/item/synchronization/secrets/count/count_request_builder.rb index 8abe6c4681..c15e3c55f5 100644 --- a/lib/applications/item/synchronization/secrets/count/count_request_builder.rb +++ b/lib/applications/item/synchronization/secrets/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/secrets/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/secrets/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/applications/item/synchronization/secrets/secrets.rb b/lib/applications/item/synchronization/secrets/secrets.rb index e69de29bb2..0f4b8193b8 100644 --- a/lib/applications/item/synchronization/secrets/secrets.rb +++ b/lib/applications/item/synchronization/secrets/secrets.rb @@ -0,0 +1,2 @@ +require_relative 'secrets_put_request_body' +require_relative 'secrets_put_response' diff --git a/lib/applications/item/synchronization/secrets/secrets_put_request_body.rb b/lib/applications/item/synchronization/secrets/secrets_put_request_body.rb new file mode 100644 index 0000000000..5d57965e8d --- /dev/null +++ b/lib/applications/item/synchronization/secrets/secrets_put_request_body.rb @@ -0,0 +1,92 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/synchronization_secret_key_string_value_pair' +require_relative '../../../applications' +require_relative '../../item' +require_relative '../synchronization' +require_relative './secrets' + +module MicrosoftGraph + module Applications + module Item + module Synchronization + module Secrets + class SecretsPutRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The value property + @value + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new SecretsPutRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a secrets_put_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return SecretsPutRequestBody.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SynchronizationSecretKeyStringValuePair.create_from_discriminator_value(pn) }) }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_collection_of_object_values("value", @value) + writer.write_additional_data(@additional_data) + end + ## + ## Gets the value property value. The value property + ## @return a synchronization_secret_key_string_value_pair + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end +end diff --git a/lib/applications/item/synchronization/secrets/secrets_put_response.rb b/lib/applications/item/synchronization/secrets/secrets_put_response.rb new file mode 100644 index 0000000000..17ff7909c9 --- /dev/null +++ b/lib/applications/item/synchronization/secrets/secrets_put_response.rb @@ -0,0 +1,92 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/synchronization_secret_key_string_value_pair' +require_relative '../../../applications' +require_relative '../../item' +require_relative '../synchronization' +require_relative './secrets' + +module MicrosoftGraph + module Applications + module Item + module Synchronization + module Secrets + class SecretsPutResponse + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The value property + @value + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new SecretsPutResponse and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a secrets_put_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return SecretsPutResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SynchronizationSecretKeyStringValuePair.create_from_discriminator_value(pn) }) }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_collection_of_object_values("value", @value) + writer.write_additional_data(@additional_data) + end + ## + ## Gets the value property value. The value property + ## @return a synchronization_secret_key_string_value_pair + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end +end diff --git a/lib/applications/item/synchronization/secrets/secrets_request_builder.rb b/lib/applications/item/synchronization/secrets/secrets_request_builder.rb index 2d7325f446..f830d14678 100644 --- a/lib/applications/item/synchronization/secrets/secrets_request_builder.rb +++ b/lib/applications/item/synchronization/secrets/secrets_request_builder.rb @@ -1,7 +1,6 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../microsoft_graph' require_relative '../../../../models/o_data_errors_o_data_error' -require_relative '../../../../models/synchronization_secret_key_string_value_pair' require_relative '../../../applications' require_relative '../../item' require_relative '../synchronization' @@ -35,7 +34,7 @@ def initialize(path_parameters, request_adapter) ## Update property secrets value. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of synchronization_secret_key_string_value_pair + ## @return a Fiber of secrets_put_response ## def put(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -43,9 +42,8 @@ def put(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SynchronizationSecretKeyStringValuePair.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Applications::Item::Synchronization::Secrets::SecretsPutResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Update property secrets value. @@ -56,17 +54,26 @@ def put(body, request_configuration=nil) def to_put_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PUT - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PUT + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a secrets_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SecretsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/item/synchronization/synchronization_request_builder.rb b/lib/applications/item/synchronization/synchronization_request_builder.rb index ddedd33657..a34e662022 100644 --- a/lib/applications/item/synchronization/synchronization_request_builder.rb +++ b/lib/applications/item/synchronization/synchronization_request_builder.rb @@ -45,7 +45,7 @@ def templates() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization{?%24expand,%24select}") end ## ## Delete navigation property synchronization for applications @@ -57,12 +57,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Represents the capability for Azure Active Directory (Azure AD) identity synchronization through the Microsoft Graph API. + ## Represents the capability for Microsoft Entra identity synchronization through the Microsoft Graph API. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of synchronization ## @@ -71,8 +70,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Synchronization.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -87,8 +85,7 @@ def put(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Synchronization.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -98,31 +95,32 @@ def put(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Represents the capability for Azure Active Directory (Azure AD) identity synchronization through the Microsoft Graph API. + ## Represents the capability for Microsoft Entra identity synchronization through the Microsoft Graph API. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -134,20 +132,29 @@ def to_get_request_information(request_configuration=nil) def to_put_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PUT - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PUT + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a synchronization_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SynchronizationRequestBuilder.new(raw_url, @request_adapter) + end ## - # Represents the capability for Azure Active Directory (Azure AD) identity synchronization through the Microsoft Graph API. + # Represents the capability for Microsoft Entra identity synchronization through the Microsoft Graph API. class SynchronizationRequestBuilderGetQueryParameters ## diff --git a/lib/applications/item/synchronization/templates/count/count_request_builder.rb b/lib/applications/item/synchronization/templates/count/count_request_builder.rb index ce99e99581..91087007c0 100644 --- a/lib/applications/item/synchronization/templates/count/count_request_builder.rb +++ b/lib/applications/item/synchronization/templates/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/applications/item/synchronization/templates/item/schema/directories/count/count_request_builder.rb b/lib/applications/item/synchronization/templates/item/schema/directories/count/count_request_builder.rb index 3566e3bbd0..05e886e6bc 100644 --- a/lib/applications/item/synchronization/templates/item/schema/directories/count/count_request_builder.rb +++ b/lib/applications/item/synchronization/templates/item/schema/directories/count/count_request_builder.rb @@ -30,7 +30,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/directories/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/directories/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -42,8 +42,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -53,17 +52,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/applications/item/synchronization/templates/item/schema/directories/directories_request_builder.rb b/lib/applications/item/synchronization/templates/item/schema/directories/directories_request_builder.rb index 7bafdbb488..36ffa6b502 100644 --- a/lib/applications/item/synchronization/templates/item/schema/directories/directories_request_builder.rb +++ b/lib/applications/item/synchronization/templates/item/schema/directories/directories_request_builder.rb @@ -48,7 +48,7 @@ def by_directory_definition_id(directory_definition_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/directories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/directories{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Contains the collection of directories and all of their objects. @@ -60,8 +60,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryDefinitionCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,8 +75,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryDefinition.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -87,15 +85,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -107,17 +105,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a directories_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DirectoriesRequestBuilder.new(raw_url, @request_adapter) + end ## # Contains the collection of directories and all of their objects. diff --git a/lib/applications/item/synchronization/templates/item/schema/directories/item/directory_definition_item_request_builder.rb b/lib/applications/item/synchronization/templates/item/schema/directories/item/directory_definition_item_request_builder.rb index be579844ae..013fd7193b 100644 --- a/lib/applications/item/synchronization/templates/item/schema/directories/item/directory_definition_item_request_builder.rb +++ b/lib/applications/item/synchronization/templates/item/schema/directories/item/directory_definition_item_request_builder.rb @@ -37,7 +37,7 @@ def discover() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/directories/{directoryDefinition%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/directories/{directoryDefinition%2Did}{?%24expand,%24select}") end ## ## Delete navigation property directories for applications @@ -49,8 +49,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -63,8 +62,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryDefinition.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -79,8 +77,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryDefinition.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -90,13 +87,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -106,15 +104,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -126,17 +124,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a directory_definition_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DirectoryDefinitionItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Contains the collection of directories and all of their objects. diff --git a/lib/applications/item/synchronization/templates/item/schema/directories/item/discover/discover_request_builder.rb b/lib/applications/item/synchronization/templates/item/schema/directories/item/discover/discover_request_builder.rb index e735b0da7d..23eee993f6 100644 --- a/lib/applications/item/synchronization/templates/item/schema/directories/item/discover/discover_request_builder.rb +++ b/lib/applications/item/synchronization/templates/item/schema/directories/item/discover/discover_request_builder.rb @@ -45,8 +45,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryDefinition.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,16 +55,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a discover_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DiscoverRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/item/synchronization/templates/item/schema/filter_operators/filter_operators.rb b/lib/applications/item/synchronization/templates/item/schema/filter_operators/filter_operators.rb index 6c8bfb6bb1..fd838a4112 100644 --- a/lib/applications/item/synchronization/templates/item/schema/filter_operators/filter_operators.rb +++ b/lib/applications/item/synchronization/templates/item/schema/filter_operators/filter_operators.rb @@ -1 +1 @@ -require_relative 'filter_operators_response' +require_relative 'filter_operators_get_response' diff --git a/lib/applications/item/synchronization/templates/item/schema/filter_operators/filter_operators_get_response.rb b/lib/applications/item/synchronization/templates/item/schema/filter_operators/filter_operators_get_response.rb new file mode 100644 index 0000000000..6bb4f56464 --- /dev/null +++ b/lib/applications/item/synchronization/templates/item/schema/filter_operators/filter_operators_get_response.rb @@ -0,0 +1,84 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/base_collection_pagination_count_response' +require_relative '../../../../../../../models/filter_operator_schema' +require_relative '../../../../../../applications' +require_relative '../../../../../item' +require_relative '../../../../synchronization' +require_relative '../../../templates' +require_relative '../../item' +require_relative '../schema' +require_relative './filter_operators' + +module MicrosoftGraph + module Applications + module Item + module Synchronization + module Templates + module Item + module Schema + module FilterOperators + class FilterOperatorsGetResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new FilterOperatorsGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a filter_operators_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return FilterOperatorsGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::FilterOperatorSchema.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a filter_operator_schema + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end + end + end + end +end diff --git a/lib/applications/item/synchronization/templates/item/schema/filter_operators/filter_operators_request_builder.rb b/lib/applications/item/synchronization/templates/item/schema/filter_operators/filter_operators_request_builder.rb index 2576dabc41..377d732b9d 100644 --- a/lib/applications/item/synchronization/templates/item/schema/filter_operators/filter_operators_request_builder.rb +++ b/lib/applications/item/synchronization/templates/item/schema/filter_operators/filter_operators_request_builder.rb @@ -28,49 +28,60 @@ class FilterOperatorsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBui ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/filterOperators(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/filterOperators(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Invoke function filterOperators + ## List all operators supported in the scoping filters. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of filter_operators_response + ## @return a Fiber of filter_operators_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Applications::Item::Synchronization::Templates::Item::Schema::FilterOperators::FilterOperatorsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Applications::Item::Synchronization::Templates::Item::Schema::FilterOperators::FilterOperatorsGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Invoke function filterOperators + ## List all operators supported in the scoping filters. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a filter_operators_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return FilterOperatorsRequestBuilder.new(raw_url, @request_adapter) + end ## - # Invoke function filterOperators + # List all operators supported in the scoping filters. class FilterOperatorsRequestBuilderGetQueryParameters ## # Include count of items attr_accessor :count ## + # Expand related entities + attr_accessor :expand + ## # Filter items by property values attr_accessor :filter ## @@ -98,6 +109,8 @@ def get_query_parameter(original_name) case original_name when "count" return "%24count" + when "expand" + return "%24expand" when "filter" return "%24filter" when "orderby" diff --git a/lib/applications/item/synchronization/templates/item/schema/filter_operators/filter_operators_response.rb b/lib/applications/item/synchronization/templates/item/schema/filter_operators/filter_operators_response.rb deleted file mode 100644 index 8d45d29496..0000000000 --- a/lib/applications/item/synchronization/templates/item/schema/filter_operators/filter_operators_response.rb +++ /dev/null @@ -1,84 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/base_collection_pagination_count_response' -require_relative '../../../../../../../models/filter_operator_schema' -require_relative '../../../../../../applications' -require_relative '../../../../../item' -require_relative '../../../../synchronization' -require_relative '../../../templates' -require_relative '../../item' -require_relative '../schema' -require_relative './filter_operators' - -module MicrosoftGraph - module Applications - module Item - module Synchronization - module Templates - module Item - module Schema - module FilterOperators - class FilterOperatorsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new filterOperatorsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a filter_operators_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return FilterOperatorsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::FilterOperatorSchema.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a filter_operator_schema - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end - end - end - end -end diff --git a/lib/applications/item/synchronization/templates/item/schema/functions/functions.rb b/lib/applications/item/synchronization/templates/item/schema/functions/functions.rb index 83e3ceed1d..f3acee0863 100644 --- a/lib/applications/item/synchronization/templates/item/schema/functions/functions.rb +++ b/lib/applications/item/synchronization/templates/item/schema/functions/functions.rb @@ -1 +1 @@ -require_relative 'functions_response' +require_relative 'functions_get_response' diff --git a/lib/applications/item/synchronization/templates/item/schema/functions/functions_get_response.rb b/lib/applications/item/synchronization/templates/item/schema/functions/functions_get_response.rb new file mode 100644 index 0000000000..72bb240e11 --- /dev/null +++ b/lib/applications/item/synchronization/templates/item/schema/functions/functions_get_response.rb @@ -0,0 +1,84 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/attribute_mapping_function_schema' +require_relative '../../../../../../../models/base_collection_pagination_count_response' +require_relative '../../../../../../applications' +require_relative '../../../../../item' +require_relative '../../../../synchronization' +require_relative '../../../templates' +require_relative '../../item' +require_relative '../schema' +require_relative './functions' + +module MicrosoftGraph + module Applications + module Item + module Synchronization + module Templates + module Item + module Schema + module Functions + class FunctionsGetResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new FunctionsGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a functions_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return FunctionsGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AttributeMappingFunctionSchema.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a attribute_mapping_function_schema + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end + end + end + end +end diff --git a/lib/applications/item/synchronization/templates/item/schema/functions/functions_request_builder.rb b/lib/applications/item/synchronization/templates/item/schema/functions/functions_request_builder.rb index b6f867bce4..55512034c3 100644 --- a/lib/applications/item/synchronization/templates/item/schema/functions/functions_request_builder.rb +++ b/lib/applications/item/synchronization/templates/item/schema/functions/functions_request_builder.rb @@ -28,49 +28,60 @@ class FunctionsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/functions(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/functions(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Invoke function functions + ## List all the functions currently supported in the attributeMappingSource. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of functions_response + ## @return a Fiber of functions_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Applications::Item::Synchronization::Templates::Item::Schema::Functions::FunctionsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Applications::Item::Synchronization::Templates::Item::Schema::Functions::FunctionsGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Invoke function functions + ## List all the functions currently supported in the attributeMappingSource. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a functions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return FunctionsRequestBuilder.new(raw_url, @request_adapter) + end ## - # Invoke function functions + # List all the functions currently supported in the attributeMappingSource. class FunctionsRequestBuilderGetQueryParameters ## # Include count of items attr_accessor :count ## + # Expand related entities + attr_accessor :expand + ## # Filter items by property values attr_accessor :filter ## @@ -98,6 +109,8 @@ def get_query_parameter(original_name) case original_name when "count" return "%24count" + when "expand" + return "%24expand" when "filter" return "%24filter" when "orderby" diff --git a/lib/applications/item/synchronization/templates/item/schema/functions/functions_response.rb b/lib/applications/item/synchronization/templates/item/schema/functions/functions_response.rb deleted file mode 100644 index 41be3a84dc..0000000000 --- a/lib/applications/item/synchronization/templates/item/schema/functions/functions_response.rb +++ /dev/null @@ -1,84 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/attribute_mapping_function_schema' -require_relative '../../../../../../../models/base_collection_pagination_count_response' -require_relative '../../../../../../applications' -require_relative '../../../../../item' -require_relative '../../../../synchronization' -require_relative '../../../templates' -require_relative '../../item' -require_relative '../schema' -require_relative './functions' - -module MicrosoftGraph - module Applications - module Item - module Synchronization - module Templates - module Item - module Schema - module Functions - class FunctionsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new functionsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a functions_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return FunctionsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AttributeMappingFunctionSchema.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a attribute_mapping_function_schema - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end - end - end - end -end diff --git a/lib/applications/item/synchronization/templates/item/schema/parse_expression/parse_expression_post_request_body.rb b/lib/applications/item/synchronization/templates/item/schema/parse_expression/parse_expression_post_request_body.rb index a1f487b86b..3557b5f470 100644 --- a/lib/applications/item/synchronization/templates/item/schema/parse_expression/parse_expression_post_request_body.rb +++ b/lib/applications/item/synchronization/templates/item/schema/parse_expression/parse_expression_post_request_body.rb @@ -33,22 +33,22 @@ class ParseExpressionPostRequestBody # The testInputObject property @test_input_object ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new parseExpressionPostRequestBody and sets the default values. + ## Instantiates a new ParseExpressionPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/applications/item/synchronization/templates/item/schema/parse_expression/parse_expression_request_builder.rb b/lib/applications/item/synchronization/templates/item/schema/parse_expression/parse_expression_request_builder.rb index 8264866730..2709c18152 100644 --- a/lib/applications/item/synchronization/templates/item/schema/parse_expression/parse_expression_request_builder.rb +++ b/lib/applications/item/synchronization/templates/item/schema/parse_expression/parse_expression_request_builder.rb @@ -32,7 +32,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/parseExpression") end ## - ## Parse a given string expression into an attributeMappingSource object. For more information about expressions, see Writing Expressions for Attribute Mappings in Azure Active Directory. + ## Parse a given string expression into an attributeMappingSource object. For more information about expressions, see Writing Expressions for Attribute Mappings in Microsoft Entra ID. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of parse_expression_response @@ -43,12 +43,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ParseExpressionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Parse a given string expression into an attributeMappingSource object. For more information about expressions, see Writing Expressions for Attribute Mappings in Azure Active Directory. + ## Parse a given string expression into an attributeMappingSource object. For more information about expressions, see Writing Expressions for Attribute Mappings in Microsoft Entra ID. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a parse_expression_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ParseExpressionRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/item/synchronization/templates/item/schema/schema_request_builder.rb b/lib/applications/item/synchronization/templates/item/schema/schema_request_builder.rb index 255e9aac16..d63a0b4059 100644 --- a/lib/applications/item/synchronization/templates/item/schema/schema_request_builder.rb +++ b/lib/applications/item/synchronization/templates/item/schema/schema_request_builder.rb @@ -51,7 +51,7 @@ def parse_expression() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema{?%24expand,%24select}") end ## ## Delete navigation property schema for applications @@ -63,8 +63,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -77,8 +76,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SynchronizationSchema.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -93,8 +91,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SynchronizationSchema.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -104,13 +101,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -120,15 +118,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -140,17 +138,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a schema_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SchemaRequestBuilder.new(raw_url, @request_adapter) + end ## # Default synchronization schema for the jobs based on this template. diff --git a/lib/applications/item/synchronization/templates/item/synchronization_template_item_request_builder.rb b/lib/applications/item/synchronization/templates/item/synchronization_template_item_request_builder.rb index a74df2c30e..f5768fc780 100644 --- a/lib/applications/item/synchronization/templates/item/synchronization_template_item_request_builder.rb +++ b/lib/applications/item/synchronization/templates/item/synchronization_template_item_request_builder.rb @@ -31,7 +31,7 @@ def schema() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}{?%24expand,%24select}") end ## ## Delete navigation property templates for applications @@ -43,12 +43,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Pre-configured synchronization settings for a particular application. + ## Preconfigured synchronization settings for a particular application. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of synchronization_template ## @@ -57,8 +56,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SynchronizationTemplate.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -73,8 +71,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SynchronizationTemplate.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -84,31 +81,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Pre-configured synchronization settings for a particular application. + ## Preconfigured synchronization settings for a particular application. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -120,20 +118,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a synchronization_template_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SynchronizationTemplateItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Pre-configured synchronization settings for a particular application. + # Preconfigured synchronization settings for a particular application. class SynchronizationTemplateItemRequestBuilderGetQueryParameters ## diff --git a/lib/applications/item/synchronization/templates/templates_request_builder.rb b/lib/applications/item/synchronization/templates/templates_request_builder.rb index e76d9af1f5..f65a377b5d 100644 --- a/lib/applications/item/synchronization/templates/templates_request_builder.rb +++ b/lib/applications/item/synchronization/templates/templates_request_builder.rb @@ -42,10 +42,10 @@ def by_synchronization_template_id(synchronization_template_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## List the synchronization templates associated with a given application or service principal. + ## Preconfigured synchronization settings for a particular application. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of synchronization_template_collection_response ## @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SynchronizationTemplateCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,26 +69,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SynchronizationTemplate.create_from_discriminator_value(pn) }, error_mapping) end ## - ## List the synchronization templates associated with a given application or service principal. + ## Preconfigured synchronization settings for a particular application. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,20 +99,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a templates_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TemplatesRequestBuilder.new(raw_url, @request_adapter) + end ## - # List the synchronization templates associated with a given application or service principal. + # Preconfigured synchronization settings for a particular application. class TemplatesRequestBuilderGetQueryParameters ## diff --git a/lib/applications/item/token_issuance_policies/count/count_request_builder.rb b/lib/applications/item/token_issuance_policies/count/count_request_builder.rb index 9f5d69a17a..30a82993ad 100644 --- a/lib/applications/item/token_issuance_policies/count/count_request_builder.rb +++ b/lib/applications/item/token_issuance_policies/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/tokenIssuancePolicies/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/tokenIssuancePolicies/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/applications/item/token_issuance_policies/item/ref/ref_request_builder.rb b/lib/applications/item/token_issuance_policies/item/ref/ref_request_builder.rb index 1126a9a158..0be2eb2502 100644 --- a/lib/applications/item/token_issuance_policies/item/ref/ref_request_builder.rb +++ b/lib/applications/item/token_issuance_policies/item/ref/ref_request_builder.rb @@ -24,7 +24,7 @@ class RefRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/tokenIssuancePolicies/{tokenIssuancePolicy%2Did}/$ref{?%40id*}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/tokenIssuancePolicies/{tokenIssuancePolicy%2Did}/$ref") end ## ## Remove a tokenIssuancePolicy from an application. @@ -36,8 +36,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,38 +46,24 @@ def delete(request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end - ## - # Remove a tokenIssuancePolicy from an application. - class RefRequestBuilderDeleteQueryParameters - - ## - # Delete Uri - attr_accessor :id - ## - ## Maps the query parameters names to their encoded names for the URI template parsing. - ## @param original_name The original query parameter name in the class. - ## @return a string - ## - def get_query_parameter(original_name) - raise StandardError, 'original_name cannot be null' if original_name.nil? - case original_name - when "id" - return "%40id" - else - return original_name - end - end + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ref_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RefRequestBuilder.new(raw_url, @request_adapter) end end end diff --git a/lib/applications/item/token_issuance_policies/ref/ref_request_builder.rb b/lib/applications/item/token_issuance_policies/ref/ref_request_builder.rb index 1806535d1d..32d6f97460 100644 --- a/lib/applications/item/token_issuance_policies/ref/ref_request_builder.rb +++ b/lib/applications/item/token_issuance_policies/ref/ref_request_builder.rb @@ -24,7 +24,20 @@ class RefRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/tokenIssuancePolicies/$ref{?%24top,%24skip,%24search,%24filter,%24count,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/tokenIssuancePolicies/$ref?@id={%40id}{&%24count,%24filter,%24orderby,%24search,%24skip,%24top}") + end + ## + ## Remove a tokenIssuancePolicy from an application. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) end ## ## List the tokenIssuancePolicy objects that are assigned to an application. @@ -36,8 +49,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::StringCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,26 +64,43 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## + ## Remove a tokenIssuancePolicy from an application. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = '{+baseurl}/applications/{application%2Did}/tokenIssuancePolicies/$ref?@id={%40id}' + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## ## List the tokenIssuancePolicy objects that are assigned to an application. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = '{+baseurl}/applications/{application%2Did}/tokenIssuancePolicies/$ref{?%24count,%24filter,%24orderby,%24search,%24skip,%24top}' + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -83,16 +112,49 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = '{+baseurl}/applications/{application%2Did}/tokenIssuancePolicies/$ref' + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ref_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RefRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Remove a tokenIssuancePolicy from an application. + class RefRequestBuilderDeleteQueryParameters + + ## + # The delete Uri + attr_accessor :id + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "id" + return "%40id" + else + return original_name + end + end + end ## # List the tokenIssuancePolicy objects that are assigned to an application. diff --git a/lib/applications/item/token_issuance_policies/token_issuance_policies_request_builder.rb b/lib/applications/item/token_issuance_policies/token_issuance_policies_request_builder.rb index aad780cab3..6bab4ab70b 100644 --- a/lib/applications/item/token_issuance_policies/token_issuance_policies_request_builder.rb +++ b/lib/applications/item/token_issuance_policies/token_issuance_policies_request_builder.rb @@ -29,7 +29,7 @@ def ref() end ## ## Gets an item from the MicrosoftGraph.applications.item.tokenIssuancePolicies.item collection - ## @param token_issuance_policy_id Unique identifier of the item + ## @param token_issuance_policy_id The unique identifier of tokenIssuancePolicy ## @return a token_issuance_policy_item_request_builder ## def by_token_issuance_policy_id(token_issuance_policy_id) @@ -45,7 +45,7 @@ def by_token_issuance_policy_id(token_issuance_policy_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/tokenIssuancePolicies{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/tokenIssuancePolicies{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List the tokenIssuancePolicy objects that are assigned to an application. @@ -57,8 +57,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TokenIssuancePolicyCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -68,17 +67,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a token_issuance_policies_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TokenIssuancePoliciesRequestBuilder.new(raw_url, @request_adapter) + end ## # List the tokenIssuancePolicy objects that are assigned to an application. diff --git a/lib/applications/item/token_lifetime_policies/count/count_request_builder.rb b/lib/applications/item/token_lifetime_policies/count/count_request_builder.rb index 8b9a2f7eed..054b99e4b2 100644 --- a/lib/applications/item/token_lifetime_policies/count/count_request_builder.rb +++ b/lib/applications/item/token_lifetime_policies/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/tokenLifetimePolicies/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/tokenLifetimePolicies/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/applications/item/token_lifetime_policies/item/ref/ref_request_builder.rb b/lib/applications/item/token_lifetime_policies/item/ref/ref_request_builder.rb index d4834a79b3..9ad73f4b56 100644 --- a/lib/applications/item/token_lifetime_policies/item/ref/ref_request_builder.rb +++ b/lib/applications/item/token_lifetime_policies/item/ref/ref_request_builder.rb @@ -24,7 +24,7 @@ class RefRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/tokenLifetimePolicies/{tokenLifetimePolicy%2Did}/$ref{?%40id*}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/tokenLifetimePolicies/{tokenLifetimePolicy%2Did}/$ref") end ## ## Remove a tokenLifetimePolicy from an application. @@ -36,8 +36,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,38 +46,24 @@ def delete(request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end - ## - # Remove a tokenLifetimePolicy from an application. - class RefRequestBuilderDeleteQueryParameters - - ## - # Delete Uri - attr_accessor :id - ## - ## Maps the query parameters names to their encoded names for the URI template parsing. - ## @param original_name The original query parameter name in the class. - ## @return a string - ## - def get_query_parameter(original_name) - raise StandardError, 'original_name cannot be null' if original_name.nil? - case original_name - when "id" - return "%40id" - else - return original_name - end - end + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ref_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RefRequestBuilder.new(raw_url, @request_adapter) end end end diff --git a/lib/applications/item/token_lifetime_policies/ref/ref_request_builder.rb b/lib/applications/item/token_lifetime_policies/ref/ref_request_builder.rb index 12ab675508..30cbb64646 100644 --- a/lib/applications/item/token_lifetime_policies/ref/ref_request_builder.rb +++ b/lib/applications/item/token_lifetime_policies/ref/ref_request_builder.rb @@ -24,7 +24,20 @@ class RefRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/tokenLifetimePolicies/$ref{?%24top,%24skip,%24search,%24filter,%24count,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/tokenLifetimePolicies/$ref?@id={%40id}{&%24count,%24filter,%24orderby,%24search,%24skip,%24top}") + end + ## + ## Remove a tokenLifetimePolicy from an application. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) end ## ## List the tokenLifetimePolicy objects that are assigned to an application. Only one object is returned in the collection because only one tokenLifetimePolicy can be assigned to an application. @@ -36,8 +49,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::StringCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,26 +64,43 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## + ## Remove a tokenLifetimePolicy from an application. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = '{+baseurl}/applications/{application%2Did}/tokenLifetimePolicies/$ref?@id={%40id}' + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## ## List the tokenLifetimePolicy objects that are assigned to an application. Only one object is returned in the collection because only one tokenLifetimePolicy can be assigned to an application. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = '{+baseurl}/applications/{application%2Did}/tokenLifetimePolicies/$ref{?%24count,%24filter,%24orderby,%24search,%24skip,%24top}' + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -83,16 +112,49 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = '{+baseurl}/applications/{application%2Did}/tokenLifetimePolicies/$ref' + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ref_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RefRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Remove a tokenLifetimePolicy from an application. + class RefRequestBuilderDeleteQueryParameters + + ## + # The delete Uri + attr_accessor :id + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "id" + return "%40id" + else + return original_name + end + end + end ## # List the tokenLifetimePolicy objects that are assigned to an application. Only one object is returned in the collection because only one tokenLifetimePolicy can be assigned to an application. diff --git a/lib/applications/item/token_lifetime_policies/token_lifetime_policies_request_builder.rb b/lib/applications/item/token_lifetime_policies/token_lifetime_policies_request_builder.rb index 4623e77856..c546b0bb59 100644 --- a/lib/applications/item/token_lifetime_policies/token_lifetime_policies_request_builder.rb +++ b/lib/applications/item/token_lifetime_policies/token_lifetime_policies_request_builder.rb @@ -29,7 +29,7 @@ def ref() end ## ## Gets an item from the MicrosoftGraph.applications.item.tokenLifetimePolicies.item collection - ## @param token_lifetime_policy_id Unique identifier of the item + ## @param token_lifetime_policy_id The unique identifier of tokenLifetimePolicy ## @return a token_lifetime_policy_item_request_builder ## def by_token_lifetime_policy_id(token_lifetime_policy_id) @@ -45,7 +45,7 @@ def by_token_lifetime_policy_id(token_lifetime_policy_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/tokenLifetimePolicies{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications/{application%2Did}/tokenLifetimePolicies{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List the tokenLifetimePolicy objects that are assigned to an application. Only one object is returned in the collection because only one tokenLifetimePolicy can be assigned to an application. @@ -57,8 +57,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TokenLifetimePolicyCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -68,17 +67,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a token_lifetime_policies_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TokenLifetimePoliciesRequestBuilder.new(raw_url, @request_adapter) + end ## # List the tokenLifetimePolicy objects that are assigned to an application. Only one object is returned in the collection because only one tokenLifetimePolicy can be assigned to an application. diff --git a/lib/applications/item/unset_verified_publisher/unset_verified_publisher_request_builder.rb b/lib/applications/item/unset_verified_publisher/unset_verified_publisher_request_builder.rb index b44b16c40d..96a1dc7055 100644 --- a/lib/applications/item/unset_verified_publisher/unset_verified_publisher_request_builder.rb +++ b/lib/applications/item/unset_verified_publisher/unset_verified_publisher_request_builder.rb @@ -32,8 +32,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -43,15 +42,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a unset_verified_publisher_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UnsetVerifiedPublisherRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications/validate_properties/validate_properties_post_request_body.rb b/lib/applications/validate_properties/validate_properties_post_request_body.rb index 478bc233aa..9c4275d681 100644 --- a/lib/applications/validate_properties/validate_properties_post_request_body.rb +++ b/lib/applications/validate_properties/validate_properties_post_request_body.rb @@ -24,22 +24,22 @@ class ValidatePropertiesPostRequestBody # The onBehalfOfUserId property @on_behalf_of_user_id ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new validatePropertiesPostRequestBody and sets the default values. + ## Instantiates a new ValidatePropertiesPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/applications/validate_properties/validate_properties_request_builder.rb b/lib/applications/validate_properties/validate_properties_request_builder.rb index 8b0461b4df..b84f41fd18 100644 --- a/lib/applications/validate_properties/validate_properties_request_builder.rb +++ b/lib/applications/validate_properties/validate_properties_request_builder.rb @@ -21,7 +21,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/applications/validateProperties") end ## - ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you're only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void @@ -32,12 +32,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you're only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -45,16 +44,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a validate_properties_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ValidatePropertiesRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/applications_with_app_id/applications_with_app_id_request_builder.rb b/lib/applications_with_app_id/applications_with_app_id_request_builder.rb index 4f3711f375..cb1cc198cd 100644 --- a/lib/applications_with_app_id/applications_with_app_id_request_builder.rb +++ b/lib/applications_with_app_id/applications_with_app_id_request_builder.rb @@ -18,7 +18,7 @@ class ApplicationsWithAppIdRequestBuilder < MicrosoftKiotaAbstractions::BaseRequ ## @return a void ## def initialize(path_parameters, request_adapter, app_id=nil) - super(path_parameters, request_adapter, "{+baseurl}/applications(appId='{appId}'){?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/applications(appId='{appId}'){?%24expand,%24select}") end ## ## Delete an application object. When deleted, apps are moved to a temporary container and can be restored within 30 days. After that time, they are permanently deleted. @@ -30,8 +30,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -44,12 +43,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Application.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Update the properties of an application object. + ## Create a new application object if it doesn't exist, or update the properties of an existing application object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of application @@ -60,8 +58,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Application.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -71,13 +68,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -87,19 +85,19 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Update the properties of an application object. + ## Create a new application object if it doesn't exist, or update the properties of an existing application object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -107,17 +105,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a applications_with_app_id_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ApplicationsWithAppIdRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the properties and relationships of an application object. diff --git a/lib/groups/item/calendar/calendar_view/item/extensions/item/item.rb b/lib/applications_with_unique_name/applications_with_unique_name.rb similarity index 100% rename from lib/groups/item/calendar/calendar_view/item/extensions/item/item.rb rename to lib/applications_with_unique_name/applications_with_unique_name.rb diff --git a/lib/applications_with_unique_name/applications_with_unique_name_request_builder.rb b/lib/applications_with_unique_name/applications_with_unique_name_request_builder.rb new file mode 100644 index 0000000000..c215799809 --- /dev/null +++ b/lib/applications_with_unique_name/applications_with_unique_name_request_builder.rb @@ -0,0 +1,158 @@ +require 'microsoft_kiota_abstractions' +require_relative '../microsoft_graph' +require_relative '../models/application' +require_relative '../models/o_data_errors_o_data_error' +require_relative './applications_with_unique_name' + +module MicrosoftGraph + module ApplicationsWithUniqueName + ## + # Provides operations to manage the collection of application entities. + class ApplicationsWithUniqueNameRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new ApplicationsWithUniqueNameRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @param unique_name Alternate key of application + ## @return a void + ## + def initialize(path_parameters, request_adapter, unique_name=nil) + super(path_parameters, request_adapter, "{+baseurl}/applications(uniqueName='{uniqueName}'){?%24expand,%24select}") + end + ## + ## Delete an application object. When deleted, apps are moved to a temporary container and can be restored within 30 days. After that time, they are permanently deleted. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Get the properties and relationships of an application object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of application + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Application.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create a new application object if it doesn't exist, or update the properties of an existing application object. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of application + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Application.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete an application object. When deleted, apps are moved to a temporary container and can be restored within 30 days. After that time, they are permanently deleted. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Get the properties and relationships of an application object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create a new application object if it doesn't exist, or update the properties of an existing application object. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a applications_with_unique_name_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ApplicationsWithUniqueNameRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the properties and relationships of an application object. + class ApplicationsWithUniqueNameRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end +end diff --git a/lib/audit_logs/audit_logs_request_builder.rb b/lib/audit_logs/audit_logs_request_builder.rb index 59929124b4..fed5cb2549 100644 --- a/lib/audit_logs/audit_logs_request_builder.rb +++ b/lib/audit_logs/audit_logs_request_builder.rb @@ -35,7 +35,7 @@ def sign_ins() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/auditLogs{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/auditLogs{?%24expand,%24select}") end ## ## Get auditLogs @@ -47,8 +47,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AuditLogRoot.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +62,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AuditLogRoot.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,15 +72,15 @@ def patch(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,17 +92,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a audit_logs_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AuditLogsRequestBuilder.new(raw_url, @request_adapter) + end ## # Get auditLogs diff --git a/lib/audit_logs/directory_audits/count/count_request_builder.rb b/lib/audit_logs/directory_audits/count/count_request_builder.rb index f6b355b0e7..d5fcc0e169 100644 --- a/lib/audit_logs/directory_audits/count/count_request_builder.rb +++ b/lib/audit_logs/directory_audits/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/auditLogs/directoryAudits/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/auditLogs/directoryAudits/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/audit_logs/directory_audits/directory_audits_request_builder.rb b/lib/audit_logs/directory_audits/directory_audits_request_builder.rb index ad0a74cba5..624bd925d5 100644 --- a/lib/audit_logs/directory_audits/directory_audits_request_builder.rb +++ b/lib/audit_logs/directory_audits/directory_audits_request_builder.rb @@ -38,10 +38,10 @@ def by_directory_audit_id(directory_audit_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/auditLogs/directoryAudits{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/auditLogs/directoryAudits{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Get the list of audit logs generated by Azure Active Directory (Azure AD). This includes audit logs generated by various services within Azure AD, including user, app, device and group Management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (self-service and admin password resets), and self- service group management, and so on. + ## Get the list of audit logs generated by Microsoft Entra ID. This includes audit logs generated by various services within Microsoft Entra ID, including user, app, device and group Management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (self-service and admin password resets), and self- service group management, and so on. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_audit_collection_response ## @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryAuditCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,26 +65,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryAudit.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Get the list of audit logs generated by Azure Active Directory (Azure AD). This includes audit logs generated by various services within Azure AD, including user, app, device and group Management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (self-service and admin password resets), and self- service group management, and so on. + ## Get the list of audit logs generated by Microsoft Entra ID. This includes audit logs generated by various services within Microsoft Entra ID, including user, app, device and group Management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (self-service and admin password resets), and self- service group management, and so on. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,20 +95,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a directory_audits_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DirectoryAuditsRequestBuilder.new(raw_url, @request_adapter) + end ## - # Get the list of audit logs generated by Azure Active Directory (Azure AD). This includes audit logs generated by various services within Azure AD, including user, app, device and group Management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (self-service and admin password resets), and self- service group management, and so on. + # Get the list of audit logs generated by Microsoft Entra ID. This includes audit logs generated by various services within Microsoft Entra ID, including user, app, device and group Management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (self-service and admin password resets), and self- service group management, and so on. class DirectoryAuditsRequestBuilderGetQueryParameters ## diff --git a/lib/audit_logs/directory_audits/item/directory_audit_item_request_builder.rb b/lib/audit_logs/directory_audits/item/directory_audit_item_request_builder.rb index 529a086af4..142cf6cd46 100644 --- a/lib/audit_logs/directory_audits/item/directory_audit_item_request_builder.rb +++ b/lib/audit_logs/directory_audits/item/directory_audit_item_request_builder.rb @@ -21,7 +21,7 @@ class DirectoryAuditItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequest ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/auditLogs/directoryAudits/{directoryAudit%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/auditLogs/directoryAudits/{directoryAudit%2Did}{?%24expand,%24select}") end ## ## Delete navigation property directoryAudits for auditLogs @@ -33,12 +33,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Get a specific Azure Active Directory audit log item. This includes an audit log item generated by various services within Azure Active Directory like user, application, device and group management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (self-service and admin password resets), self-service group management, and so on. + ## Get a specific Microsoft Entra audit log item. This includes an audit log item generated by various services within Microsoft Entra ID like user, application, device and group management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (self-service and admin password resets), self-service group management, and so on. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_audit ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryAudit.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryAudit.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,31 +71,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Get a specific Azure Active Directory audit log item. This includes an audit log item generated by various services within Azure Active Directory like user, application, device and group management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (self-service and admin password resets), self-service group management, and so on. + ## Get a specific Microsoft Entra audit log item. This includes an audit log item generated by various services within Microsoft Entra ID like user, application, device and group management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (self-service and admin password resets), self-service group management, and so on. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,20 +108,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a directory_audit_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DirectoryAuditItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Get a specific Azure Active Directory audit log item. This includes an audit log item generated by various services within Azure Active Directory like user, application, device and group management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (self-service and admin password resets), self-service group management, and so on. + # Get a specific Microsoft Entra audit log item. This includes an audit log item generated by various services within Microsoft Entra ID like user, application, device and group management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (self-service and admin password resets), self-service group management, and so on. class DirectoryAuditItemRequestBuilderGetQueryParameters ## diff --git a/lib/audit_logs/provisioning/count/count_request_builder.rb b/lib/audit_logs/provisioning/count/count_request_builder.rb index 76b719d0d2..c7cc97dcca 100644 --- a/lib/audit_logs/provisioning/count/count_request_builder.rb +++ b/lib/audit_logs/provisioning/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/auditLogs/provisioning/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/auditLogs/provisioning/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/audit_logs/provisioning/item/provisioning_object_summary_item_request_builder.rb b/lib/audit_logs/provisioning/item/provisioning_object_summary_item_request_builder.rb index fd1a9f4b43..6d3a1bf1ea 100644 --- a/lib/audit_logs/provisioning/item/provisioning_object_summary_item_request_builder.rb +++ b/lib/audit_logs/provisioning/item/provisioning_object_summary_item_request_builder.rb @@ -21,7 +21,7 @@ class ProvisioningObjectSummaryItemRequestBuilder < MicrosoftKiotaAbstractions:: ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/auditLogs/provisioning/{provisioningObjectSummary%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/auditLogs/provisioning/{provisioningObjectSummary%2Did}{?%24expand,%24select}") end ## ## Delete navigation property provisioning for auditLogs @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ProvisioningObjectSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ProvisioningObjectSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a provisioning_object_summary_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ProvisioningObjectSummaryItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Get provisioning from auditLogs diff --git a/lib/audit_logs/provisioning/provisioning_request_builder.rb b/lib/audit_logs/provisioning/provisioning_request_builder.rb index b768796b5b..5bedbbd0f0 100644 --- a/lib/audit_logs/provisioning/provisioning_request_builder.rb +++ b/lib/audit_logs/provisioning/provisioning_request_builder.rb @@ -38,7 +38,7 @@ def by_provisioning_object_summary_id(provisioning_object_summary_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/auditLogs/provisioning{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/auditLogs/provisioning{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get all provisioning events that occurred in your tenant, such as the deletion of a group in a target application or the creation of a user when provisioning user accounts from your HR system. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ProvisioningObjectSummaryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ProvisioningObjectSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a provisioning_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ProvisioningRequestBuilder.new(raw_url, @request_adapter) + end ## # Get all provisioning events that occurred in your tenant, such as the deletion of a group in a target application or the creation of a user when provisioning user accounts from your HR system. diff --git a/lib/audit_logs/sign_ins/confirm_compromised/confirm_compromised.rb b/lib/audit_logs/sign_ins/confirm_compromised/confirm_compromised.rb new file mode 100644 index 0000000000..ad980eb2d9 --- /dev/null +++ b/lib/audit_logs/sign_ins/confirm_compromised/confirm_compromised.rb @@ -0,0 +1 @@ +require_relative 'confirm_compromised_post_request_body' diff --git a/lib/audit_logs/sign_ins/confirm_compromised/confirm_compromised_post_request_body.rb b/lib/audit_logs/sign_ins/confirm_compromised/confirm_compromised_post_request_body.rb new file mode 100644 index 0000000000..0e7d5e0a34 --- /dev/null +++ b/lib/audit_logs/sign_ins/confirm_compromised/confirm_compromised_post_request_body.rb @@ -0,0 +1,88 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../audit_logs' +require_relative '../sign_ins' +require_relative './confirm_compromised' + +module MicrosoftGraph + module AuditLogs + module SignIns + module ConfirmCompromised + class ConfirmCompromisedPostRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The requestIds property + @request_ids + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new ConfirmCompromisedPostRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a confirm_compromised_post_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return ConfirmCompromisedPostRequestBody.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "requestIds" => lambda {|n| @request_ids = n.get_collection_of_primitive_values(String) }, + } + end + ## + ## Gets the requestIds property value. The requestIds property + ## @return a string + ## + def request_ids + return @request_ids + end + ## + ## Sets the requestIds property value. The requestIds property + ## @param value Value to set for the requestIds property. + ## @return a void + ## + def request_ids=(value) + @request_ids = value + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_collection_of_primitive_values("requestIds", @request_ids) + writer.write_additional_data(@additional_data) + end + end + end + end + end +end diff --git a/lib/audit_logs/sign_ins/confirm_compromised/confirm_compromised_request_builder.rb b/lib/audit_logs/sign_ins/confirm_compromised/confirm_compromised_request_builder.rb new file mode 100644 index 0000000000..99942887e2 --- /dev/null +++ b/lib/audit_logs/sign_ins/confirm_compromised/confirm_compromised_request_builder.rb @@ -0,0 +1,73 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../audit_logs' +require_relative '../sign_ins' +require_relative './confirm_compromised' + +module MicrosoftGraph + module AuditLogs + module SignIns + module ConfirmCompromised + ## + # Provides operations to call the confirmCompromised method. + class ConfirmCompromisedRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new ConfirmCompromisedRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/auditLogs/signIns/confirmCompromised") + end + ## + ## Mark an event in the Microsoft Entra sign-in logs as risky. Events marked as risky by an admin are immediately flagged as high risk in Microsoft Entra ID Protection, overriding previous risk states. Admins can confirm that events flagged as risky by Microsoft Entra ID Protection are in fact risky. For details about investigating Identity Protection risks, see How to investigate risk. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Mark an event in the Microsoft Entra sign-in logs as risky. Events marked as risky by an admin are immediately flagged as high risk in Microsoft Entra ID Protection, overriding previous risk states. Admins can confirm that events flagged as risky by Microsoft Entra ID Protection are in fact risky. For details about investigating Identity Protection risks, see How to investigate risk. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a confirm_compromised_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ConfirmCompromisedRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end +end diff --git a/lib/audit_logs/sign_ins/confirm_safe/confirm_safe.rb b/lib/audit_logs/sign_ins/confirm_safe/confirm_safe.rb new file mode 100644 index 0000000000..b850100d06 --- /dev/null +++ b/lib/audit_logs/sign_ins/confirm_safe/confirm_safe.rb @@ -0,0 +1 @@ +require_relative 'confirm_safe_post_request_body' diff --git a/lib/audit_logs/sign_ins/confirm_safe/confirm_safe_post_request_body.rb b/lib/audit_logs/sign_ins/confirm_safe/confirm_safe_post_request_body.rb new file mode 100644 index 0000000000..3ca369c451 --- /dev/null +++ b/lib/audit_logs/sign_ins/confirm_safe/confirm_safe_post_request_body.rb @@ -0,0 +1,88 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../audit_logs' +require_relative '../sign_ins' +require_relative './confirm_safe' + +module MicrosoftGraph + module AuditLogs + module SignIns + module ConfirmSafe + class ConfirmSafePostRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The requestIds property + @request_ids + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new ConfirmSafePostRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a confirm_safe_post_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return ConfirmSafePostRequestBody.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "requestIds" => lambda {|n| @request_ids = n.get_collection_of_primitive_values(String) }, + } + end + ## + ## Gets the requestIds property value. The requestIds property + ## @return a string + ## + def request_ids + return @request_ids + end + ## + ## Sets the requestIds property value. The requestIds property + ## @param value Value to set for the requestIds property. + ## @return a void + ## + def request_ids=(value) + @request_ids = value + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_collection_of_primitive_values("requestIds", @request_ids) + writer.write_additional_data(@additional_data) + end + end + end + end + end +end diff --git a/lib/audit_logs/sign_ins/confirm_safe/confirm_safe_request_builder.rb b/lib/audit_logs/sign_ins/confirm_safe/confirm_safe_request_builder.rb new file mode 100644 index 0000000000..6d19ac63e4 --- /dev/null +++ b/lib/audit_logs/sign_ins/confirm_safe/confirm_safe_request_builder.rb @@ -0,0 +1,73 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../audit_logs' +require_relative '../sign_ins' +require_relative './confirm_safe' + +module MicrosoftGraph + module AuditLogs + module SignIns + module ConfirmSafe + ## + # Provides operations to call the confirmSafe method. + class ConfirmSafeRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new ConfirmSafeRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/auditLogs/signIns/confirmSafe") + end + ## + ## Mark an event in Microsoft Entra sign-in logs as safe. Admins can either mark the events flagged as risky by Microsoft Entra ID Protection as safe, or they can mark unflagged events as safe. For details about investigating Identity Protection risks, see How to investigate risk. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Mark an event in Microsoft Entra sign-in logs as safe. Admins can either mark the events flagged as risky by Microsoft Entra ID Protection as safe, or they can mark unflagged events as safe. For details about investigating Identity Protection risks, see How to investigate risk. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a confirm_safe_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ConfirmSafeRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end +end diff --git a/lib/audit_logs/sign_ins/count/count_request_builder.rb b/lib/audit_logs/sign_ins/count/count_request_builder.rb index 6bfe8ce642..23c4a5763d 100644 --- a/lib/audit_logs/sign_ins/count/count_request_builder.rb +++ b/lib/audit_logs/sign_ins/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/auditLogs/signIns/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/auditLogs/signIns/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/audit_logs/sign_ins/dismiss/dismiss.rb b/lib/audit_logs/sign_ins/dismiss/dismiss.rb new file mode 100644 index 0000000000..8af31e5c7a --- /dev/null +++ b/lib/audit_logs/sign_ins/dismiss/dismiss.rb @@ -0,0 +1 @@ +require_relative 'dismiss_post_request_body' diff --git a/lib/audit_logs/sign_ins/dismiss/dismiss_post_request_body.rb b/lib/audit_logs/sign_ins/dismiss/dismiss_post_request_body.rb new file mode 100644 index 0000000000..5ad826b9af --- /dev/null +++ b/lib/audit_logs/sign_ins/dismiss/dismiss_post_request_body.rb @@ -0,0 +1,88 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../audit_logs' +require_relative '../sign_ins' +require_relative './dismiss' + +module MicrosoftGraph + module AuditLogs + module SignIns + module Dismiss + class DismissPostRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The requestIds property + @request_ids + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new DismissPostRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a dismiss_post_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return DismissPostRequestBody.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "requestIds" => lambda {|n| @request_ids = n.get_collection_of_primitive_values(String) }, + } + end + ## + ## Gets the requestIds property value. The requestIds property + ## @return a string + ## + def request_ids + return @request_ids + end + ## + ## Sets the requestIds property value. The requestIds property + ## @param value Value to set for the requestIds property. + ## @return a void + ## + def request_ids=(value) + @request_ids = value + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_collection_of_primitive_values("requestIds", @request_ids) + writer.write_additional_data(@additional_data) + end + end + end + end + end +end diff --git a/lib/audit_logs/sign_ins/dismiss/dismiss_request_builder.rb b/lib/audit_logs/sign_ins/dismiss/dismiss_request_builder.rb new file mode 100644 index 0000000000..1df123c6d0 --- /dev/null +++ b/lib/audit_logs/sign_ins/dismiss/dismiss_request_builder.rb @@ -0,0 +1,73 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../audit_logs' +require_relative '../sign_ins' +require_relative './dismiss' + +module MicrosoftGraph + module AuditLogs + module SignIns + module Dismiss + ## + # Provides operations to call the dismiss method. + class DismissRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new DismissRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/auditLogs/signIns/dismiss") + end + ## + ## Mark an event in Microsoft Entra sign-in logs as dismissed. For details about investigating Identity Protection risks, see How to investigate risk. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Mark an event in Microsoft Entra sign-in logs as dismissed. For details about investigating Identity Protection risks, see How to investigate risk. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a dismiss_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DismissRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end +end diff --git a/lib/audit_logs/sign_ins/item/sign_in_item_request_builder.rb b/lib/audit_logs/sign_ins/item/sign_in_item_request_builder.rb index 3c1ea4e985..b677137a3b 100644 --- a/lib/audit_logs/sign_ins/item/sign_in_item_request_builder.rb +++ b/lib/audit_logs/sign_ins/item/sign_in_item_request_builder.rb @@ -21,7 +21,7 @@ class SignInItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/auditLogs/signIns/{signIn%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/auditLogs/signIns/{signIn%2Did}{?%24expand,%24select}") end ## ## Delete navigation property signIns for auditLogs @@ -33,12 +33,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Retrieve a specific Azure AD user sign-in event for your tenant. Sign-ins that are interactive in nature (where a username/password is passed as part of auth token) and successful federated sign-ins are currently included in the sign-in logs. + ## Retrieve a specific Microsoft Entra user sign-in event for your tenant. Sign-ins that are interactive in nature (where a username/password is passed as part of auth token) and successful federated sign-ins are currently included in the sign-in logs. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of sign_in ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SignIn.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SignIn.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,31 +71,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Retrieve a specific Azure AD user sign-in event for your tenant. Sign-ins that are interactive in nature (where a username/password is passed as part of auth token) and successful federated sign-ins are currently included in the sign-in logs. + ## Retrieve a specific Microsoft Entra user sign-in event for your tenant. Sign-ins that are interactive in nature (where a username/password is passed as part of auth token) and successful federated sign-ins are currently included in the sign-in logs. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,20 +108,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a sign_in_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SignInItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Retrieve a specific Azure AD user sign-in event for your tenant. Sign-ins that are interactive in nature (where a username/password is passed as part of auth token) and successful federated sign-ins are currently included in the sign-in logs. + # Retrieve a specific Microsoft Entra user sign-in event for your tenant. Sign-ins that are interactive in nature (where a username/password is passed as part of auth token) and successful federated sign-ins are currently included in the sign-in logs. class SignInItemRequestBuilderGetQueryParameters ## diff --git a/lib/audit_logs/sign_ins/sign_ins_request_builder.rb b/lib/audit_logs/sign_ins/sign_ins_request_builder.rb index aa2e8546ce..1031011769 100644 --- a/lib/audit_logs/sign_ins/sign_ins_request_builder.rb +++ b/lib/audit_logs/sign_ins/sign_ins_request_builder.rb @@ -4,7 +4,10 @@ require_relative '../../models/sign_in' require_relative '../../models/sign_in_collection_response' require_relative '../audit_logs' +require_relative './confirm_compromised/confirm_compromised_request_builder' +require_relative './confirm_safe/confirm_safe_request_builder' require_relative './count/count_request_builder' +require_relative './dismiss/dismiss_request_builder' require_relative './item/sign_in_item_request_builder' require_relative './sign_ins' @@ -15,12 +18,27 @@ module SignIns # Provides operations to manage the signIns property of the microsoft.graph.auditLogRoot entity. class SignInsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + ## + # Provides operations to call the confirmCompromised method. + def confirm_compromised() + return MicrosoftGraph::AuditLogs::SignIns::ConfirmCompromised::ConfirmCompromisedRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to call the confirmSafe method. + def confirm_safe() + return MicrosoftGraph::AuditLogs::SignIns::ConfirmSafe::ConfirmSafeRequestBuilder.new(@path_parameters, @request_adapter) + end ## # Provides operations to count the resources in the collection. def count() return MicrosoftGraph::AuditLogs::SignIns::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) end ## + # Provides operations to call the dismiss method. + def dismiss() + return MicrosoftGraph::AuditLogs::SignIns::Dismiss::DismissRequestBuilder.new(@path_parameters, @request_adapter) + end + ## ## Provides operations to manage the signIns property of the microsoft.graph.auditLogRoot entity. ## @param sign_in_id The unique identifier of signIn ## @return a sign_in_item_request_builder @@ -38,10 +56,10 @@ def by_sign_in_id(sign_in_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/auditLogs/signIns{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/auditLogs/signIns{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Retrieve the Azure AD user sign-ins for your tenant. Sign-ins that are interactive in nature (where a username/password is passed as part of auth token) and successful federated sign-ins are currently included in the sign-in logs. The maximum and default page size is 1,000 objects and by default, the most recent sign-ins are returned first. Only sign-in events that occurred within the Azure Active Directory (Azure AD) default retention period are available. + ## Retrieve the Microsoft Entra user sign-ins for your tenant. Sign-ins that are interactive in nature (where a username/password is passed as part of auth token) and successful federated sign-ins are currently included in the sign-in logs. The maximum and default page size is 1,000 objects and by default, the most recent sign-ins are returned first. Only sign-in events that occurred within the Microsoft Entra ID default retention period are available. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of sign_in_collection_response ## @@ -50,8 +68,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SignInCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,26 +83,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SignIn.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Retrieve the Azure AD user sign-ins for your tenant. Sign-ins that are interactive in nature (where a username/password is passed as part of auth token) and successful federated sign-ins are currently included in the sign-in logs. The maximum and default page size is 1,000 objects and by default, the most recent sign-ins are returned first. Only sign-in events that occurred within the Azure Active Directory (Azure AD) default retention period are available. + ## Retrieve the Microsoft Entra user sign-ins for your tenant. Sign-ins that are interactive in nature (where a username/password is passed as part of auth token) and successful federated sign-ins are currently included in the sign-in logs. The maximum and default page size is 1,000 objects and by default, the most recent sign-ins are returned first. Only sign-in events that occurred within the Microsoft Entra ID default retention period are available. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,20 +113,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a sign_ins_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SignInsRequestBuilder.new(raw_url, @request_adapter) + end ## - # Retrieve the Azure AD user sign-ins for your tenant. Sign-ins that are interactive in nature (where a username/password is passed as part of auth token) and successful federated sign-ins are currently included in the sign-in logs. The maximum and default page size is 1,000 objects and by default, the most recent sign-ins are returned first. Only sign-in events that occurred within the Azure Active Directory (Azure AD) default retention period are available. + # Retrieve the Microsoft Entra user sign-ins for your tenant. Sign-ins that are interactive in nature (where a username/password is passed as part of auth token) and successful federated sign-ins are currently included in the sign-in logs. The maximum and default page size is 1,000 objects and by default, the most recent sign-ins are returned first. Only sign-in events that occurred within the Microsoft Entra ID default retention period are available. class SignInsRequestBuilderGetQueryParameters ## diff --git a/lib/authentication_method_configurations/authentication_method_configurations_request_builder.rb b/lib/authentication_method_configurations/authentication_method_configurations_request_builder.rb index cc7b5224df..14a4671a50 100644 --- a/lib/authentication_method_configurations/authentication_method_configurations_request_builder.rb +++ b/lib/authentication_method_configurations/authentication_method_configurations_request_builder.rb @@ -36,7 +36,7 @@ def by_authentication_method_configuration_id(authentication_method_configuratio ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/authenticationMethodConfigurations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/authenticationMethodConfigurations{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get entities from authenticationMethodConfigurations @@ -48,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AuthenticationMethodConfigurationCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -64,8 +63,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AuthenticationMethodConfiguration.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -75,15 +73,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -95,17 +93,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a authentication_method_configurations_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AuthenticationMethodConfigurationsRequestBuilder.new(raw_url, @request_adapter) + end ## # Get entities from authenticationMethodConfigurations diff --git a/lib/authentication_method_configurations/count/count_request_builder.rb b/lib/authentication_method_configurations/count/count_request_builder.rb index 93486e2844..5f7329a8a5 100644 --- a/lib/authentication_method_configurations/count/count_request_builder.rb +++ b/lib/authentication_method_configurations/count/count_request_builder.rb @@ -18,7 +18,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/authenticationMethodConfigurations/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/authenticationMethodConfigurations/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -30,8 +30,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -41,17 +40,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/authentication_method_configurations/item/authentication_method_configuration_item_request_builder.rb b/lib/authentication_method_configurations/item/authentication_method_configuration_item_request_builder.rb index 4dd83d0ea5..04fa426e4a 100644 --- a/lib/authentication_method_configurations/item/authentication_method_configuration_item_request_builder.rb +++ b/lib/authentication_method_configurations/item/authentication_method_configuration_item_request_builder.rb @@ -19,7 +19,7 @@ class AuthenticationMethodConfigurationItemRequestBuilder < MicrosoftKiotaAbstra ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/authenticationMethodConfigurations/{authenticationMethodConfiguration%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/authenticationMethodConfigurations/{authenticationMethodConfiguration%2Did}{?%24expand,%24select}") end ## ## Delete entity from authenticationMethodConfigurations @@ -31,8 +31,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,8 +44,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AuthenticationMethodConfiguration.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -61,8 +59,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AuthenticationMethodConfiguration.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -72,13 +69,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -88,15 +86,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -108,17 +106,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a authentication_method_configuration_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AuthenticationMethodConfigurationItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Get entity from authenticationMethodConfigurations by key diff --git a/lib/authentication_methods_policy/authentication_method_configurations/authentication_method_configurations_request_builder.rb b/lib/authentication_methods_policy/authentication_method_configurations/authentication_method_configurations_request_builder.rb index 09e4d74fd0..b39b7eafb2 100644 --- a/lib/authentication_methods_policy/authentication_method_configurations/authentication_method_configurations_request_builder.rb +++ b/lib/authentication_methods_policy/authentication_method_configurations/authentication_method_configurations_request_builder.rb @@ -38,7 +38,7 @@ def by_authentication_method_configuration_id(authentication_method_configuratio ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/authenticationMethodsPolicy/authenticationMethodConfigurations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/authenticationMethodsPolicy/authenticationMethodConfigurations{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Represents the settings for each authentication method. Automatically expanded on GET /policies/authenticationMethodsPolicy. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AuthenticationMethodConfigurationCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AuthenticationMethodConfiguration.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a authentication_method_configurations_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AuthenticationMethodConfigurationsRequestBuilder.new(raw_url, @request_adapter) + end ## # Represents the settings for each authentication method. Automatically expanded on GET /policies/authenticationMethodsPolicy. diff --git a/lib/authentication_methods_policy/authentication_method_configurations/count/count_request_builder.rb b/lib/authentication_methods_policy/authentication_method_configurations/count/count_request_builder.rb index f0f26c4662..3de9c84b57 100644 --- a/lib/authentication_methods_policy/authentication_method_configurations/count/count_request_builder.rb +++ b/lib/authentication_methods_policy/authentication_method_configurations/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/authenticationMethodsPolicy/authenticationMethodConfigurations/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/authenticationMethodsPolicy/authenticationMethodConfigurations/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/authentication_methods_policy/authentication_method_configurations/item/authentication_method_configuration_item_request_builder.rb b/lib/authentication_methods_policy/authentication_method_configurations/item/authentication_method_configuration_item_request_builder.rb index 90917f9d8c..65588d7674 100644 --- a/lib/authentication_methods_policy/authentication_method_configurations/item/authentication_method_configuration_item_request_builder.rb +++ b/lib/authentication_methods_policy/authentication_method_configurations/item/authentication_method_configuration_item_request_builder.rb @@ -21,7 +21,7 @@ class AuthenticationMethodConfigurationItemRequestBuilder < MicrosoftKiotaAbstra ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/authenticationMethodsPolicy/authenticationMethodConfigurations/{authenticationMethodConfiguration%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/authenticationMethodsPolicy/authenticationMethodConfigurations/{authenticationMethodConfiguration%2Did}{?%24expand,%24select}") end ## ## Delete navigation property authenticationMethodConfigurations for authenticationMethodsPolicy @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AuthenticationMethodConfiguration.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AuthenticationMethodConfiguration.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a authentication_method_configuration_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AuthenticationMethodConfigurationItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Represents the settings for each authentication method. Automatically expanded on GET /policies/authenticationMethodsPolicy. diff --git a/lib/authentication_methods_policy/authentication_methods_policy_request_builder.rb b/lib/authentication_methods_policy/authentication_methods_policy_request_builder.rb index ac7ff372dc..6cd74ed776 100644 --- a/lib/authentication_methods_policy/authentication_methods_policy_request_builder.rb +++ b/lib/authentication_methods_policy/authentication_methods_policy_request_builder.rb @@ -23,7 +23,7 @@ def authentication_method_configurations() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/authenticationMethodsPolicy{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/authenticationMethodsPolicy{?%24expand,%24select}") end ## ## Get authenticationMethodsPolicy @@ -35,8 +35,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AuthenticationMethodsPolicy.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -51,8 +50,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AuthenticationMethodsPolicy.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -62,15 +60,15 @@ def patch(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -82,17 +80,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a authentication_methods_policy_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AuthenticationMethodsPolicyRequestBuilder.new(raw_url, @request_adapter) + end ## # Get authenticationMethodsPolicy diff --git a/lib/certificate_based_auth_configuration/certificate_based_auth_configuration_request_builder.rb b/lib/certificate_based_auth_configuration/certificate_based_auth_configuration_request_builder.rb index 071fa37efa..6760713a61 100644 --- a/lib/certificate_based_auth_configuration/certificate_based_auth_configuration_request_builder.rb +++ b/lib/certificate_based_auth_configuration/certificate_based_auth_configuration_request_builder.rb @@ -36,7 +36,7 @@ def by_certificate_based_auth_configuration_id(certificate_based_auth_configurat ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/certificateBasedAuthConfiguration{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/certificateBasedAuthConfiguration{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get entities from certificateBasedAuthConfiguration @@ -48,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CertificateBasedAuthConfigurationCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -64,8 +63,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CertificateBasedAuthConfiguration.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -75,15 +73,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -95,17 +93,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a certificate_based_auth_configuration_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CertificateBasedAuthConfigurationRequestBuilder.new(raw_url, @request_adapter) + end ## # Get entities from certificateBasedAuthConfiguration diff --git a/lib/certificate_based_auth_configuration/count/count_request_builder.rb b/lib/certificate_based_auth_configuration/count/count_request_builder.rb index 8c9518a945..9022c11f60 100644 --- a/lib/certificate_based_auth_configuration/count/count_request_builder.rb +++ b/lib/certificate_based_auth_configuration/count/count_request_builder.rb @@ -18,7 +18,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/certificateBasedAuthConfiguration/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/certificateBasedAuthConfiguration/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -30,8 +30,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -41,17 +40,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/certificate_based_auth_configuration/item/certificate_based_auth_configuration_item_request_builder.rb b/lib/certificate_based_auth_configuration/item/certificate_based_auth_configuration_item_request_builder.rb index 5f2797adea..78e91b9888 100644 --- a/lib/certificate_based_auth_configuration/item/certificate_based_auth_configuration_item_request_builder.rb +++ b/lib/certificate_based_auth_configuration/item/certificate_based_auth_configuration_item_request_builder.rb @@ -19,7 +19,7 @@ class CertificateBasedAuthConfigurationItemRequestBuilder < MicrosoftKiotaAbstra ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/certificateBasedAuthConfiguration/{certificateBasedAuthConfiguration%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/certificateBasedAuthConfiguration/{certificateBasedAuthConfiguration%2Did}{?%24expand,%24select}") end ## ## Delete entity from certificateBasedAuthConfiguration @@ -31,8 +31,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,8 +44,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CertificateBasedAuthConfiguration.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -61,8 +59,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CertificateBasedAuthConfiguration.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -72,13 +69,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -88,15 +86,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -108,17 +106,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a certificate_based_auth_configuration_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CertificateBasedAuthConfigurationItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Get entity from certificateBasedAuthConfiguration by key diff --git a/lib/chats/chats_request_builder.rb b/lib/chats/chats_request_builder.rb index 95e694011d..11333b342e 100644 --- a/lib/chats/chats_request_builder.rb +++ b/lib/chats/chats_request_builder.rb @@ -6,6 +6,7 @@ require_relative './chats' require_relative './count/count_request_builder' require_relative './get_all_messages/get_all_messages_request_builder' +require_relative './get_all_retained_messages/get_all_retained_messages_request_builder' require_relative './item/chat_item_request_builder' module MicrosoftGraph @@ -25,6 +26,11 @@ def get_all_messages() return MicrosoftGraph::Chats::GetAllMessages::GetAllMessagesRequestBuilder.new(@path_parameters, @request_adapter) end ## + # Provides operations to call the getAllRetainedMessages method. + def get_all_retained_messages() + return MicrosoftGraph::Chats::GetAllRetainedMessages::GetAllRetainedMessagesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## ## Provides operations to manage the collection of chat entities. ## @param chat_id The unique identifier of chat ## @return a chat_item_request_builder @@ -42,7 +48,7 @@ def by_chat_id(chat_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/chats{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Retrieve the list of chats that the user is part of. This method supports federation. When a user ID is provided, the calling application must belong to the same tenant that the user belongs to. @@ -54,8 +60,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ChatCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +75,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Chat.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +85,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +105,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a chats_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ChatsRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve the list of chats that the user is part of. This method supports federation. When a user ID is provided, the calling application must belong to the same tenant that the user belongs to. diff --git a/lib/chats/count/count_request_builder.rb b/lib/chats/count/count_request_builder.rb index d49c7973c2..1cd9bb502f 100644 --- a/lib/chats/count/count_request_builder.rb +++ b/lib/chats/count/count_request_builder.rb @@ -18,7 +18,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/chats/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -30,8 +30,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -41,17 +40,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/chats/get_all_messages/get_all_messages.rb b/lib/chats/get_all_messages/get_all_messages.rb index 4ce2619319..0502664242 100644 --- a/lib/chats/get_all_messages/get_all_messages.rb +++ b/lib/chats/get_all_messages/get_all_messages.rb @@ -1 +1 @@ -require_relative 'get_all_messages_response' +require_relative 'get_all_messages_get_response' diff --git a/lib/chats/get_all_messages/get_all_messages_get_response.rb b/lib/chats/get_all_messages/get_all_messages_get_response.rb new file mode 100644 index 0000000000..5dac3470d9 --- /dev/null +++ b/lib/chats/get_all_messages/get_all_messages_get_response.rb @@ -0,0 +1,69 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/base_collection_pagination_count_response' +require_relative '../../models/chat_message' +require_relative '../chats' +require_relative './get_all_messages' + +module MicrosoftGraph + module Chats + module GetAllMessages + class GetAllMessagesGetResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetAllMessagesGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_all_messages_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetAllMessagesGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ChatMessage.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a chat_message + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/chats/get_all_messages/get_all_messages_request_builder.rb b/lib/chats/get_all_messages/get_all_messages_request_builder.rb index 9a79e525fe..0a40877758 100644 --- a/lib/chats/get_all_messages/get_all_messages_request_builder.rb +++ b/lib/chats/get_all_messages/get_all_messages_request_builder.rb @@ -18,49 +18,60 @@ class GetAllMessagesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuil ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/getAllMessages(){?model*,%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/chats/getAllMessages(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top,model*}") end ## - ## Invoke function getAllMessages + ## Get all messages from all chats in which a user is a participant, including one-on-one chats, group chats, and meeting chats. To learn more about how to use the Microsoft Teams export APIs to export content, see Export content with the Microsoft Teams export APIs. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_all_messages_response + ## @return a Fiber of get_all_messages_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Chats::GetAllMessages::GetAllMessagesResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Chats::GetAllMessages::GetAllMessagesGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Invoke function getAllMessages + ## Get all messages from all chats in which a user is a participant, including one-on-one chats, group chats, and meeting chats. To learn more about how to use the Microsoft Teams export APIs to export content, see Export content with the Microsoft Teams export APIs. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_all_messages_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetAllMessagesRequestBuilder.new(raw_url, @request_adapter) + end ## - # Invoke function getAllMessages + # Get all messages from all chats in which a user is a participant, including one-on-one chats, group chats, and meeting chats. To learn more about how to use the Microsoft Teams export APIs to export content, see Export content with the Microsoft Teams export APIs. class GetAllMessagesRequestBuilderGetQueryParameters ## # Include count of items attr_accessor :count ## + # Expand related entities + attr_accessor :expand + ## # Filter items by property values attr_accessor :filter ## @@ -91,10 +102,10 @@ def get_query_parameter(original_name) case original_name when "count" return "%24count" + when "expand" + return "%24expand" when "filter" return "%24filter" - when "model" - return "model" when "orderby" return "%24orderby" when "search" diff --git a/lib/chats/get_all_messages/get_all_messages_response.rb b/lib/chats/get_all_messages/get_all_messages_response.rb deleted file mode 100644 index a0af106c62..0000000000 --- a/lib/chats/get_all_messages/get_all_messages_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../microsoft_graph' -require_relative '../../models/base_collection_pagination_count_response' -require_relative '../../models/chat_message' -require_relative '../chats' -require_relative './get_all_messages' - -module MicrosoftGraph - module Chats - module GetAllMessages - class GetAllMessagesResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getAllMessagesResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_all_messages_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetAllMessagesResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ChatMessage.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a chat_message - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end -end diff --git a/lib/chats/get_all_retained_messages/get_all_retained_messages.rb b/lib/chats/get_all_retained_messages/get_all_retained_messages.rb new file mode 100644 index 0000000000..a3d467b262 --- /dev/null +++ b/lib/chats/get_all_retained_messages/get_all_retained_messages.rb @@ -0,0 +1 @@ +require_relative 'get_all_retained_messages_get_response' diff --git a/lib/chats/get_all_retained_messages/get_all_retained_messages_get_response.rb b/lib/chats/get_all_retained_messages/get_all_retained_messages_get_response.rb new file mode 100644 index 0000000000..ea4d4b00db --- /dev/null +++ b/lib/chats/get_all_retained_messages/get_all_retained_messages_get_response.rb @@ -0,0 +1,69 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/base_collection_pagination_count_response' +require_relative '../../models/chat_message' +require_relative '../chats' +require_relative './get_all_retained_messages' + +module MicrosoftGraph + module Chats + module GetAllRetainedMessages + class GetAllRetainedMessagesGetResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetAllRetainedMessagesGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_all_retained_messages_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetAllRetainedMessagesGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ChatMessage.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a chat_message + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/chats/get_all_retained_messages/get_all_retained_messages_request_builder.rb b/lib/chats/get_all_retained_messages/get_all_retained_messages_request_builder.rb new file mode 100644 index 0000000000..d8a3befac7 --- /dev/null +++ b/lib/chats/get_all_retained_messages/get_all_retained_messages_request_builder.rb @@ -0,0 +1,124 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/o_data_errors_o_data_error' +require_relative '../chats' +require_relative './get_all_retained_messages' + +module MicrosoftGraph + module Chats + module GetAllRetainedMessages + ## + # Provides operations to call the getAllRetainedMessages method. + class GetAllRetainedMessagesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new GetAllRetainedMessagesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/chats/getAllRetainedMessages(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Get all retained messages from all chats that a user is a participant in, including one-on-one chats, group chats, and meeting chats. To learn more about how to use the Microsoft Teams export APIs to export content, see Export content with the Microsoft Teams export APIs. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of get_all_retained_messages_get_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Chats::GetAllRetainedMessages::GetAllRetainedMessagesGetResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get all retained messages from all chats that a user is a participant in, including one-on-one chats, group chats, and meeting chats. To learn more about how to use the Microsoft Teams export APIs to export content, see Export content with the Microsoft Teams export APIs. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_all_retained_messages_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetAllRetainedMessagesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get all retained messages from all chats that a user is a participant in, including one-on-one chats, group chats, and meeting chats. To learn more about how to use the Microsoft Teams export APIs to export content, see Export content with the Microsoft Teams export APIs. + class GetAllRetainedMessagesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end +end diff --git a/lib/chats/item/chat_item_request_builder.rb b/lib/chats/item/chat_item_request_builder.rb index 9432a4d3f4..b0322bdcba 100644 --- a/lib/chats/item/chat_item_request_builder.rb +++ b/lib/chats/item/chat_item_request_builder.rb @@ -91,10 +91,10 @@ def unhide_for_user() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}{?%24expand,%24select}") end ## - ## Delete entity from chats + ## Soft-delete a chat. When invoked with delegated permissions, this operation only works for tenant admins and Teams service admins. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void ## @@ -103,8 +103,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -117,8 +116,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Chat.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -133,24 +131,24 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Chat.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Delete entity from chats + ## Soft-delete a chat. When invoked with delegated permissions, this operation only works for tenant admins and Teams service admins. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -160,15 +158,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -180,17 +178,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a chat_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ChatItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve a single chat (without its messages). This method supports federation. To access a chat, at least one chat member must belong to the tenant the request initiated from. diff --git a/lib/chats/item/hide_for_user/hide_for_user_post_request_body.rb b/lib/chats/item/hide_for_user/hide_for_user_post_request_body.rb index 000cce5f0e..844a92ba05 100644 --- a/lib/chats/item/hide_for_user/hide_for_user_post_request_body.rb +++ b/lib/chats/item/hide_for_user/hide_for_user_post_request_body.rb @@ -18,22 +18,22 @@ class HideForUserPostRequestBody # The user property @user ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new hideForUserPostRequestBody and sets the default values. + ## Instantiates a new HideForUserPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/chats/item/hide_for_user/hide_for_user_request_builder.rb b/lib/chats/item/hide_for_user/hide_for_user_request_builder.rb index 6d6c03f3d1..0f1fb5edc9 100644 --- a/lib/chats/item/hide_for_user/hide_for_user_request_builder.rb +++ b/lib/chats/item/hide_for_user/hide_for_user_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a hide_for_user_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return HideForUserRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/chats/item/installed_apps/count/count_request_builder.rb b/lib/chats/item/installed_apps/count/count_request_builder.rb index afbfe7e907..3d04d8a37b 100644 --- a/lib/chats/item/installed_apps/count/count_request_builder.rb +++ b/lib/chats/item/installed_apps/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/installedApps/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/installedApps/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/chats/item/installed_apps/installed_apps_request_builder.rb b/lib/chats/item/installed_apps/installed_apps_request_builder.rb index b6611cec31..1618d07d32 100644 --- a/lib/chats/item/installed_apps/installed_apps_request_builder.rb +++ b/lib/chats/item/installed_apps/installed_apps_request_builder.rb @@ -40,7 +40,7 @@ def by_teams_app_installation_id(teams_app_installation_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/installedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/installedApps{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List all app installations within a chat. @@ -52,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TeamsAppInstallationCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -68,8 +67,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TeamsAppInstallation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -79,15 +77,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -99,17 +97,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a installed_apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return InstalledAppsRequestBuilder.new(raw_url, @request_adapter) + end ## # List all app installations within a chat. diff --git a/lib/chats/item/installed_apps/item/teams_app/teams_app_request_builder.rb b/lib/chats/item/installed_apps/item/teams_app/teams_app_request_builder.rb index f18e60df5b..67966ff86a 100644 --- a/lib/chats/item/installed_apps/item/teams_app/teams_app_request_builder.rb +++ b/lib/chats/item/installed_apps/item/teams_app/teams_app_request_builder.rb @@ -25,7 +25,7 @@ class TeamsAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/installedApps/{teamsAppInstallation%2Did}/teamsApp{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/installedApps/{teamsAppInstallation%2Did}/teamsApp{?%24expand,%24select}") end ## ## The app that is installed. @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TeamsApp.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a teams_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TeamsAppRequestBuilder.new(raw_url, @request_adapter) + end ## # The app that is installed. diff --git a/lib/chats/item/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.rb b/lib/chats/item/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.rb index e57bf8042a..f2b9dc043a 100644 --- a/lib/chats/item/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.rb +++ b/lib/chats/item/installed_apps/item/teams_app_definition/teams_app_definition_request_builder.rb @@ -25,7 +25,7 @@ class TeamsAppDefinitionRequestBuilder < MicrosoftKiotaAbstractions::BaseRequest ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/installedApps/{teamsAppInstallation%2Did}/teamsAppDefinition{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/installedApps/{teamsAppInstallation%2Did}/teamsAppDefinition{?%24expand,%24select}") end ## ## The details of this version of the app. @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TeamsAppDefinition.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a teams_app_definition_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TeamsAppDefinitionRequestBuilder.new(raw_url, @request_adapter) + end ## # The details of this version of the app. diff --git a/lib/chats/item/installed_apps/item/teams_app_installation_item_request_builder.rb b/lib/chats/item/installed_apps/item/teams_app_installation_item_request_builder.rb index d83a893007..4f22712916 100644 --- a/lib/chats/item/installed_apps/item/teams_app_installation_item_request_builder.rb +++ b/lib/chats/item/installed_apps/item/teams_app_installation_item_request_builder.rb @@ -41,7 +41,7 @@ def upgrade() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/installedApps/{teamsAppInstallation%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/installedApps/{teamsAppInstallation%2Did}{?%24expand,%24select}") end ## ## Uninstall an app installed within a chat. @@ -53,8 +53,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -67,8 +66,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TeamsAppInstallation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -83,8 +81,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TeamsAppInstallation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -94,13 +91,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,15 +108,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -130,17 +128,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a teams_app_installation_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TeamsAppInstallationItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Get an app installed in a chat. diff --git a/lib/chats/item/installed_apps/item/upgrade/upgrade_post_request_body.rb b/lib/chats/item/installed_apps/item/upgrade/upgrade_post_request_body.rb index 3170ca51f3..f06f29469d 100644 --- a/lib/chats/item/installed_apps/item/upgrade/upgrade_post_request_body.rb +++ b/lib/chats/item/installed_apps/item/upgrade/upgrade_post_request_body.rb @@ -22,15 +22,15 @@ class UpgradePostRequestBody # The consentedPermissionSet property @consented_permission_set ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -52,7 +52,7 @@ def consented_permission_set=(value) @consented_permission_set = value end ## - ## Instantiates a new upgradePostRequestBody and sets the default values. + ## Instantiates a new UpgradePostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/chats/item/installed_apps/item/upgrade/upgrade_request_builder.rb b/lib/chats/item/installed_apps/item/upgrade/upgrade_request_builder.rb index 9bc457d8c6..4efd8bb7f7 100644 --- a/lib/chats/item/installed_apps/item/upgrade/upgrade_request_builder.rb +++ b/lib/chats/item/installed_apps/item/upgrade/upgrade_request_builder.rb @@ -38,8 +38,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,16 +50,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a upgrade_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UpgradeRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/chats/item/last_message_preview/last_message_preview_request_builder.rb b/lib/chats/item/last_message_preview/last_message_preview_request_builder.rb index 2fb4344285..921a16d52f 100644 --- a/lib/chats/item/last_message_preview/last_message_preview_request_builder.rb +++ b/lib/chats/item/last_message_preview/last_message_preview_request_builder.rb @@ -21,7 +21,7 @@ class LastMessagePreviewRequestBuilder < MicrosoftKiotaAbstractions::BaseRequest ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/lastMessagePreview{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/lastMessagePreview{?%24expand,%24select}") end ## ## Delete navigation property lastMessagePreview for chats @@ -33,12 +33,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Preview of the last message sent in the chat. Null if no messages have been sent in the chat. Currently, only the list chats operation supports this property. + ## Preview of the last message sent in the chat. Null if no messages were sent in the chat. Currently, only the list chats operation supports this property. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of chat_message_info ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ChatMessageInfo.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ChatMessageInfo.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,31 +71,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Preview of the last message sent in the chat. Null if no messages have been sent in the chat. Currently, only the list chats operation supports this property. + ## Preview of the last message sent in the chat. Null if no messages were sent in the chat. Currently, only the list chats operation supports this property. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,20 +108,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a last_message_preview_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return LastMessagePreviewRequestBuilder.new(raw_url, @request_adapter) + end ## - # Preview of the last message sent in the chat. Null if no messages have been sent in the chat. Currently, only the list chats operation supports this property. + # Preview of the last message sent in the chat. Null if no messages were sent in the chat. Currently, only the list chats operation supports this property. class LastMessagePreviewRequestBuilderGetQueryParameters ## diff --git a/lib/chats/item/mark_chat_read_for_user/mark_chat_read_for_user_post_request_body.rb b/lib/chats/item/mark_chat_read_for_user/mark_chat_read_for_user_post_request_body.rb index 6403d5c034..9c86a1a5b8 100644 --- a/lib/chats/item/mark_chat_read_for_user/mark_chat_read_for_user_post_request_body.rb +++ b/lib/chats/item/mark_chat_read_for_user/mark_chat_read_for_user_post_request_body.rb @@ -18,22 +18,22 @@ class MarkChatReadForUserPostRequestBody # The user property @user ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new markChatReadForUserPostRequestBody and sets the default values. + ## Instantiates a new MarkChatReadForUserPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/chats/item/mark_chat_read_for_user/mark_chat_read_for_user_request_builder.rb b/lib/chats/item/mark_chat_read_for_user/mark_chat_read_for_user_request_builder.rb index c9fff46c33..92c52e14a2 100644 --- a/lib/chats/item/mark_chat_read_for_user/mark_chat_read_for_user_request_builder.rb +++ b/lib/chats/item/mark_chat_read_for_user/mark_chat_read_for_user_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mark_chat_read_for_user_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MarkChatReadForUserRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/chats/item/mark_chat_unread_for_user/mark_chat_unread_for_user_post_request_body.rb b/lib/chats/item/mark_chat_unread_for_user/mark_chat_unread_for_user_post_request_body.rb index 6726956f98..995ef4d45d 100644 --- a/lib/chats/item/mark_chat_unread_for_user/mark_chat_unread_for_user_post_request_body.rb +++ b/lib/chats/item/mark_chat_unread_for_user/mark_chat_unread_for_user_post_request_body.rb @@ -22,22 +22,22 @@ class MarkChatUnreadForUserPostRequestBody # The user property @user ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new markChatUnreadForUserPostRequestBody and sets the default values. + ## Instantiates a new MarkChatUnreadForUserPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/chats/item/mark_chat_unread_for_user/mark_chat_unread_for_user_request_builder.rb b/lib/chats/item/mark_chat_unread_for_user/mark_chat_unread_for_user_request_builder.rb index 84d186353d..0582e5f23c 100644 --- a/lib/chats/item/mark_chat_unread_for_user/mark_chat_unread_for_user_request_builder.rb +++ b/lib/chats/item/mark_chat_unread_for_user/mark_chat_unread_for_user_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mark_chat_unread_for_user_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MarkChatUnreadForUserRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/chats/item/members/add/add.rb b/lib/chats/item/members/add/add.rb index 629ad98abe..4f4fe401db 100644 --- a/lib/chats/item/members/add/add.rb +++ b/lib/chats/item/members/add/add.rb @@ -1,2 +1,2 @@ require_relative 'add_post_request_body' -require_relative 'add_response' +require_relative 'add_post_response' diff --git a/lib/chats/item/members/add/add_post_request_body.rb b/lib/chats/item/members/add/add_post_request_body.rb index 33091725c9..27ae2abd52 100644 --- a/lib/chats/item/members/add/add_post_request_body.rb +++ b/lib/chats/item/members/add/add_post_request_body.rb @@ -20,22 +20,22 @@ class AddPostRequestBody # The values property @values ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new addPostRequestBody and sets the default values. + ## Instantiates a new AddPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/chats/item/members/add/add_post_response.rb b/lib/chats/item/members/add/add_post_response.rb new file mode 100644 index 0000000000..b1559ab139 --- /dev/null +++ b/lib/chats/item/members/add/add_post_response.rb @@ -0,0 +1,75 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/action_result_part' +require_relative '../../../../models/base_collection_pagination_count_response' +require_relative '../../../chats' +require_relative '../../item' +require_relative '../members' +require_relative './add' + +module MicrosoftGraph + module Chats + module Item + module Members + module Add + class AddPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new AddPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a add_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return AddPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ActionResultPart.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a action_result_part + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end +end diff --git a/lib/chats/item/members/add/add_request_builder.rb b/lib/chats/item/members/add/add_request_builder.rb index c18804a7e8..5ab4f44524 100644 --- a/lib/chats/item/members/add/add_request_builder.rb +++ b/lib/chats/item/members/add/add_request_builder.rb @@ -28,7 +28,7 @@ def initialize(path_parameters, request_adapter) ## Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of add_response + ## @return a Fiber of add_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -36,9 +36,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Chats::Item::Members::Add::AddResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Chats::Item::Members::Add::AddPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Add multiple members in a single request to a team. The response provides details about which memberships could and couldn't be created. @@ -49,17 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a add_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AddRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/chats/item/members/add/add_response.rb b/lib/chats/item/members/add/add_response.rb deleted file mode 100644 index 6451aadd27..0000000000 --- a/lib/chats/item/members/add/add_response.rb +++ /dev/null @@ -1,75 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../../models/action_result_part' -require_relative '../../../../models/base_collection_pagination_count_response' -require_relative '../../../chats' -require_relative '../../item' -require_relative '../members' -require_relative './add' - -module MicrosoftGraph - module Chats - module Item - module Members - module Add - class AddResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new addResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a add_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return AddResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ActionResultPart.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a action_result_part - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end -end diff --git a/lib/chats/item/members/count/count_request_builder.rb b/lib/chats/item/members/count/count_request_builder.rb index 0941d7b326..4946f9aca4 100644 --- a/lib/chats/item/members/count/count_request_builder.rb +++ b/lib/chats/item/members/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/members/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/members/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/chats/item/members/item/conversation_member_item_request_builder.rb b/lib/chats/item/members/item/conversation_member_item_request_builder.rb index eda7b26932..cbb551bac9 100644 --- a/lib/chats/item/members/item/conversation_member_item_request_builder.rb +++ b/lib/chats/item/members/item/conversation_member_item_request_builder.rb @@ -23,7 +23,7 @@ class ConversationMemberItemRequestBuilder < MicrosoftKiotaAbstractions::BaseReq ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/members/{conversationMember%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/members/{conversationMember%2Did}{?%24expand,%24select}") end ## ## Remove a conversationMember from a chat. @@ -35,12 +35,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Retrieve a conversationMember from a chat. + ## Retrieve a conversationMember from a chat or channel. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of conversation_member ## @@ -49,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ConversationMember.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -65,8 +63,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ConversationMember.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,31 +73,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Retrieve a conversationMember from a chat. + ## Retrieve a conversationMember from a chat or channel. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,20 +110,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a conversation_member_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ConversationMemberItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Retrieve a conversationMember from a chat. + # Retrieve a conversationMember from a chat or channel. class ConversationMemberItemRequestBuilderGetQueryParameters ## diff --git a/lib/chats/item/members/members_request_builder.rb b/lib/chats/item/members/members_request_builder.rb index 77c814380b..2af87cbbfb 100644 --- a/lib/chats/item/members/members_request_builder.rb +++ b/lib/chats/item/members/members_request_builder.rb @@ -9,6 +9,7 @@ require_relative './count/count_request_builder' require_relative './item/conversation_member_item_request_builder' require_relative './members' +require_relative './remove/remove_request_builder' module MicrosoftGraph module Chats @@ -29,6 +30,11 @@ def count() return MicrosoftGraph::Chats::Item::Members::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) end ## + # Provides operations to call the remove method. + def remove() + return MicrosoftGraph::Chats::Item::Members::Remove::RemoveRequestBuilder.new(@path_parameters, @request_adapter) + end + ## ## Provides operations to manage the members property of the microsoft.graph.chat entity. ## @param conversation_member_id The unique identifier of conversationMember ## @return a conversation_member_item_request_builder @@ -46,7 +52,7 @@ def by_conversation_member_id(conversation_member_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/members{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/members{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List all conversation members in a chat or channel. @@ -58,8 +64,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ConversationMemberCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,8 +79,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ConversationMember.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -85,15 +89,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -105,17 +109,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a members_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MembersRequestBuilder.new(raw_url, @request_adapter) + end ## # List all conversation members in a chat or channel. diff --git a/lib/chats/item/members/remove/remove.rb b/lib/chats/item/members/remove/remove.rb new file mode 100644 index 0000000000..95c14f7d89 --- /dev/null +++ b/lib/chats/item/members/remove/remove.rb @@ -0,0 +1,2 @@ +require_relative 'remove_post_request_body' +require_relative 'remove_post_response' diff --git a/lib/chats/item/members/remove/remove_post_request_body.rb b/lib/chats/item/members/remove/remove_post_request_body.rb new file mode 100644 index 0000000000..cfa8f6bf9b --- /dev/null +++ b/lib/chats/item/members/remove/remove_post_request_body.rb @@ -0,0 +1,92 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/conversation_member' +require_relative '../../../chats' +require_relative '../../item' +require_relative '../members' +require_relative './remove' + +module MicrosoftGraph + module Chats + module Item + module Members + module Remove + class RemovePostRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The values property + @values + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new RemovePostRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a remove_post_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return RemovePostRequestBody.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "values" => lambda {|n| @values = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ConversationMember.create_from_discriminator_value(pn) }) }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_collection_of_object_values("values", @values) + writer.write_additional_data(@additional_data) + end + ## + ## Gets the values property value. The values property + ## @return a conversation_member + ## + def values + return @values + end + ## + ## Sets the values property value. The values property + ## @param value Value to set for the values property. + ## @return a void + ## + def values=(value) + @values = value + end + end + end + end + end + end +end diff --git a/lib/chats/item/members/remove/remove_post_response.rb b/lib/chats/item/members/remove/remove_post_response.rb new file mode 100644 index 0000000000..b396b6d491 --- /dev/null +++ b/lib/chats/item/members/remove/remove_post_response.rb @@ -0,0 +1,75 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/action_result_part' +require_relative '../../../../models/base_collection_pagination_count_response' +require_relative '../../../chats' +require_relative '../../item' +require_relative '../members' +require_relative './remove' + +module MicrosoftGraph + module Chats + module Item + module Members + module Remove + class RemovePostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new RemovePostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a remove_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return RemovePostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ActionResultPart.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a action_result_part + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end +end diff --git a/lib/chats/item/members/remove/remove_request_builder.rb b/lib/chats/item/members/remove/remove_request_builder.rb new file mode 100644 index 0000000000..64d437404d --- /dev/null +++ b/lib/chats/item/members/remove/remove_request_builder.rb @@ -0,0 +1,76 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../chats' +require_relative '../../item' +require_relative '../members' +require_relative './remove' + +module MicrosoftGraph + module Chats + module Item + module Members + module Remove + ## + # Provides operations to call the remove method. + class RemoveRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new RemoveRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/members/remove") + end + ## + ## Remove multiple members from a team in a single request. The response provides details about which memberships could and couldn't be removed. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of remove_post_response + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Chats::Item::Members::Remove::RemovePostResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Remove multiple members from a team in a single request. The response provides details about which memberships could and couldn't be removed. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a remove_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RemoveRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end +end diff --git a/lib/chats/item/messages/count/count_request_builder.rb b/lib/chats/item/messages/count/count_request_builder.rb index d000db524e..ab51d38e42 100644 --- a/lib/chats/item/messages/count/count_request_builder.rb +++ b/lib/chats/item/messages/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/chats/item/messages/delta/delta.rb b/lib/chats/item/messages/delta/delta.rb index 0c348d20cb..8a3dc08b72 100644 --- a/lib/chats/item/messages/delta/delta.rb +++ b/lib/chats/item/messages/delta/delta.rb @@ -1 +1 @@ -require_relative 'delta_response' +require_relative 'delta_get_response' diff --git a/lib/chats/item/messages/delta/delta_get_response.rb b/lib/chats/item/messages/delta/delta_get_response.rb new file mode 100644 index 0000000000..52b5a7118c --- /dev/null +++ b/lib/chats/item/messages/delta/delta_get_response.rb @@ -0,0 +1,75 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/base_delta_function_response' +require_relative '../../../../models/chat_message' +require_relative '../../../chats' +require_relative '../../item' +require_relative '../messages' +require_relative './delta' + +module MicrosoftGraph + module Chats + module Item + module Messages + module Delta + class DeltaGetResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new DeltaGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a delta_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return DeltaGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ChatMessage.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a chat_message + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end +end diff --git a/lib/chats/item/messages/delta/delta_request_builder.rb b/lib/chats/item/messages/delta/delta_request_builder.rb index ed8aca8b58..96855c2c8f 100644 --- a/lib/chats/item/messages/delta/delta_request_builder.rb +++ b/lib/chats/item/messages/delta/delta_request_builder.rb @@ -22,49 +22,60 @@ class DeltaRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/delta(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Invoke function delta + ## Get the list of messages from all chats in which a user is a participant, including one-on-one chats, group chats, and meeting chats. When you use delta query, you can get new or updated messages. To get the replies for a message, use the list message replies or the get message reply operations. A GET request with the delta function returns one of the following: State tokens are opaque to the client. To proceed with a round of change tracking, copy and apply the @odata.nextLink or @odata.deltaLink URL returned from the last GET request to the next delta function call. An @odata.deltaLink returned in a response signifies that the current round of change tracking is complete. You can save and use the @odata.deltaLink URL when you begin to retrieve more changes (messages changed or posted after you acquire @odata.deltaLink). For more information, see the delta query documentation. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of delta_response + ## @return a Fiber of delta_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Chats::Item::Messages::Delta::DeltaResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Chats::Item::Messages::Delta::DeltaGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Invoke function delta + ## Get the list of messages from all chats in which a user is a participant, including one-on-one chats, group chats, and meeting chats. When you use delta query, you can get new or updated messages. To get the replies for a message, use the list message replies or the get message reply operations. A GET request with the delta function returns one of the following: State tokens are opaque to the client. To proceed with a round of change tracking, copy and apply the @odata.nextLink or @odata.deltaLink URL returned from the last GET request to the next delta function call. An @odata.deltaLink returned in a response signifies that the current round of change tracking is complete. You can save and use the @odata.deltaLink URL when you begin to retrieve more changes (messages changed or posted after you acquire @odata.deltaLink). For more information, see the delta query documentation. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a delta_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeltaRequestBuilder.new(raw_url, @request_adapter) + end ## - # Invoke function delta + # Get the list of messages from all chats in which a user is a participant, including one-on-one chats, group chats, and meeting chats. When you use delta query, you can get new or updated messages. To get the replies for a message, use the list message replies or the get message reply operations. A GET request with the delta function returns one of the following: State tokens are opaque to the client. To proceed with a round of change tracking, copy and apply the @odata.nextLink or @odata.deltaLink URL returned from the last GET request to the next delta function call. An @odata.deltaLink returned in a response signifies that the current round of change tracking is complete. You can save and use the @odata.deltaLink URL when you begin to retrieve more changes (messages changed or posted after you acquire @odata.deltaLink). For more information, see the delta query documentation. class DeltaRequestBuilderGetQueryParameters ## # Include count of items attr_accessor :count ## + # Expand related entities + attr_accessor :expand + ## # Filter items by property values attr_accessor :filter ## @@ -92,6 +103,8 @@ def get_query_parameter(original_name) case original_name when "count" return "%24count" + when "expand" + return "%24expand" when "filter" return "%24filter" when "orderby" diff --git a/lib/chats/item/messages/delta/delta_response.rb b/lib/chats/item/messages/delta/delta_response.rb deleted file mode 100644 index d20db70191..0000000000 --- a/lib/chats/item/messages/delta/delta_response.rb +++ /dev/null @@ -1,75 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../../models/base_delta_function_response' -require_relative '../../../../models/chat_message' -require_relative '../../../chats' -require_relative '../../item' -require_relative '../messages' -require_relative './delta' - -module MicrosoftGraph - module Chats - module Item - module Messages - module Delta - class DeltaResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new deltaResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a delta_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return DeltaResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ChatMessage.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a chat_message - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end -end diff --git a/lib/chats/item/messages/item/chat_message_item_request_builder.rb b/lib/chats/item/messages/item/chat_message_item_request_builder.rb index 7bfff0f098..bcab212da1 100644 --- a/lib/chats/item/messages/item/chat_message_item_request_builder.rb +++ b/lib/chats/item/messages/item/chat_message_item_request_builder.rb @@ -59,7 +59,7 @@ def unset_reaction() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/{chatMessage%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/{chatMessage%2Did}{?%24expand,%24select}") end ## ## Delete navigation property messages for chats @@ -71,8 +71,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -85,8 +84,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ChatMessage.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -101,8 +99,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ChatMessage.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -112,13 +109,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -128,15 +126,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -148,17 +146,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a chat_message_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ChatMessageItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve a single message or a message reply in a channel or a chat. diff --git a/lib/chats/item/messages/item/hosted_contents/count/count_request_builder.rb b/lib/chats/item/messages/item/hosted_contents/count/count_request_builder.rb index 096319700d..3638f77778 100644 --- a/lib/chats/item/messages/item/hosted_contents/count/count_request_builder.rb +++ b/lib/chats/item/messages/item/hosted_contents/count/count_request_builder.rb @@ -26,7 +26,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/{chatMessage%2Did}/hostedContents/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/{chatMessage%2Did}/hostedContents/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -38,8 +38,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -49,17 +48,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/chats/item/messages/item/hosted_contents/hosted_contents_request_builder.rb b/lib/chats/item/messages/item/hosted_contents/hosted_contents_request_builder.rb index cb467800bc..83e0c72faf 100644 --- a/lib/chats/item/messages/item/hosted_contents/hosted_contents_request_builder.rb +++ b/lib/chats/item/messages/item/hosted_contents/hosted_contents_request_builder.rb @@ -44,10 +44,10 @@ def by_chat_message_hosted_content_id(chat_message_hosted_content_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/{chatMessage%2Did}/hostedContents{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/{chatMessage%2Did}/hostedContents{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + ## Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of chat_message_hosted_content_collection_response ## @@ -56,8 +56,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ChatMessageHostedContentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -72,26 +71,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ChatMessageHostedContent.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + ## Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -103,20 +101,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a hosted_contents_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return HostedContentsRequestBuilder.new(raw_url, @request_adapter) + end ## - # Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + # Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content. class HostedContentsRequestBuilderGetQueryParameters ## diff --git a/lib/chats/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.rb b/lib/chats/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.rb index 79f0878615..e23e08cfb2 100644 --- a/lib/chats/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.rb +++ b/lib/chats/item/messages/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.rb @@ -33,7 +33,7 @@ def content() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/{chatMessage%2Did}/hostedContents/{chatMessageHostedContent%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/{chatMessage%2Did}/hostedContents/{chatMessageHostedContent%2Did}{?%24expand,%24select}") end ## ## Delete navigation property hostedContents for chats @@ -45,8 +45,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -59,8 +58,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ChatMessageHostedContent.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -75,8 +73,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ChatMessageHostedContent.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -86,13 +83,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -102,15 +100,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -122,17 +120,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a chat_message_hosted_content_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ChatMessageHostedContentItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve the properties and relationships of chatMessageHostedContent object. diff --git a/lib/chats/item/messages/item/hosted_contents/item/value/content_request_builder.rb b/lib/chats/item/messages/item/hosted_contents/item/value/content_request_builder.rb index d461c3bca6..4c8f2cab4c 100644 --- a/lib/chats/item/messages/item/hosted_contents/item/value/content_request_builder.rb +++ b/lib/chats/item/messages/item/hosted_contents/item/value/content_request_builder.rb @@ -31,7 +31,20 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/{chatMessage%2Did}/hostedContents/{chatMessageHostedContent%2Did}/$value") end ## - ## Get media content for the navigation property hostedContents from chats + ## The unique identifier for an entity. Read-only. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of binary ## @@ -40,12 +53,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## - ## Update media content for the navigation property hostedContents in chats + ## The unique identifier for an entity. Read-only. ## @param body Binary request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of binary @@ -56,28 +68,45 @@ def put(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## - ## Get media content for the navigation property hostedContents from chats + ## The unique identifier for an entity. Read-only. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## - def to_get_request_information(request_configuration=nil) + def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end request_info.url_template = @url_template request_info.path_parameters = @path_parameters - request_info.http_method = :GET + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end ## - ## Update media content for the navigation property hostedContents in chats + ## The unique identifier for an entity. Read-only. ## @param body Binary request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -85,16 +114,26 @@ def to_get_request_information(request_configuration=nil) def to_put_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PUT unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "", body) + request_info.set_content_from_parsable(@request_adapter, 'application/octet-stream', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PUT + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a content_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContentRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/chats/item/messages/item/replies/count/count_request_builder.rb b/lib/chats/item/messages/item/replies/count/count_request_builder.rb index fac5b15674..649c57a6fe 100644 --- a/lib/chats/item/messages/item/replies/count/count_request_builder.rb +++ b/lib/chats/item/messages/item/replies/count/count_request_builder.rb @@ -26,7 +26,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -38,8 +38,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -49,17 +48,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/chats/item/messages/item/replies/delta/delta.rb b/lib/chats/item/messages/item/replies/delta/delta.rb index 0c348d20cb..8a3dc08b72 100644 --- a/lib/chats/item/messages/item/replies/delta/delta.rb +++ b/lib/chats/item/messages/item/replies/delta/delta.rb @@ -1 +1 @@ -require_relative 'delta_response' +require_relative 'delta_get_response' diff --git a/lib/chats/item/messages/item/replies/delta/delta_get_response.rb b/lib/chats/item/messages/item/replies/delta/delta_get_response.rb new file mode 100644 index 0000000000..5c9dcb1f80 --- /dev/null +++ b/lib/chats/item/messages/item/replies/delta/delta_get_response.rb @@ -0,0 +1,81 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/base_delta_function_response' +require_relative '../../../../../../models/chat_message' +require_relative '../../../../../chats' +require_relative '../../../../item' +require_relative '../../../messages' +require_relative '../../item' +require_relative '../replies' +require_relative './delta' + +module MicrosoftGraph + module Chats + module Item + module Messages + module Item + module Replies + module Delta + class DeltaGetResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new DeltaGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a delta_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return DeltaGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ChatMessage.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a chat_message + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end + end + end +end diff --git a/lib/chats/item/messages/item/replies/delta/delta_request_builder.rb b/lib/chats/item/messages/item/replies/delta/delta_request_builder.rb index fa82f65d17..cd37015c05 100644 --- a/lib/chats/item/messages/item/replies/delta/delta_request_builder.rb +++ b/lib/chats/item/messages/item/replies/delta/delta_request_builder.rb @@ -26,49 +26,60 @@ class DeltaRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/delta(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Invoke function delta + ## Get the list of messages from all chats in which a user is a participant, including one-on-one chats, group chats, and meeting chats. When you use delta query, you can get new or updated messages. To get the replies for a message, use the list message replies or the get message reply operations. A GET request with the delta function returns one of the following: State tokens are opaque to the client. To proceed with a round of change tracking, copy and apply the @odata.nextLink or @odata.deltaLink URL returned from the last GET request to the next delta function call. An @odata.deltaLink returned in a response signifies that the current round of change tracking is complete. You can save and use the @odata.deltaLink URL when you begin to retrieve more changes (messages changed or posted after you acquire @odata.deltaLink). For more information, see the delta query documentation. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of delta_response + ## @return a Fiber of delta_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Chats::Item::Messages::Item::Replies::Delta::DeltaResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Chats::Item::Messages::Item::Replies::Delta::DeltaGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Invoke function delta + ## Get the list of messages from all chats in which a user is a participant, including one-on-one chats, group chats, and meeting chats. When you use delta query, you can get new or updated messages. To get the replies for a message, use the list message replies or the get message reply operations. A GET request with the delta function returns one of the following: State tokens are opaque to the client. To proceed with a round of change tracking, copy and apply the @odata.nextLink or @odata.deltaLink URL returned from the last GET request to the next delta function call. An @odata.deltaLink returned in a response signifies that the current round of change tracking is complete. You can save and use the @odata.deltaLink URL when you begin to retrieve more changes (messages changed or posted after you acquire @odata.deltaLink). For more information, see the delta query documentation. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a delta_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeltaRequestBuilder.new(raw_url, @request_adapter) + end ## - # Invoke function delta + # Get the list of messages from all chats in which a user is a participant, including one-on-one chats, group chats, and meeting chats. When you use delta query, you can get new or updated messages. To get the replies for a message, use the list message replies or the get message reply operations. A GET request with the delta function returns one of the following: State tokens are opaque to the client. To proceed with a round of change tracking, copy and apply the @odata.nextLink or @odata.deltaLink URL returned from the last GET request to the next delta function call. An @odata.deltaLink returned in a response signifies that the current round of change tracking is complete. You can save and use the @odata.deltaLink URL when you begin to retrieve more changes (messages changed or posted after you acquire @odata.deltaLink). For more information, see the delta query documentation. class DeltaRequestBuilderGetQueryParameters ## # Include count of items attr_accessor :count ## + # Expand related entities + attr_accessor :expand + ## # Filter items by property values attr_accessor :filter ## @@ -96,6 +107,8 @@ def get_query_parameter(original_name) case original_name when "count" return "%24count" + when "expand" + return "%24expand" when "filter" return "%24filter" when "orderby" diff --git a/lib/chats/item/messages/item/replies/delta/delta_response.rb b/lib/chats/item/messages/item/replies/delta/delta_response.rb deleted file mode 100644 index 18313c099c..0000000000 --- a/lib/chats/item/messages/item/replies/delta/delta_response.rb +++ /dev/null @@ -1,81 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../../microsoft_graph' -require_relative '../../../../../../models/base_delta_function_response' -require_relative '../../../../../../models/chat_message' -require_relative '../../../../../chats' -require_relative '../../../../item' -require_relative '../../../messages' -require_relative '../../item' -require_relative '../replies' -require_relative './delta' - -module MicrosoftGraph - module Chats - module Item - module Messages - module Item - module Replies - module Delta - class DeltaResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new deltaResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a delta_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return DeltaResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ChatMessage.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a chat_message - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end - end - end -end diff --git a/lib/chats/item/messages/item/replies/item/chat_message_item_request_builder.rb b/lib/chats/item/messages/item/replies/item/chat_message_item_request_builder.rb index ea9564af98..3f6e94ee2d 100644 --- a/lib/chats/item/messages/item/replies/item/chat_message_item_request_builder.rb +++ b/lib/chats/item/messages/item/replies/item/chat_message_item_request_builder.rb @@ -57,7 +57,7 @@ def unset_reaction() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}{?%24expand,%24select}") end ## ## Delete navigation property replies for chats @@ -69,12 +69,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Retrieve a single message or a message reply in a channel or a chat. + ## Replies for a specified message. Supports $expand for channel messages. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of chat_message ## @@ -83,8 +82,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ChatMessage.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -99,8 +97,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ChatMessage.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -110,31 +107,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Retrieve a single message or a message reply in a channel or a chat. + ## Replies for a specified message. Supports $expand for channel messages. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -146,20 +144,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a chat_message_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ChatMessageItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Retrieve a single message or a message reply in a channel or a chat. + # Replies for a specified message. Supports $expand for channel messages. class ChatMessageItemRequestBuilderGetQueryParameters ## diff --git a/lib/chats/item/messages/item/replies/item/hosted_contents/count/count_request_builder.rb b/lib/chats/item/messages/item/replies/item/hosted_contents/count/count_request_builder.rb index 941493e056..7e3ced807e 100644 --- a/lib/chats/item/messages/item/replies/item/hosted_contents/count/count_request_builder.rb +++ b/lib/chats/item/messages/item/replies/item/hosted_contents/count/count_request_builder.rb @@ -30,7 +30,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/hostedContents/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/hostedContents/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -42,8 +42,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -53,17 +52,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/chats/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.rb b/lib/chats/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.rb index 413818e80a..1c2ff7fb95 100644 --- a/lib/chats/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.rb +++ b/lib/chats/item/messages/item/replies/item/hosted_contents/hosted_contents_request_builder.rb @@ -48,10 +48,10 @@ def by_chat_message_hosted_content_id(chat_message_hosted_content_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/hostedContents{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/hostedContents{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + ## Content in a message hosted by Microsoft Teams - for example, images or code snippets. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of chat_message_hosted_content_collection_response ## @@ -60,8 +60,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ChatMessageHostedContentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,26 +75,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ChatMessageHostedContent.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + ## Content in a message hosted by Microsoft Teams - for example, images or code snippets. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -107,20 +105,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a hosted_contents_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return HostedContentsRequestBuilder.new(raw_url, @request_adapter) + end ## - # Retrieve the list of chatMessageHostedContent objects from a message. This API only lists the hosted content objects. To get the content bytes, see get chatmessage hosted content + # Content in a message hosted by Microsoft Teams - for example, images or code snippets. class HostedContentsRequestBuilderGetQueryParameters ## diff --git a/lib/chats/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.rb b/lib/chats/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.rb index 806a6de513..9a9b04d029 100644 --- a/lib/chats/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.rb +++ b/lib/chats/item/messages/item/replies/item/hosted_contents/item/chat_message_hosted_content_item_request_builder.rb @@ -37,7 +37,7 @@ def content() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/hostedContents/{chatMessageHostedContent%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/hostedContents/{chatMessageHostedContent%2Did}{?%24expand,%24select}") end ## ## Delete navigation property hostedContents for chats @@ -49,12 +49,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Retrieve the properties and relationships of chatMessageHostedContent object. + ## Content in a message hosted by Microsoft Teams - for example, images or code snippets. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of chat_message_hosted_content ## @@ -63,8 +62,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ChatMessageHostedContent.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -79,8 +77,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ChatMessageHostedContent.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -90,31 +87,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Retrieve the properties and relationships of chatMessageHostedContent object. + ## Content in a message hosted by Microsoft Teams - for example, images or code snippets. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -126,20 +124,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a chat_message_hosted_content_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ChatMessageHostedContentItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Retrieve the properties and relationships of chatMessageHostedContent object. + # Content in a message hosted by Microsoft Teams - for example, images or code snippets. class ChatMessageHostedContentItemRequestBuilderGetQueryParameters ## diff --git a/lib/chats/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.rb b/lib/chats/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.rb index bc04cab15c..9642d52848 100644 --- a/lib/chats/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.rb +++ b/lib/chats/item/messages/item/replies/item/hosted_contents/item/value/content_request_builder.rb @@ -35,7 +35,20 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies/{chatMessage%2Did1}/hostedContents/{chatMessageHostedContent%2Did}/$value") end ## - ## Get media content for the navigation property hostedContents from chats + ## The unique identifier for an entity. Read-only. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The unique identifier for an entity. Read-only. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of binary ## @@ -44,12 +57,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## - ## Update media content for the navigation property hostedContents in chats + ## The unique identifier for an entity. Read-only. ## @param body Binary request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of binary @@ -60,28 +72,45 @@ def put(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## - ## Get media content for the navigation property hostedContents from chats + ## The unique identifier for an entity. Read-only. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## - def to_get_request_information(request_configuration=nil) + def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end request_info.url_template = @url_template request_info.path_parameters = @path_parameters - request_info.http_method = :GET + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The unique identifier for an entity. Read-only. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end ## - ## Update media content for the navigation property hostedContents in chats + ## The unique identifier for an entity. Read-only. ## @param body Binary request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -89,16 +118,26 @@ def to_get_request_information(request_configuration=nil) def to_put_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PUT unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "", body) + request_info.set_content_from_parsable(@request_adapter, 'application/octet-stream', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PUT + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a content_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContentRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/chats/item/messages/item/replies/item/set_reaction/set_reaction_post_request_body.rb b/lib/chats/item/messages/item/replies/item/set_reaction/set_reaction_post_request_body.rb index 57a38a961b..7974eb410c 100644 --- a/lib/chats/item/messages/item/replies/item/set_reaction/set_reaction_post_request_body.rb +++ b/lib/chats/item/messages/item/replies/item/set_reaction/set_reaction_post_request_body.rb @@ -25,22 +25,22 @@ class SetReactionPostRequestBody # The reactionType property @reaction_type ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new setReactionPostRequestBody and sets the default values. + ## Instantiates a new SetReactionPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/chats/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.rb b/lib/chats/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.rb index dd858bd279..e54a7f2074 100644 --- a/lib/chats/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.rb +++ b/lib/chats/item/messages/item/replies/item/set_reaction/set_reaction_request_builder.rb @@ -42,8 +42,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -55,16 +54,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a set_reaction_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SetReactionRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/chats/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.rb b/lib/chats/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.rb index c2f1dbfe9a..6874a0b303 100644 --- a/lib/chats/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.rb +++ b/lib/chats/item/messages/item/replies/item/soft_delete/soft_delete_request_builder.rb @@ -40,8 +40,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,15 +50,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a soft_delete_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SoftDeleteRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/chats/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.rb b/lib/chats/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.rb index 7f60e290b9..ba6c11dad7 100644 --- a/lib/chats/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.rb +++ b/lib/chats/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete_request_builder.rb @@ -40,8 +40,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,15 +50,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a undo_soft_delete_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UndoSoftDeleteRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/chats/item/messages/item/replies/item/unset_reaction/unset_reaction_post_request_body.rb b/lib/chats/item/messages/item/replies/item/unset_reaction/unset_reaction_post_request_body.rb index e8a0532c8a..22fa64f5d8 100644 --- a/lib/chats/item/messages/item/replies/item/unset_reaction/unset_reaction_post_request_body.rb +++ b/lib/chats/item/messages/item/replies/item/unset_reaction/unset_reaction_post_request_body.rb @@ -25,22 +25,22 @@ class UnsetReactionPostRequestBody # The reactionType property @reaction_type ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new unsetReactionPostRequestBody and sets the default values. + ## Instantiates a new UnsetReactionPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/chats/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.rb b/lib/chats/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.rb index 22d0c80a11..4bfced6931 100644 --- a/lib/chats/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.rb +++ b/lib/chats/item/messages/item/replies/item/unset_reaction/unset_reaction_request_builder.rb @@ -42,8 +42,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -55,16 +54,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a unset_reaction_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UnsetReactionRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/chats/item/messages/item/replies/replies_request_builder.rb b/lib/chats/item/messages/item/replies/replies_request_builder.rb index 79675d0838..80801e8220 100644 --- a/lib/chats/item/messages/item/replies/replies_request_builder.rb +++ b/lib/chats/item/messages/item/replies/replies_request_builder.rb @@ -50,10 +50,10 @@ def by_chat_message_id1(chat_message_id1) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages/{chatMessage%2Did}/replies{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + ## Replies for a specified message. Supports $expand for channel messages. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of chat_message_collection_response ## @@ -62,12 +62,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ChatMessageCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Create a new reply to a chatMessage in a specified channel. + ## Create new navigation property to replies for chats ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of chat_message @@ -78,30 +77,29 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ChatMessage.create_from_discriminator_value(pn) }, error_mapping) end ## - ## List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + ## Replies for a specified message. Supports $expand for channel messages. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Create a new reply to a chatMessage in a specified channel. + ## Create new navigation property to replies for chats ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -109,20 +107,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a replies_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RepliesRequestBuilder.new(raw_url, @request_adapter) + end ## - # List all the replies to a message in a channel of a team. This method lists only the replies of the specified message, if any. To get the message itself, simply call get channel message. + # Replies for a specified message. Supports $expand for channel messages. class RepliesRequestBuilderGetQueryParameters ## diff --git a/lib/chats/item/messages/item/set_reaction/set_reaction_post_request_body.rb b/lib/chats/item/messages/item/set_reaction/set_reaction_post_request_body.rb index 4fb15fd36d..8a6055b820 100644 --- a/lib/chats/item/messages/item/set_reaction/set_reaction_post_request_body.rb +++ b/lib/chats/item/messages/item/set_reaction/set_reaction_post_request_body.rb @@ -21,22 +21,22 @@ class SetReactionPostRequestBody # The reactionType property @reaction_type ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new setReactionPostRequestBody and sets the default values. + ## Instantiates a new SetReactionPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/chats/item/messages/item/set_reaction/set_reaction_request_builder.rb b/lib/chats/item/messages/item/set_reaction/set_reaction_request_builder.rb index 07b58d5754..f54db1d0f2 100644 --- a/lib/chats/item/messages/item/set_reaction/set_reaction_request_builder.rb +++ b/lib/chats/item/messages/item/set_reaction/set_reaction_request_builder.rb @@ -38,8 +38,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,16 +50,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a set_reaction_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SetReactionRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/chats/item/messages/item/soft_delete/soft_delete_request_builder.rb b/lib/chats/item/messages/item/soft_delete/soft_delete_request_builder.rb index 645bf3bc12..2796865ec4 100644 --- a/lib/chats/item/messages/item/soft_delete/soft_delete_request_builder.rb +++ b/lib/chats/item/messages/item/soft_delete/soft_delete_request_builder.rb @@ -36,8 +36,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,15 +46,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a soft_delete_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SoftDeleteRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/chats/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.rb b/lib/chats/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.rb index 0cd8e2e9ef..fb1b0dbe1d 100644 --- a/lib/chats/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.rb +++ b/lib/chats/item/messages/item/undo_soft_delete/undo_soft_delete_request_builder.rb @@ -36,8 +36,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,15 +46,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a undo_soft_delete_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UndoSoftDeleteRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/chats/item/messages/item/unset_reaction/unset_reaction_post_request_body.rb b/lib/chats/item/messages/item/unset_reaction/unset_reaction_post_request_body.rb index 5ce5dde4c1..4f7775b4aa 100644 --- a/lib/chats/item/messages/item/unset_reaction/unset_reaction_post_request_body.rb +++ b/lib/chats/item/messages/item/unset_reaction/unset_reaction_post_request_body.rb @@ -21,22 +21,22 @@ class UnsetReactionPostRequestBody # The reactionType property @reaction_type ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new unsetReactionPostRequestBody and sets the default values. + ## Instantiates a new UnsetReactionPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/chats/item/messages/item/unset_reaction/unset_reaction_request_builder.rb b/lib/chats/item/messages/item/unset_reaction/unset_reaction_request_builder.rb index ce322ec98d..394b054536 100644 --- a/lib/chats/item/messages/item/unset_reaction/unset_reaction_request_builder.rb +++ b/lib/chats/item/messages/item/unset_reaction/unset_reaction_request_builder.rb @@ -38,8 +38,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,16 +50,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a unset_reaction_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UnsetReactionRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/chats/item/messages/messages_request_builder.rb b/lib/chats/item/messages/messages_request_builder.rb index 922415c55b..e4a703e5fb 100644 --- a/lib/chats/item/messages/messages_request_builder.rb +++ b/lib/chats/item/messages/messages_request_builder.rb @@ -46,7 +46,7 @@ def by_chat_message_id(chat_message_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/messages{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Retrieve the list of messages in a chat. This method supports federation. To list chat messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). @@ -58,8 +58,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ChatMessageCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,8 +73,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ChatMessage.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -85,15 +83,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -105,17 +103,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a messages_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MessagesRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve the list of messages in a chat. This method supports federation. To list chat messages in application context, the request must be made from the tenant that the channel owner belongs to (represented by the tenantId property on the channel). diff --git a/lib/chats/item/permission_grants/count/count_request_builder.rb b/lib/chats/item/permission_grants/count/count_request_builder.rb index 9fead3164e..830083132f 100644 --- a/lib/chats/item/permission_grants/count/count_request_builder.rb +++ b/lib/chats/item/permission_grants/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/permissionGrants/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/permissionGrants/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/chats/item/permission_grants/delta/delta.rb b/lib/chats/item/permission_grants/delta/delta.rb deleted file mode 100644 index 0c348d20cb..0000000000 --- a/lib/chats/item/permission_grants/delta/delta.rb +++ /dev/null @@ -1 +0,0 @@ -require_relative 'delta_response' diff --git a/lib/chats/item/permission_grants/delta/delta_request_builder.rb b/lib/chats/item/permission_grants/delta/delta_request_builder.rb deleted file mode 100644 index 988918afd1..0000000000 --- a/lib/chats/item/permission_grants/delta/delta_request_builder.rb +++ /dev/null @@ -1,117 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../../models/o_data_errors_o_data_error' -require_relative '../../../chats' -require_relative '../../item' -require_relative '../permission_grants' -require_relative './delta' - -module MicrosoftGraph - module Chats - module Item - module PermissionGrants - module Delta - ## - # Provides operations to call the delta method. - class DeltaRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder - - ## - ## Instantiates a new DeltaRequestBuilder and sets the default values. - ## @param path_parameters Path parameters for the request - ## @param request_adapter The request adapter to use to execute the requests. - ## @return a void - ## - def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/permissionGrants/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}") - end - ## - ## Invoke function delta - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of delta_response - ## - def get(request_configuration=nil) - request_info = self.to_get_request_information( - request_configuration - ) - error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Chats::Item::PermissionGrants::Delta::DeltaResponse.create_from_discriminator_value(pn) }, error_mapping) - end - ## - ## Invoke function delta - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a request_information - ## - def to_get_request_information(request_configuration=nil) - request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') - unless request_configuration.nil? - request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) - request_info.add_request_options(request_configuration.options) - end - return request_info - end - - ## - # Invoke function delta - class DeltaRequestBuilderGetQueryParameters - - ## - # Include count of items - attr_accessor :count - ## - # Filter items by property values - attr_accessor :filter - ## - # Order items by property values - attr_accessor :orderby - ## - # Search items by search phrases - attr_accessor :search - ## - # Select properties to be returned - attr_accessor :select - ## - # Skip the first n items - attr_accessor :skip - ## - # Show only the first n items - attr_accessor :top - ## - ## Maps the query parameters names to their encoded names for the URI template parsing. - ## @param original_name The original query parameter name in the class. - ## @return a string - ## - def get_query_parameter(original_name) - raise StandardError, 'original_name cannot be null' if original_name.nil? - case original_name - when "count" - return "%24count" - when "filter" - return "%24filter" - when "orderby" - return "%24orderby" - when "search" - return "%24search" - when "select" - return "%24select" - when "skip" - return "%24skip" - when "top" - return "%24top" - else - return original_name - end - end - end - end - end - end - end - end -end diff --git a/lib/chats/item/permission_grants/delta/delta_response.rb b/lib/chats/item/permission_grants/delta/delta_response.rb deleted file mode 100644 index db6249c787..0000000000 --- a/lib/chats/item/permission_grants/delta/delta_response.rb +++ /dev/null @@ -1,75 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../../models/base_delta_function_response' -require_relative '../../../../models/directory_object' -require_relative '../../../chats' -require_relative '../../item' -require_relative '../permission_grants' -require_relative './delta' - -module MicrosoftGraph - module Chats - module Item - module PermissionGrants - module Delta - class DeltaResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new deltaResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a delta_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return DeltaResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a directory_object - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end -end diff --git a/lib/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties.rb b/lib/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties.rb deleted file mode 100644 index b6fee576bf..0000000000 --- a/lib/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties.rb +++ /dev/null @@ -1,2 +0,0 @@ -require_relative 'get_available_extension_properties_post_request_body' -require_relative 'get_available_extension_properties_response' diff --git a/lib/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.rb b/lib/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.rb deleted file mode 100644 index 5740ca0083..0000000000 --- a/lib/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_post_request_body.rb +++ /dev/null @@ -1,91 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../chats' -require_relative '../../item' -require_relative '../permission_grants' -require_relative './get_available_extension_properties' - -module MicrosoftGraph - module Chats - module Item - module PermissionGrants - module GetAvailableExtensionProperties - class GetAvailableExtensionPropertiesPostRequestBody - include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable - ## - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - @additional_data - ## - # The isSyncedFromOnPremises property - @is_synced_from_on_premises - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @return a i_dictionary - ## - def additional_data - return @additional_data - end - ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. - ## @return a void - ## - def additional_data=(value) - @additional_data = value - end - ## - ## Instantiates a new getAvailableExtensionPropertiesPostRequestBody and sets the default values. - ## @return a void - ## - def initialize() - @additional_data = Hash.new - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_available_extension_properties_post_request_body - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetAvailableExtensionPropertiesPostRequestBody.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return { - "isSyncedFromOnPremises" => lambda {|n| @is_synced_from_on_premises = n.get_boolean_value() }, - } - end - ## - ## Gets the isSyncedFromOnPremises property value. The isSyncedFromOnPremises property - ## @return a boolean - ## - def is_synced_from_on_premises - return @is_synced_from_on_premises - end - ## - ## Sets the isSyncedFromOnPremises property value. The isSyncedFromOnPremises property - ## @param value Value to set for the isSyncedFromOnPremises property. - ## @return a void - ## - def is_synced_from_on_premises=(value) - @is_synced_from_on_premises = value - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_boolean_value("isSyncedFromOnPremises", @is_synced_from_on_premises) - writer.write_additional_data(@additional_data) - end - end - end - end - end - end -end diff --git a/lib/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.rb b/lib/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.rb deleted file mode 100644 index f335dd1da4..0000000000 --- a/lib/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_request_builder.rb +++ /dev/null @@ -1,68 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../../models/o_data_errors_o_data_error' -require_relative '../../../chats' -require_relative '../../item' -require_relative '../permission_grants' -require_relative './get_available_extension_properties' - -module MicrosoftGraph - module Chats - module Item - module PermissionGrants - module GetAvailableExtensionProperties - ## - # Provides operations to call the getAvailableExtensionProperties method. - class GetAvailableExtensionPropertiesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder - - ## - ## Instantiates a new GetAvailableExtensionPropertiesRequestBuilder and sets the default values. - ## @param path_parameters Path parameters for the request - ## @param request_adapter The request adapter to use to execute the requests. - ## @return a void - ## - def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/permissionGrants/getAvailableExtensionProperties") - end - ## - ## Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization - ## @param body The request body - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_available_extension_properties_response - ## - def post(body, request_configuration=nil) - raise StandardError, 'body cannot be null' if body.nil? - request_info = self.to_post_request_information( - body, request_configuration - ) - error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Chats::Item::PermissionGrants::GetAvailableExtensionProperties::GetAvailableExtensionPropertiesResponse.create_from_discriminator_value(pn) }, error_mapping) - end - ## - ## Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization - ## @param body The request body - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a request_information - ## - def to_post_request_information(body, request_configuration=nil) - raise StandardError, 'body cannot be null' if body.nil? - request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') - unless request_configuration.nil? - request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) - return request_info - end - end - end - end - end - end -end diff --git a/lib/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_response.rb b/lib/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_response.rb deleted file mode 100644 index 83f2a4bb0e..0000000000 --- a/lib/chats/item/permission_grants/get_available_extension_properties/get_available_extension_properties_response.rb +++ /dev/null @@ -1,75 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../../models/base_collection_pagination_count_response' -require_relative '../../../../models/extension_property' -require_relative '../../../chats' -require_relative '../../item' -require_relative '../permission_grants' -require_relative './get_available_extension_properties' - -module MicrosoftGraph - module Chats - module Item - module PermissionGrants - module GetAvailableExtensionProperties - class GetAvailableExtensionPropertiesResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getAvailableExtensionPropertiesResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_available_extension_properties_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetAvailableExtensionPropertiesResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ExtensionProperty.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a extension_property - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end -end diff --git a/lib/chats/item/permission_grants/get_by_ids/get_by_ids.rb b/lib/chats/item/permission_grants/get_by_ids/get_by_ids.rb deleted file mode 100644 index e4b0824834..0000000000 --- a/lib/chats/item/permission_grants/get_by_ids/get_by_ids.rb +++ /dev/null @@ -1,2 +0,0 @@ -require_relative 'get_by_ids_post_request_body' -require_relative 'get_by_ids_response' diff --git a/lib/chats/item/permission_grants/get_by_ids/get_by_ids_post_request_body.rb b/lib/chats/item/permission_grants/get_by_ids/get_by_ids_post_request_body.rb deleted file mode 100644 index b9ef8ece32..0000000000 --- a/lib/chats/item/permission_grants/get_by_ids/get_by_ids_post_request_body.rb +++ /dev/null @@ -1,111 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../chats' -require_relative '../../item' -require_relative '../permission_grants' -require_relative './get_by_ids' - -module MicrosoftGraph - module Chats - module Item - module PermissionGrants - module GetByIds - class GetByIdsPostRequestBody - include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable - ## - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - @additional_data - ## - # The ids property - @ids - ## - # The types property - @types - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @return a i_dictionary - ## - def additional_data - return @additional_data - end - ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. - ## @return a void - ## - def additional_data=(value) - @additional_data = value - end - ## - ## Instantiates a new getByIdsPostRequestBody and sets the default values. - ## @return a void - ## - def initialize() - @additional_data = Hash.new - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_by_ids_post_request_body - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetByIdsPostRequestBody.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return { - "ids" => lambda {|n| @ids = n.get_collection_of_primitive_values(String) }, - "types" => lambda {|n| @types = n.get_collection_of_primitive_values(String) }, - } - end - ## - ## Gets the ids property value. The ids property - ## @return a string - ## - def ids - return @ids - end - ## - ## Sets the ids property value. The ids property - ## @param value Value to set for the ids property. - ## @return a void - ## - def ids=(value) - @ids = value - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_collection_of_primitive_values("ids", @ids) - writer.write_collection_of_primitive_values("types", @types) - writer.write_additional_data(@additional_data) - end - ## - ## Gets the types property value. The types property - ## @return a string - ## - def types - return @types - end - ## - ## Sets the types property value. The types property - ## @param value Value to set for the types property. - ## @return a void - ## - def types=(value) - @types = value - end - end - end - end - end - end -end diff --git a/lib/chats/item/permission_grants/get_by_ids/get_by_ids_request_builder.rb b/lib/chats/item/permission_grants/get_by_ids/get_by_ids_request_builder.rb deleted file mode 100644 index 267a4929ef..0000000000 --- a/lib/chats/item/permission_grants/get_by_ids/get_by_ids_request_builder.rb +++ /dev/null @@ -1,68 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../../models/o_data_errors_o_data_error' -require_relative '../../../chats' -require_relative '../../item' -require_relative '../permission_grants' -require_relative './get_by_ids' - -module MicrosoftGraph - module Chats - module Item - module PermissionGrants - module GetByIds - ## - # Provides operations to call the getByIds method. - class GetByIdsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder - - ## - ## Instantiates a new GetByIdsRequestBuilder and sets the default values. - ## @param path_parameters Path parameters for the request - ## @param request_adapter The request adapter to use to execute the requests. - ## @return a void - ## - def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/permissionGrants/getByIds") - end - ## - ## Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: - ## @param body The request body - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_by_ids_response - ## - def post(body, request_configuration=nil) - raise StandardError, 'body cannot be null' if body.nil? - request_info = self.to_post_request_information( - body, request_configuration - ) - error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Chats::Item::PermissionGrants::GetByIds::GetByIdsResponse.create_from_discriminator_value(pn) }, error_mapping) - end - ## - ## Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: - ## @param body The request body - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a request_information - ## - def to_post_request_information(body, request_configuration=nil) - raise StandardError, 'body cannot be null' if body.nil? - request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') - unless request_configuration.nil? - request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) - return request_info - end - end - end - end - end - end -end diff --git a/lib/chats/item/permission_grants/get_by_ids/get_by_ids_response.rb b/lib/chats/item/permission_grants/get_by_ids/get_by_ids_response.rb deleted file mode 100644 index 555754ab4d..0000000000 --- a/lib/chats/item/permission_grants/get_by_ids/get_by_ids_response.rb +++ /dev/null @@ -1,75 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../../models/base_collection_pagination_count_response' -require_relative '../../../../models/directory_object' -require_relative '../../../chats' -require_relative '../../item' -require_relative '../permission_grants' -require_relative './get_by_ids' - -module MicrosoftGraph - module Chats - module Item - module PermissionGrants - module GetByIds - class GetByIdsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getByIdsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_by_ids_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetByIdsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a directory_object - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end -end diff --git a/lib/chats/item/permission_grants/item/check_member_groups/check_member_groups.rb b/lib/chats/item/permission_grants/item/check_member_groups/check_member_groups.rb deleted file mode 100644 index 938b908522..0000000000 --- a/lib/chats/item/permission_grants/item/check_member_groups/check_member_groups.rb +++ /dev/null @@ -1,2 +0,0 @@ -require_relative 'check_member_groups_post_request_body' -require_relative 'check_member_groups_response' diff --git a/lib/chats/item/permission_grants/item/check_member_groups/check_member_groups_post_request_body.rb b/lib/chats/item/permission_grants/item/check_member_groups/check_member_groups_post_request_body.rb deleted file mode 100644 index cc246b542c..0000000000 --- a/lib/chats/item/permission_grants/item/check_member_groups/check_member_groups_post_request_body.rb +++ /dev/null @@ -1,94 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../microsoft_graph' -require_relative '../../../../chats' -require_relative '../../../item' -require_relative '../../permission_grants' -require_relative '../item' -require_relative './check_member_groups' - -module MicrosoftGraph - module Chats - module Item - module PermissionGrants - module Item - module CheckMemberGroups - class CheckMemberGroupsPostRequestBody - include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable - ## - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - @additional_data - ## - # The groupIds property - @group_ids - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @return a i_dictionary - ## - def additional_data - return @additional_data - end - ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. - ## @return a void - ## - def additional_data=(value) - @additional_data = value - end - ## - ## Instantiates a new checkMemberGroupsPostRequestBody and sets the default values. - ## @return a void - ## - def initialize() - @additional_data = Hash.new - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a check_member_groups_post_request_body - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return CheckMemberGroupsPostRequestBody.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return { - "groupIds" => lambda {|n| @group_ids = n.get_collection_of_primitive_values(String) }, - } - end - ## - ## Gets the groupIds property value. The groupIds property - ## @return a string - ## - def group_ids - return @group_ids - end - ## - ## Sets the groupIds property value. The groupIds property - ## @param value Value to set for the groupIds property. - ## @return a void - ## - def group_ids=(value) - @group_ids = value - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_collection_of_primitive_values("groupIds", @group_ids) - writer.write_additional_data(@additional_data) - end - end - end - end - end - end - end -end diff --git a/lib/chats/item/permission_grants/item/check_member_groups/check_member_groups_request_builder.rb b/lib/chats/item/permission_grants/item/check_member_groups/check_member_groups_request_builder.rb deleted file mode 100644 index 4385a9ef1e..0000000000 --- a/lib/chats/item/permission_grants/item/check_member_groups/check_member_groups_request_builder.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../microsoft_graph' -require_relative '../../../../../models/o_data_errors_o_data_error' -require_relative '../../../../chats' -require_relative '../../../item' -require_relative '../../permission_grants' -require_relative '../item' -require_relative './check_member_groups' - -module MicrosoftGraph - module Chats - module Item - module PermissionGrants - module Item - module CheckMemberGroups - ## - # Provides operations to call the checkMemberGroups method. - class CheckMemberGroupsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder - - ## - ## Instantiates a new CheckMemberGroupsRequestBuilder and sets the default values. - ## @param path_parameters Path parameters for the request - ## @param request_adapter The request adapter to use to execute the requests. - ## @return a void - ## - def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/checkMemberGroups") - end - ## - ## Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. - ## @param body The request body - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of check_member_groups_response - ## - def post(body, request_configuration=nil) - raise StandardError, 'body cannot be null' if body.nil? - request_info = self.to_post_request_information( - body, request_configuration - ) - error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Chats::Item::PermissionGrants::Item::CheckMemberGroups::CheckMemberGroupsResponse.create_from_discriminator_value(pn) }, error_mapping) - end - ## - ## Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. - ## @param body The request body - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a request_information - ## - def to_post_request_information(body, request_configuration=nil) - raise StandardError, 'body cannot be null' if body.nil? - request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') - unless request_configuration.nil? - request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) - return request_info - end - end - end - end - end - end - end -end diff --git a/lib/chats/item/permission_grants/item/check_member_groups/check_member_groups_response.rb b/lib/chats/item/permission_grants/item/check_member_groups/check_member_groups_response.rb deleted file mode 100644 index ae88c93782..0000000000 --- a/lib/chats/item/permission_grants/item/check_member_groups/check_member_groups_response.rb +++ /dev/null @@ -1,77 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../microsoft_graph' -require_relative '../../../../../models/base_collection_pagination_count_response' -require_relative '../../../../chats' -require_relative '../../../item' -require_relative '../../permission_grants' -require_relative '../item' -require_relative './check_member_groups' - -module MicrosoftGraph - module Chats - module Item - module PermissionGrants - module Item - module CheckMemberGroups - class CheckMemberGroupsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new checkMemberGroupsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a check_member_groups_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return CheckMemberGroupsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end - end -end diff --git a/lib/chats/item/permission_grants/item/check_member_objects/check_member_objects.rb b/lib/chats/item/permission_grants/item/check_member_objects/check_member_objects.rb deleted file mode 100644 index 67fbf971e7..0000000000 --- a/lib/chats/item/permission_grants/item/check_member_objects/check_member_objects.rb +++ /dev/null @@ -1,2 +0,0 @@ -require_relative 'check_member_objects_post_request_body' -require_relative 'check_member_objects_response' diff --git a/lib/chats/item/permission_grants/item/check_member_objects/check_member_objects_post_request_body.rb b/lib/chats/item/permission_grants/item/check_member_objects/check_member_objects_post_request_body.rb deleted file mode 100644 index ee2b1411b0..0000000000 --- a/lib/chats/item/permission_grants/item/check_member_objects/check_member_objects_post_request_body.rb +++ /dev/null @@ -1,94 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../microsoft_graph' -require_relative '../../../../chats' -require_relative '../../../item' -require_relative '../../permission_grants' -require_relative '../item' -require_relative './check_member_objects' - -module MicrosoftGraph - module Chats - module Item - module PermissionGrants - module Item - module CheckMemberObjects - class CheckMemberObjectsPostRequestBody - include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable - ## - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - @additional_data - ## - # The ids property - @ids - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @return a i_dictionary - ## - def additional_data - return @additional_data - end - ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. - ## @return a void - ## - def additional_data=(value) - @additional_data = value - end - ## - ## Instantiates a new checkMemberObjectsPostRequestBody and sets the default values. - ## @return a void - ## - def initialize() - @additional_data = Hash.new - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a check_member_objects_post_request_body - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return CheckMemberObjectsPostRequestBody.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return { - "ids" => lambda {|n| @ids = n.get_collection_of_primitive_values(String) }, - } - end - ## - ## Gets the ids property value. The ids property - ## @return a string - ## - def ids - return @ids - end - ## - ## Sets the ids property value. The ids property - ## @param value Value to set for the ids property. - ## @return a void - ## - def ids=(value) - @ids = value - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_collection_of_primitive_values("ids", @ids) - writer.write_additional_data(@additional_data) - end - end - end - end - end - end - end -end diff --git a/lib/chats/item/permission_grants/item/check_member_objects/check_member_objects_request_builder.rb b/lib/chats/item/permission_grants/item/check_member_objects/check_member_objects_request_builder.rb deleted file mode 100644 index 765be87bbc..0000000000 --- a/lib/chats/item/permission_grants/item/check_member_objects/check_member_objects_request_builder.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../microsoft_graph' -require_relative '../../../../../models/o_data_errors_o_data_error' -require_relative '../../../../chats' -require_relative '../../../item' -require_relative '../../permission_grants' -require_relative '../item' -require_relative './check_member_objects' - -module MicrosoftGraph - module Chats - module Item - module PermissionGrants - module Item - module CheckMemberObjects - ## - # Provides operations to call the checkMemberObjects method. - class CheckMemberObjectsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder - - ## - ## Instantiates a new CheckMemberObjectsRequestBuilder and sets the default values. - ## @param path_parameters Path parameters for the request - ## @param request_adapter The request adapter to use to execute the requests. - ## @return a void - ## - def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/checkMemberObjects") - end - ## - ## Invoke action checkMemberObjects - ## @param body The request body - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of check_member_objects_response - ## - def post(body, request_configuration=nil) - raise StandardError, 'body cannot be null' if body.nil? - request_info = self.to_post_request_information( - body, request_configuration - ) - error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Chats::Item::PermissionGrants::Item::CheckMemberObjects::CheckMemberObjectsResponse.create_from_discriminator_value(pn) }, error_mapping) - end - ## - ## Invoke action checkMemberObjects - ## @param body The request body - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a request_information - ## - def to_post_request_information(body, request_configuration=nil) - raise StandardError, 'body cannot be null' if body.nil? - request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') - unless request_configuration.nil? - request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) - return request_info - end - end - end - end - end - end - end -end diff --git a/lib/chats/item/permission_grants/item/check_member_objects/check_member_objects_response.rb b/lib/chats/item/permission_grants/item/check_member_objects/check_member_objects_response.rb deleted file mode 100644 index 281b764e29..0000000000 --- a/lib/chats/item/permission_grants/item/check_member_objects/check_member_objects_response.rb +++ /dev/null @@ -1,77 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../microsoft_graph' -require_relative '../../../../../models/base_collection_pagination_count_response' -require_relative '../../../../chats' -require_relative '../../../item' -require_relative '../../permission_grants' -require_relative '../item' -require_relative './check_member_objects' - -module MicrosoftGraph - module Chats - module Item - module PermissionGrants - module Item - module CheckMemberObjects - class CheckMemberObjectsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new checkMemberObjectsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a check_member_objects_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return CheckMemberObjectsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end - end -end diff --git a/lib/chats/item/permission_grants/item/get_member_groups/get_member_groups.rb b/lib/chats/item/permission_grants/item/get_member_groups/get_member_groups.rb deleted file mode 100644 index 0a25b012ea..0000000000 --- a/lib/chats/item/permission_grants/item/get_member_groups/get_member_groups.rb +++ /dev/null @@ -1,2 +0,0 @@ -require_relative 'get_member_groups_post_request_body' -require_relative 'get_member_groups_response' diff --git a/lib/chats/item/permission_grants/item/get_member_groups/get_member_groups_post_request_body.rb b/lib/chats/item/permission_grants/item/get_member_groups/get_member_groups_post_request_body.rb deleted file mode 100644 index 1bdcd4454b..0000000000 --- a/lib/chats/item/permission_grants/item/get_member_groups/get_member_groups_post_request_body.rb +++ /dev/null @@ -1,94 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../microsoft_graph' -require_relative '../../../../chats' -require_relative '../../../item' -require_relative '../../permission_grants' -require_relative '../item' -require_relative './get_member_groups' - -module MicrosoftGraph - module Chats - module Item - module PermissionGrants - module Item - module GetMemberGroups - class GetMemberGroupsPostRequestBody - include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable - ## - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - @additional_data - ## - # The securityEnabledOnly property - @security_enabled_only - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @return a i_dictionary - ## - def additional_data - return @additional_data - end - ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. - ## @return a void - ## - def additional_data=(value) - @additional_data = value - end - ## - ## Instantiates a new getMemberGroupsPostRequestBody and sets the default values. - ## @return a void - ## - def initialize() - @additional_data = Hash.new - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_member_groups_post_request_body - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetMemberGroupsPostRequestBody.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return { - "securityEnabledOnly" => lambda {|n| @security_enabled_only = n.get_boolean_value() }, - } - end - ## - ## Gets the securityEnabledOnly property value. The securityEnabledOnly property - ## @return a boolean - ## - def security_enabled_only - return @security_enabled_only - end - ## - ## Sets the securityEnabledOnly property value. The securityEnabledOnly property - ## @param value Value to set for the securityEnabledOnly property. - ## @return a void - ## - def security_enabled_only=(value) - @security_enabled_only = value - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_boolean_value("securityEnabledOnly", @security_enabled_only) - writer.write_additional_data(@additional_data) - end - end - end - end - end - end - end -end diff --git a/lib/chats/item/permission_grants/item/get_member_groups/get_member_groups_request_builder.rb b/lib/chats/item/permission_grants/item/get_member_groups/get_member_groups_request_builder.rb deleted file mode 100644 index 0cdfecae38..0000000000 --- a/lib/chats/item/permission_grants/item/get_member_groups/get_member_groups_request_builder.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../microsoft_graph' -require_relative '../../../../../models/o_data_errors_o_data_error' -require_relative '../../../../chats' -require_relative '../../../item' -require_relative '../../permission_grants' -require_relative '../item' -require_relative './get_member_groups' - -module MicrosoftGraph - module Chats - module Item - module PermissionGrants - module Item - module GetMemberGroups - ## - # Provides operations to call the getMemberGroups method. - class GetMemberGroupsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder - - ## - ## Instantiates a new GetMemberGroupsRequestBuilder and sets the default values. - ## @param path_parameters Path parameters for the request - ## @param request_adapter The request adapter to use to execute the requests. - ## @return a void - ## - def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/getMemberGroups") - end - ## - ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. - ## @param body The request body - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_member_groups_response - ## - def post(body, request_configuration=nil) - raise StandardError, 'body cannot be null' if body.nil? - request_info = self.to_post_request_information( - body, request_configuration - ) - error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Chats::Item::PermissionGrants::Item::GetMemberGroups::GetMemberGroupsResponse.create_from_discriminator_value(pn) }, error_mapping) - end - ## - ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. - ## @param body The request body - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a request_information - ## - def to_post_request_information(body, request_configuration=nil) - raise StandardError, 'body cannot be null' if body.nil? - request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') - unless request_configuration.nil? - request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) - return request_info - end - end - end - end - end - end - end -end diff --git a/lib/chats/item/permission_grants/item/get_member_groups/get_member_groups_response.rb b/lib/chats/item/permission_grants/item/get_member_groups/get_member_groups_response.rb deleted file mode 100644 index c28fd32b74..0000000000 --- a/lib/chats/item/permission_grants/item/get_member_groups/get_member_groups_response.rb +++ /dev/null @@ -1,77 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../microsoft_graph' -require_relative '../../../../../models/base_collection_pagination_count_response' -require_relative '../../../../chats' -require_relative '../../../item' -require_relative '../../permission_grants' -require_relative '../item' -require_relative './get_member_groups' - -module MicrosoftGraph - module Chats - module Item - module PermissionGrants - module Item - module GetMemberGroups - class GetMemberGroupsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getMemberGroupsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_member_groups_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetMemberGroupsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end - end -end diff --git a/lib/chats/item/permission_grants/item/get_member_objects/get_member_objects.rb b/lib/chats/item/permission_grants/item/get_member_objects/get_member_objects.rb deleted file mode 100644 index 40edad6b9e..0000000000 --- a/lib/chats/item/permission_grants/item/get_member_objects/get_member_objects.rb +++ /dev/null @@ -1,2 +0,0 @@ -require_relative 'get_member_objects_post_request_body' -require_relative 'get_member_objects_response' diff --git a/lib/chats/item/permission_grants/item/get_member_objects/get_member_objects_post_request_body.rb b/lib/chats/item/permission_grants/item/get_member_objects/get_member_objects_post_request_body.rb deleted file mode 100644 index de0343e592..0000000000 --- a/lib/chats/item/permission_grants/item/get_member_objects/get_member_objects_post_request_body.rb +++ /dev/null @@ -1,94 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../microsoft_graph' -require_relative '../../../../chats' -require_relative '../../../item' -require_relative '../../permission_grants' -require_relative '../item' -require_relative './get_member_objects' - -module MicrosoftGraph - module Chats - module Item - module PermissionGrants - module Item - module GetMemberObjects - class GetMemberObjectsPostRequestBody - include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable - ## - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - @additional_data - ## - # The securityEnabledOnly property - @security_enabled_only - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @return a i_dictionary - ## - def additional_data - return @additional_data - end - ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. - ## @return a void - ## - def additional_data=(value) - @additional_data = value - end - ## - ## Instantiates a new getMemberObjectsPostRequestBody and sets the default values. - ## @return a void - ## - def initialize() - @additional_data = Hash.new - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_member_objects_post_request_body - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetMemberObjectsPostRequestBody.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return { - "securityEnabledOnly" => lambda {|n| @security_enabled_only = n.get_boolean_value() }, - } - end - ## - ## Gets the securityEnabledOnly property value. The securityEnabledOnly property - ## @return a boolean - ## - def security_enabled_only - return @security_enabled_only - end - ## - ## Sets the securityEnabledOnly property value. The securityEnabledOnly property - ## @param value Value to set for the securityEnabledOnly property. - ## @return a void - ## - def security_enabled_only=(value) - @security_enabled_only = value - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_boolean_value("securityEnabledOnly", @security_enabled_only) - writer.write_additional_data(@additional_data) - end - end - end - end - end - end - end -end diff --git a/lib/chats/item/permission_grants/item/get_member_objects/get_member_objects_request_builder.rb b/lib/chats/item/permission_grants/item/get_member_objects/get_member_objects_request_builder.rb deleted file mode 100644 index 3d8e26ed96..0000000000 --- a/lib/chats/item/permission_grants/item/get_member_objects/get_member_objects_request_builder.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../microsoft_graph' -require_relative '../../../../../models/o_data_errors_o_data_error' -require_relative '../../../../chats' -require_relative '../../../item' -require_relative '../../permission_grants' -require_relative '../item' -require_relative './get_member_objects' - -module MicrosoftGraph - module Chats - module Item - module PermissionGrants - module Item - module GetMemberObjects - ## - # Provides operations to call the getMemberObjects method. - class GetMemberObjectsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder - - ## - ## Instantiates a new GetMemberObjectsRequestBuilder and sets the default values. - ## @param path_parameters Path parameters for the request - ## @param request_adapter The request adapter to use to execute the requests. - ## @return a void - ## - def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/getMemberObjects") - end - ## - ## Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. - ## @param body The request body - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_member_objects_response - ## - def post(body, request_configuration=nil) - raise StandardError, 'body cannot be null' if body.nil? - request_info = self.to_post_request_information( - body, request_configuration - ) - error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Chats::Item::PermissionGrants::Item::GetMemberObjects::GetMemberObjectsResponse.create_from_discriminator_value(pn) }, error_mapping) - end - ## - ## Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. - ## @param body The request body - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a request_information - ## - def to_post_request_information(body, request_configuration=nil) - raise StandardError, 'body cannot be null' if body.nil? - request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') - unless request_configuration.nil? - request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) - return request_info - end - end - end - end - end - end - end -end diff --git a/lib/chats/item/permission_grants/item/get_member_objects/get_member_objects_response.rb b/lib/chats/item/permission_grants/item/get_member_objects/get_member_objects_response.rb deleted file mode 100644 index cdc4734c94..0000000000 --- a/lib/chats/item/permission_grants/item/get_member_objects/get_member_objects_response.rb +++ /dev/null @@ -1,77 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../microsoft_graph' -require_relative '../../../../../models/base_collection_pagination_count_response' -require_relative '../../../../chats' -require_relative '../../../item' -require_relative '../../permission_grants' -require_relative '../item' -require_relative './get_member_objects' - -module MicrosoftGraph - module Chats - module Item - module PermissionGrants - module Item - module GetMemberObjects - class GetMemberObjectsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getMemberObjectsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_member_objects_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetMemberObjectsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end - end -end diff --git a/lib/chats/item/permission_grants/item/resource_specific_permission_grant_item_request_builder.rb b/lib/chats/item/permission_grants/item/resource_specific_permission_grant_item_request_builder.rb index 762b9017af..1686c1a9ad 100644 --- a/lib/chats/item/permission_grants/item/resource_specific_permission_grant_item_request_builder.rb +++ b/lib/chats/item/permission_grants/item/resource_specific_permission_grant_item_request_builder.rb @@ -5,12 +5,7 @@ require_relative '../../../chats' require_relative '../../item' require_relative '../permission_grants' -require_relative './check_member_groups/check_member_groups_request_builder' -require_relative './check_member_objects/check_member_objects_request_builder' -require_relative './get_member_groups/get_member_groups_request_builder' -require_relative './get_member_objects/get_member_objects_request_builder' require_relative './item' -require_relative './restore/restore_request_builder' module MicrosoftGraph module Chats @@ -21,31 +16,6 @@ module Item # Provides operations to manage the permissionGrants property of the microsoft.graph.chat entity. class ResourceSpecificPermissionGrantItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder - ## - # Provides operations to call the checkMemberGroups method. - def check_member_groups() - return MicrosoftGraph::Chats::Item::PermissionGrants::Item::CheckMemberGroups::CheckMemberGroupsRequestBuilder.new(@path_parameters, @request_adapter) - end - ## - # Provides operations to call the checkMemberObjects method. - def check_member_objects() - return MicrosoftGraph::Chats::Item::PermissionGrants::Item::CheckMemberObjects::CheckMemberObjectsRequestBuilder.new(@path_parameters, @request_adapter) - end - ## - # Provides operations to call the getMemberGroups method. - def get_member_groups() - return MicrosoftGraph::Chats::Item::PermissionGrants::Item::GetMemberGroups::GetMemberGroupsRequestBuilder.new(@path_parameters, @request_adapter) - end - ## - # Provides operations to call the getMemberObjects method. - def get_member_objects() - return MicrosoftGraph::Chats::Item::PermissionGrants::Item::GetMemberObjects::GetMemberObjectsRequestBuilder.new(@path_parameters, @request_adapter) - end - ## - # Provides operations to call the restore method. - def restore() - return MicrosoftGraph::Chats::Item::PermissionGrants::Item::Restore::RestoreRequestBuilder.new(@path_parameters, @request_adapter) - end ## ## Instantiates a new ResourceSpecificPermissionGrantItemRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request @@ -53,7 +23,7 @@ def restore() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}{?%24expand,%24select}") end ## ## Delete navigation property permissionGrants for chats @@ -65,12 +35,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Get permissionGrants from chats + ## A collection of permissions granted to apps for the chat. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of resource_specific_permission_grant ## @@ -79,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ResourceSpecificPermissionGrant.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -95,8 +63,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ResourceSpecificPermissionGrant.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -106,31 +73,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Get permissionGrants from chats + ## A collection of permissions granted to apps for the chat. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -142,20 +110,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a resource_specific_permission_grant_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ResourceSpecificPermissionGrantItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Get permissionGrants from chats + # A collection of permissions granted to apps for the chat. class ResourceSpecificPermissionGrantItemRequestBuilderGetQueryParameters ## diff --git a/lib/chats/item/permission_grants/item/restore/restore_request_builder.rb b/lib/chats/item/permission_grants/item/restore/restore_request_builder.rb deleted file mode 100644 index 63d07d38ca..0000000000 --- a/lib/chats/item/permission_grants/item/restore/restore_request_builder.rb +++ /dev/null @@ -1,67 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../microsoft_graph' -require_relative '../../../../../models/directory_object' -require_relative '../../../../../models/o_data_errors_o_data_error' -require_relative '../../../../chats' -require_relative '../../../item' -require_relative '../../permission_grants' -require_relative '../item' -require_relative './restore' - -module MicrosoftGraph - module Chats - module Item - module PermissionGrants - module Item - module Restore - ## - # Provides operations to call the restore method. - class RestoreRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder - - ## - ## Instantiates a new RestoreRequestBuilder and sets the default values. - ## @param path_parameters Path parameters for the request - ## @param request_adapter The request adapter to use to execute the requests. - ## @return a void - ## - def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/permissionGrants/{resourceSpecificPermissionGrant%2Did}/restore") - end - ## - ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of directory_object - ## - def post(request_configuration=nil) - request_info = self.to_post_request_information( - request_configuration - ) - error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }, error_mapping) - end - ## - ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a request_information - ## - def to_post_request_information(request_configuration=nil) - request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') - unless request_configuration.nil? - request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - end - return request_info - end - end - end - end - end - end - end -end diff --git a/lib/chats/item/permission_grants/permission_grants_request_builder.rb b/lib/chats/item/permission_grants/permission_grants_request_builder.rb index 4001947989..10ef5cca7a 100644 --- a/lib/chats/item/permission_grants/permission_grants_request_builder.rb +++ b/lib/chats/item/permission_grants/permission_grants_request_builder.rb @@ -6,12 +6,8 @@ require_relative '../../chats' require_relative '../item' require_relative './count/count_request_builder' -require_relative './delta/delta_request_builder' -require_relative './get_available_extension_properties/get_available_extension_properties_request_builder' -require_relative './get_by_ids/get_by_ids_request_builder' require_relative './item/resource_specific_permission_grant_item_request_builder' require_relative './permission_grants' -require_relative './validate_properties/validate_properties_request_builder' module MicrosoftGraph module Chats @@ -27,26 +23,6 @@ def count() return MicrosoftGraph::Chats::Item::PermissionGrants::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) end ## - # Provides operations to call the delta method. - def delta() - return MicrosoftGraph::Chats::Item::PermissionGrants::Delta::DeltaRequestBuilder.new(@path_parameters, @request_adapter) - end - ## - # Provides operations to call the getAvailableExtensionProperties method. - def get_available_extension_properties() - return MicrosoftGraph::Chats::Item::PermissionGrants::GetAvailableExtensionProperties::GetAvailableExtensionPropertiesRequestBuilder.new(@path_parameters, @request_adapter) - end - ## - # Provides operations to call the getByIds method. - def get_by_ids() - return MicrosoftGraph::Chats::Item::PermissionGrants::GetByIds::GetByIdsRequestBuilder.new(@path_parameters, @request_adapter) - end - ## - # Provides operations to call the validateProperties method. - def validate_properties() - return MicrosoftGraph::Chats::Item::PermissionGrants::ValidateProperties::ValidatePropertiesRequestBuilder.new(@path_parameters, @request_adapter) - end - ## ## Provides operations to manage the permissionGrants property of the microsoft.graph.chat entity. ## @param resource_specific_permission_grant_id The unique identifier of resourceSpecificPermissionGrant ## @return a resource_specific_permission_grant_item_request_builder @@ -64,10 +40,10 @@ def by_resource_specific_permission_grant_id(resource_specific_permission_grant_ ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/permissionGrants{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/permissionGrants{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Get permissionGrants from chats + ## List all resource-specific permission grants on the chat. This list specifies the Microsoft Entra apps that have access to the chat, along with the corresponding resource-specific access that each app has. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of resource_specific_permission_grant_collection_response ## @@ -76,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ResourceSpecificPermissionGrantCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -92,26 +67,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ResourceSpecificPermissionGrant.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Get permissionGrants from chats + ## List all resource-specific permission grants on the chat. This list specifies the Microsoft Entra apps that have access to the chat, along with the corresponding resource-specific access that each app has. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -123,20 +97,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a permission_grants_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return PermissionGrantsRequestBuilder.new(raw_url, @request_adapter) + end ## - # Get permissionGrants from chats + # List all resource-specific permission grants on the chat. This list specifies the Microsoft Entra apps that have access to the chat, along with the corresponding resource-specific access that each app has. class PermissionGrantsRequestBuilderGetQueryParameters ## diff --git a/lib/chats/item/permission_grants/validate_properties/validate_properties.rb b/lib/chats/item/permission_grants/validate_properties/validate_properties.rb deleted file mode 100644 index 6b178d139b..0000000000 --- a/lib/chats/item/permission_grants/validate_properties/validate_properties.rb +++ /dev/null @@ -1 +0,0 @@ -require_relative 'validate_properties_post_request_body' diff --git a/lib/chats/item/permission_grants/validate_properties/validate_properties_post_request_body.rb b/lib/chats/item/permission_grants/validate_properties/validate_properties_post_request_body.rb deleted file mode 100644 index 17bd9dbe49..0000000000 --- a/lib/chats/item/permission_grants/validate_properties/validate_properties_post_request_body.rb +++ /dev/null @@ -1,151 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../chats' -require_relative '../../item' -require_relative '../permission_grants' -require_relative './validate_properties' - -module MicrosoftGraph - module Chats - module Item - module PermissionGrants - module ValidateProperties - class ValidatePropertiesPostRequestBody - include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable - ## - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - @additional_data - ## - # The displayName property - @display_name - ## - # The entityType property - @entity_type - ## - # The mailNickname property - @mail_nickname - ## - # The onBehalfOfUserId property - @on_behalf_of_user_id - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @return a i_dictionary - ## - def additional_data - return @additional_data - end - ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. - ## @return a void - ## - def additional_data=(value) - @additional_data = value - end - ## - ## Instantiates a new validatePropertiesPostRequestBody and sets the default values. - ## @return a void - ## - def initialize() - @additional_data = Hash.new - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a validate_properties_post_request_body - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return ValidatePropertiesPostRequestBody.new - end - ## - ## Gets the displayName property value. The displayName property - ## @return a string - ## - def display_name - return @display_name - end - ## - ## Sets the displayName property value. The displayName property - ## @param value Value to set for the displayName property. - ## @return a void - ## - def display_name=(value) - @display_name = value - end - ## - ## Gets the entityType property value. The entityType property - ## @return a string - ## - def entity_type - return @entity_type - end - ## - ## Sets the entityType property value. The entityType property - ## @param value Value to set for the entityType property. - ## @return a void - ## - def entity_type=(value) - @entity_type = value - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return { - "displayName" => lambda {|n| @display_name = n.get_string_value() }, - "entityType" => lambda {|n| @entity_type = n.get_string_value() }, - "mailNickname" => lambda {|n| @mail_nickname = n.get_string_value() }, - "onBehalfOfUserId" => lambda {|n| @on_behalf_of_user_id = n.get_guid_value() }, - } - end - ## - ## Gets the mailNickname property value. The mailNickname property - ## @return a string - ## - def mail_nickname - return @mail_nickname - end - ## - ## Sets the mailNickname property value. The mailNickname property - ## @param value Value to set for the mailNickname property. - ## @return a void - ## - def mail_nickname=(value) - @mail_nickname = value - end - ## - ## Gets the onBehalfOfUserId property value. The onBehalfOfUserId property - ## @return a guid - ## - def on_behalf_of_user_id - return @on_behalf_of_user_id - end - ## - ## Sets the onBehalfOfUserId property value. The onBehalfOfUserId property - ## @param value Value to set for the onBehalfOfUserId property. - ## @return a void - ## - def on_behalf_of_user_id=(value) - @on_behalf_of_user_id = value - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_string_value("displayName", @display_name) - writer.write_string_value("entityType", @entity_type) - writer.write_string_value("mailNickname", @mail_nickname) - writer.write_guid_value("onBehalfOfUserId", @on_behalf_of_user_id) - writer.write_additional_data(@additional_data) - end - end - end - end - end - end -end diff --git a/lib/chats/item/permission_grants/validate_properties/validate_properties_request_builder.rb b/lib/chats/item/permission_grants/validate_properties/validate_properties_request_builder.rb deleted file mode 100644 index 937c523a9f..0000000000 --- a/lib/chats/item/permission_grants/validate_properties/validate_properties_request_builder.rb +++ /dev/null @@ -1,67 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../../models/o_data_errors_o_data_error' -require_relative '../../../chats' -require_relative '../../item' -require_relative '../permission_grants' -require_relative './validate_properties' - -module MicrosoftGraph - module Chats - module Item - module PermissionGrants - module ValidateProperties - ## - # Provides operations to call the validateProperties method. - class ValidatePropertiesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder - - ## - ## Instantiates a new ValidatePropertiesRequestBuilder and sets the default values. - ## @param path_parameters Path parameters for the request - ## @param request_adapter The request adapter to use to execute the requests. - ## @return a void - ## - def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/permissionGrants/validateProperties") - end - ## - ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. - ## @param body The request body - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of void - ## - def post(body, request_configuration=nil) - raise StandardError, 'body cannot be null' if body.nil? - request_info = self.to_post_request_information( - body, request_configuration - ) - error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, nil, error_mapping) - end - ## - ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. - ## @param body The request body - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a request_information - ## - def to_post_request_information(body, request_configuration=nil) - raise StandardError, 'body cannot be null' if body.nil? - request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - unless request_configuration.nil? - request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) - return request_info - end - end - end - end - end - end -end diff --git a/lib/chats/item/pinned_messages/count/count_request_builder.rb b/lib/chats/item/pinned_messages/count/count_request_builder.rb index e38fb017f9..11fb390fae 100644 --- a/lib/chats/item/pinned_messages/count/count_request_builder.rb +++ b/lib/chats/item/pinned_messages/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/pinnedMessages/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/pinnedMessages/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/chats/item/pinned_messages/item/message/message_request_builder.rb b/lib/chats/item/pinned_messages/item/message/message_request_builder.rb index b5f5a191b7..aaa6b71b9a 100644 --- a/lib/chats/item/pinned_messages/item/message/message_request_builder.rb +++ b/lib/chats/item/pinned_messages/item/message/message_request_builder.rb @@ -25,7 +25,7 @@ class MessageRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/pinnedMessages/{pinnedChatMessageInfo%2Did}/message{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/pinnedMessages/{pinnedChatMessageInfo%2Did}/message{?%24expand,%24select}") end ## ## Represents details about the chat message that is pinned. @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ChatMessage.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a message_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MessageRequestBuilder.new(raw_url, @request_adapter) + end ## # Represents details about the chat message that is pinned. diff --git a/lib/chats/item/pinned_messages/item/pinned_chat_message_info_item_request_builder.rb b/lib/chats/item/pinned_messages/item/pinned_chat_message_info_item_request_builder.rb index 2da8a2b43b..fe5c18b2e1 100644 --- a/lib/chats/item/pinned_messages/item/pinned_chat_message_info_item_request_builder.rb +++ b/lib/chats/item/pinned_messages/item/pinned_chat_message_info_item_request_builder.rb @@ -29,7 +29,7 @@ def message() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/pinnedMessages/{pinnedChatMessageInfo%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/pinnedMessages/{pinnedChatMessageInfo%2Did}{?%24expand,%24select}") end ## ## Unpin a message from a chat. @@ -41,8 +41,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -55,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::PinnedChatMessageInfo.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -71,8 +69,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::PinnedChatMessageInfo.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -82,13 +79,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -98,15 +96,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -118,17 +116,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a pinned_chat_message_info_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return PinnedChatMessageInfoItemRequestBuilder.new(raw_url, @request_adapter) + end ## # A collection of all the pinned messages in the chat. Nullable. diff --git a/lib/chats/item/pinned_messages/pinned_messages_request_builder.rb b/lib/chats/item/pinned_messages/pinned_messages_request_builder.rb index 261d7af944..284b07e76f 100644 --- a/lib/chats/item/pinned_messages/pinned_messages_request_builder.rb +++ b/lib/chats/item/pinned_messages/pinned_messages_request_builder.rb @@ -40,7 +40,7 @@ def by_pinned_chat_message_info_id(pinned_chat_message_info_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/pinnedMessages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/pinnedMessages{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get a list of pinnedChatMessages in a chat. @@ -52,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::PinnedChatMessageInfoCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -68,8 +67,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::PinnedChatMessageInfo.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -79,15 +77,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -99,17 +97,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a pinned_messages_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return PinnedMessagesRequestBuilder.new(raw_url, @request_adapter) + end ## # Get a list of pinnedChatMessages in a chat. diff --git a/lib/chats/item/send_activity_notification/send_activity_notification_post_request_body.rb b/lib/chats/item/send_activity_notification/send_activity_notification_post_request_body.rb index 8d3cd4ce54..e57aed61b5 100644 --- a/lib/chats/item/send_activity_notification/send_activity_notification_post_request_body.rb +++ b/lib/chats/item/send_activity_notification/send_activity_notification_post_request_body.rb @@ -24,12 +24,18 @@ class SendActivityNotificationPostRequestBody # The chainId property @chain_id ## + # The iconId property + @icon_id + ## # The previewText property @preview_text ## # The recipient property @recipient ## + # The teamsAppId property + @teams_app_id + ## # The templateParameters property @template_parameters ## @@ -51,15 +57,15 @@ def activity_type=(value) @activity_type = value end ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -81,7 +87,7 @@ def chain_id=(value) @chain_id = value end ## - ## Instantiates a new sendActivityNotificationPostRequestBody and sets the default values. + ## Instantiates a new SendActivityNotificationPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -104,13 +110,30 @@ def get_field_deserializers() return { "activityType" => lambda {|n| @activity_type = n.get_string_value() }, "chainId" => lambda {|n| @chain_id = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) }, + "iconId" => lambda {|n| @icon_id = n.get_string_value() }, "previewText" => lambda {|n| @preview_text = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ItemBody.create_from_discriminator_value(pn) }) }, "recipient" => lambda {|n| @recipient = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::TeamworkNotificationRecipient.create_from_discriminator_value(pn) }) }, + "teamsAppId" => lambda {|n| @teams_app_id = n.get_string_value() }, "templateParameters" => lambda {|n| @template_parameters = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::KeyValuePair.create_from_discriminator_value(pn) }) }, "topic" => lambda {|n| @topic = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::TeamworkActivityTopic.create_from_discriminator_value(pn) }) }, } end ## + ## Gets the iconId property value. The iconId property + ## @return a string + ## + def icon_id + return @icon_id + end + ## + ## Sets the iconId property value. The iconId property + ## @param value Value to set for the iconId property. + ## @return a void + ## + def icon_id=(value) + @icon_id = value + end + ## ## Gets the previewText property value. The previewText property ## @return a item_body ## @@ -149,13 +172,30 @@ def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? writer.write_string_value("activityType", @activity_type) writer.write_object_value("chainId", @chain_id) + writer.write_string_value("iconId", @icon_id) writer.write_object_value("previewText", @preview_text) writer.write_object_value("recipient", @recipient) + writer.write_string_value("teamsAppId", @teams_app_id) writer.write_collection_of_object_values("templateParameters", @template_parameters) writer.write_object_value("topic", @topic) writer.write_additional_data(@additional_data) end ## + ## Gets the teamsAppId property value. The teamsAppId property + ## @return a string + ## + def teams_app_id + return @teams_app_id + end + ## + ## Sets the teamsAppId property value. The teamsAppId property + ## @param value Value to set for the teamsAppId property. + ## @return a void + ## + def teams_app_id=(value) + @teams_app_id = value + end + ## ## Gets the templateParameters property value. The templateParameters property ## @return a key_value_pair ## diff --git a/lib/chats/item/send_activity_notification/send_activity_notification_request_builder.rb b/lib/chats/item/send_activity_notification/send_activity_notification_request_builder.rb index 058a699c55..cb3c384905 100644 --- a/lib/chats/item/send_activity_notification/send_activity_notification_request_builder.rb +++ b/lib/chats/item/send_activity_notification/send_activity_notification_request_builder.rb @@ -23,7 +23,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/sendActivityNotification") end ## - ## Send an activity feed notification in scope of a chat. For more details about sending notifications and the requirements for doing so, see sending Teams activity notifications. + ## Send an activity feed notification in scope of a chat. For more information about sending notifications and the requirements for doing so, see sending Teams activity notifications. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void @@ -34,12 +34,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Send an activity feed notification in scope of a chat. For more details about sending notifications and the requirements for doing so, see sending Teams activity notifications. + ## Send an activity feed notification in scope of a chat. For more information about sending notifications and the requirements for doing so, see sending Teams activity notifications. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a send_activity_notification_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SendActivityNotificationRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/chats/item/tabs/count/count_request_builder.rb b/lib/chats/item/tabs/count/count_request_builder.rb index 34e0d9ed63..449dc87984 100644 --- a/lib/chats/item/tabs/count/count_request_builder.rb +++ b/lib/chats/item/tabs/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/tabs/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/tabs/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/chats/item/tabs/item/teams_app/teams_app_request_builder.rb b/lib/chats/item/tabs/item/teams_app/teams_app_request_builder.rb index e0a841838d..040942c565 100644 --- a/lib/chats/item/tabs/item/teams_app/teams_app_request_builder.rb +++ b/lib/chats/item/tabs/item/teams_app/teams_app_request_builder.rb @@ -25,10 +25,10 @@ class TeamsAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/tabs/{teamsTab%2Did}/teamsApp{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/tabs/{teamsTab%2Did}/teamsApp{?%24expand,%24select}") end ## - ## The application that is linked to the tab. This cannot be changed after tab creation. + ## The application that is linked to the tab. This can't be changed after tab creation. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of teams_app ## @@ -37,31 +37,39 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TeamsApp.create_from_discriminator_value(pn) }, error_mapping) end ## - ## The application that is linked to the tab. This cannot be changed after tab creation. + ## The application that is linked to the tab. This can't be changed after tab creation. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a teams_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TeamsAppRequestBuilder.new(raw_url, @request_adapter) + end ## - # The application that is linked to the tab. This cannot be changed after tab creation. + # The application that is linked to the tab. This can't be changed after tab creation. class TeamsAppRequestBuilderGetQueryParameters ## diff --git a/lib/chats/item/tabs/item/teams_tab_item_request_builder.rb b/lib/chats/item/tabs/item/teams_tab_item_request_builder.rb index a21bd4a73c..c019013d70 100644 --- a/lib/chats/item/tabs/item/teams_tab_item_request_builder.rb +++ b/lib/chats/item/tabs/item/teams_tab_item_request_builder.rb @@ -29,7 +29,7 @@ def teams_app() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/tabs/{teamsTab%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/tabs/{teamsTab%2Did}{?%24expand,%24select}") end ## ## Remove (unpin) a tab from the specified chat. @@ -41,8 +41,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -55,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TeamsTab.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -71,8 +69,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TeamsTab.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -82,13 +79,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -98,15 +96,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -118,17 +116,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a teams_tab_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TeamsTabItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve the properties and relationships of the specified tab in a chat. diff --git a/lib/chats/item/tabs/tabs_request_builder.rb b/lib/chats/item/tabs/tabs_request_builder.rb index e9660b0dda..f71aae58bc 100644 --- a/lib/chats/item/tabs/tabs_request_builder.rb +++ b/lib/chats/item/tabs/tabs_request_builder.rb @@ -40,7 +40,7 @@ def by_teams_tab_id(teams_tab_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/tabs{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}/tabs{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Retrieve the list of tabs in the specified chat. @@ -52,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TeamsTabCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -68,8 +67,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TeamsTab.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -79,15 +77,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -99,17 +97,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a tabs_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TabsRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve the list of tabs in the specified chat. diff --git a/lib/chats/item/unhide_for_user/unhide_for_user_post_request_body.rb b/lib/chats/item/unhide_for_user/unhide_for_user_post_request_body.rb index 913732936d..67fabe86eb 100644 --- a/lib/chats/item/unhide_for_user/unhide_for_user_post_request_body.rb +++ b/lib/chats/item/unhide_for_user/unhide_for_user_post_request_body.rb @@ -18,22 +18,22 @@ class UnhideForUserPostRequestBody # The user property @user ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new unhideForUserPostRequestBody and sets the default values. + ## Instantiates a new UnhideForUserPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/chats/item/unhide_for_user/unhide_for_user_request_builder.rb b/lib/chats/item/unhide_for_user/unhide_for_user_request_builder.rb index 5d24d7704e..d74164cee5 100644 --- a/lib/chats/item/unhide_for_user/unhide_for_user_request_builder.rb +++ b/lib/chats/item/unhide_for_user/unhide_for_user_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a unhide_for_user_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UnhideForUserRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/call_records/call_records_request_builder.rb b/lib/communications/call_records/call_records_request_builder.rb index d61377cdc9..a6a2671542 100644 --- a/lib/communications/call_records/call_records_request_builder.rb +++ b/lib/communications/call_records/call_records_request_builder.rb @@ -41,10 +41,10 @@ def by_call_record_id(call_record_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Retrieve the properties and relationships of a callRecord object. There are two ways to get the id of a callRecord: You can use the $expand query parameter to optionally include session and segment details, as shown in the Get full details example. When you expand session details, the maximum page size is 60 sessions. + ## Get the list of callRecord objects and their properties. The results can be optionally filtered using the $filter query parameter on the startDateTime and participant id properties. Note that the listed call records don't include expandable relationships such as sessions and participants_v2. You can expand these relationships using Get callRecord for a specific record. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of call_records_call_record_collection_response ## @@ -53,8 +53,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallRecordsCallRecordCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -91,26 +90,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallRecordsCallRecord.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Retrieve the properties and relationships of a callRecord object. There are two ways to get the id of a callRecord: You can use the $expand query parameter to optionally include session and segment details, as shown in the Get full details example. When you expand session details, the maximum page size is 60 sessions. + ## Get the list of callRecord objects and their properties. The results can be optionally filtered using the $filter query parameter on the startDateTime and participant id properties. Note that the listed call records don't include expandable relationships such as sessions and participants_v2. You can expand these relationships using Get callRecord for a specific record. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -122,20 +120,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a call_records_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CallRecordsRequestBuilder.new(raw_url, @request_adapter) + end ## - # Retrieve the properties and relationships of a callRecord object. There are two ways to get the id of a callRecord: You can use the $expand query parameter to optionally include session and segment details, as shown in the Get full details example. When you expand session details, the maximum page size is 60 sessions. + # Get the list of callRecord objects and their properties. The results can be optionally filtered using the $filter query parameter on the startDateTime and participant id properties. Note that the listed call records don't include expandable relationships such as sessions and participants_v2. You can expand these relationships using Get callRecord for a specific record. class CallRecordsRequestBuilderGetQueryParameters ## diff --git a/lib/communications/call_records/count/count_request_builder.rb b/lib/communications/call_records/count/count_request_builder.rb index b5c2824d98..9e9e6bfde5 100644 --- a/lib/communications/call_records/count/count_request_builder.rb +++ b/lib/communications/call_records/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/communications/call_records/item/call_record_item_request_builder.rb b/lib/communications/call_records/item/call_record_item_request_builder.rb index 909cfceb9f..29b14be3ff 100644 --- a/lib/communications/call_records/item/call_record_item_request_builder.rb +++ b/lib/communications/call_records/item/call_record_item_request_builder.rb @@ -5,6 +5,8 @@ require_relative '../../communications' require_relative '../call_records' require_relative './item' +require_relative './organizer_v2/organizer_v2_request_builder' +require_relative './participants_v2/participants_v2_request_builder' require_relative './sessions/sessions_request_builder' module MicrosoftGraph @@ -15,6 +17,16 @@ module Item # Provides operations to manage the callRecords property of the microsoft.graph.cloudCommunications entity. class CallRecordItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + ## + # Provides operations to manage the organizer_v2 property of the microsoft.graph.callRecords.callRecord entity. + def organizer_v2() + return MicrosoftGraph::Communications::CallRecords::Item::Organizer_v2::OrganizerV2RequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the participants_v2 property of the microsoft.graph.callRecords.callRecord entity. + def participants_v2() + return MicrosoftGraph::Communications::CallRecords::Item::Participants_v2::ParticipantsV2RequestBuilder.new(@path_parameters, @request_adapter) + end ## # Provides operations to manage the sessions property of the microsoft.graph.callRecords.callRecord entity. def sessions() @@ -27,7 +39,7 @@ def sessions() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords/{callRecord%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords/{callRecord%2Did}{?%24expand,%24select}") end ## ## Delete navigation property callRecords for communications @@ -39,12 +51,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Retrieve the properties and relationships of a callRecord object. There are two ways to get the id of a callRecord: You can use the $expand query parameter to optionally include session and segment details, as shown in the Get full details example. When you expand session details, the maximum page size is 60 sessions. + ## Retrieve the properties and relationships of a callRecord object. You can get the id of a callRecord in two ways:* Subscribe to change notifications to the /communications/callRecords endpoint.* Use the callChainId property of a call. The call record is available only after the associated call is completed. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of call_records_call_record ## @@ -53,8 +64,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallRecordsCallRecord.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -69,8 +79,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallRecordsCallRecord.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -80,31 +89,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Retrieve the properties and relationships of a callRecord object. There are two ways to get the id of a callRecord: You can use the $expand query parameter to optionally include session and segment details, as shown in the Get full details example. When you expand session details, the maximum page size is 60 sessions. + ## Retrieve the properties and relationships of a callRecord object. You can get the id of a callRecord in two ways:* Subscribe to change notifications to the /communications/callRecords endpoint.* Use the callChainId property of a call. The call record is available only after the associated call is completed. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -116,20 +126,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a call_record_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CallRecordItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Retrieve the properties and relationships of a callRecord object. There are two ways to get the id of a callRecord: You can use the $expand query parameter to optionally include session and segment details, as shown in the Get full details example. When you expand session details, the maximum page size is 60 sessions. + # Retrieve the properties and relationships of a callRecord object. You can get the id of a callRecord in two ways:* Subscribe to change notifications to the /communications/callRecords endpoint.* Use the callChainId property of a call. The call record is available only after the associated call is completed. class CallRecordItemRequestBuilderGetQueryParameters ## diff --git a/lib/groups/item/calendar/calendar_view/item/instances/count/count.rb b/lib/communications/call_records/item/organizer_v2/organizer_v2.rb similarity index 100% rename from lib/groups/item/calendar/calendar_view/item/instances/count/count.rb rename to lib/communications/call_records/item/organizer_v2/organizer_v2.rb diff --git a/lib/communications/call_records/item/organizer_v2/organizer_v2_request_builder.rb b/lib/communications/call_records/item/organizer_v2/organizer_v2_request_builder.rb new file mode 100644 index 0000000000..d69ce77431 --- /dev/null +++ b/lib/communications/call_records/item/organizer_v2/organizer_v2_request_builder.rb @@ -0,0 +1,166 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/call_records_organizer' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../communications' +require_relative '../../call_records' +require_relative '../item' +require_relative './organizer_v2' + +module MicrosoftGraph + module Communications + module CallRecords + module Item + module Organizer_v2 + ## + # Provides operations to manage the organizer_v2 property of the microsoft.graph.callRecords.callRecord entity. + class OrganizerV2RequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new OrganizerV2RequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords/{callRecord%2Did}/organizer_v2{?%24expand,%24select}") + end + ## + ## Delete navigation property organizer_v2 for communications + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Identity of the organizer of the call. This relationship is expanded by default in callRecord methods. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of call_records_organizer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallRecordsOrganizer.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property organizer_v2 in communications + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of call_records_organizer + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallRecordsOrganizer.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property organizer_v2 for communications + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Identity of the organizer of the call. This relationship is expanded by default in callRecord methods. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property organizer_v2 in communications + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a organizer_v2_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return OrganizerV2RequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Identity of the organizer of the call. This relationship is expanded by default in callRecord methods. + class OrganizerV2RequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar/calendar_view/item/instances/item/attachments/count/count.rb b/lib/communications/call_records/item/participants_v2/count/count.rb similarity index 100% rename from lib/groups/item/calendar/calendar_view/item/instances/item/attachments/count/count.rb rename to lib/communications/call_records/item/participants_v2/count/count.rb diff --git a/lib/communications/call_records/item/participants_v2/count/count_request_builder.rb b/lib/communications/call_records/item/participants_v2/count/count_request_builder.rb new file mode 100644 index 0000000000..e468073132 --- /dev/null +++ b/lib/communications/call_records/item/participants_v2/count/count_request_builder.rb @@ -0,0 +1,103 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../communications' +require_relative '../../../call_records' +require_relative '../../item' +require_relative '../participants_v2' +require_relative './count' + +module MicrosoftGraph + module Communications + module CallRecords + module Item + module Participants_v2 + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords/{callRecord%2Did}/participants_v2/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar/calendar_view/item/instances/item/attachments/item/item.rb b/lib/communications/call_records/item/participants_v2/item/item.rb similarity index 100% rename from lib/groups/item/calendar/calendar_view/item/instances/item/attachments/item/item.rb rename to lib/communications/call_records/item/participants_v2/item/item.rb diff --git a/lib/communications/call_records/item/participants_v2/item/participant_item_request_builder.rb b/lib/communications/call_records/item/participants_v2/item/participant_item_request_builder.rb new file mode 100644 index 0000000000..eae5d0cefc --- /dev/null +++ b/lib/communications/call_records/item/participants_v2/item/participant_item_request_builder.rb @@ -0,0 +1,169 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/call_records_participant' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../communications' +require_relative '../../../call_records' +require_relative '../../item' +require_relative '../participants_v2' +require_relative './item' + +module MicrosoftGraph + module Communications + module CallRecords + module Item + module Participants_v2 + module Item + ## + # Provides operations to manage the participants_v2 property of the microsoft.graph.callRecords.callRecord entity. + class ParticipantItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new ParticipantItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords/{callRecord%2Did}/participants_v2/{participant%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property participants_v2 for communications + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## List of distinct participants in the call. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of call_records_participant + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallRecordsParticipant.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property participants_v2 in communications + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of call_records_participant + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallRecordsParticipant.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property participants_v2 for communications + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## List of distinct participants in the call. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property participants_v2 in communications + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a participant_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ParticipantItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # List of distinct participants in the call. + class ParticipantItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar/calendar_view/item/instances/instances.rb b/lib/communications/call_records/item/participants_v2/participants_v2.rb similarity index 100% rename from lib/groups/item/calendar/calendar_view/item/instances/instances.rb rename to lib/communications/call_records/item/participants_v2/participants_v2.rb diff --git a/lib/communications/call_records/item/participants_v2/participants_v2_request_builder.rb b/lib/communications/call_records/item/participants_v2/participants_v2_request_builder.rb new file mode 100644 index 0000000000..497df3101f --- /dev/null +++ b/lib/communications/call_records/item/participants_v2/participants_v2_request_builder.rb @@ -0,0 +1,185 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/call_records_participant' +require_relative '../../../../models/call_records_participant_collection_response' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../communications' +require_relative '../../call_records' +require_relative '../item' +require_relative './count/count_request_builder' +require_relative './item/participant_item_request_builder' +require_relative './participants_v2' + +module MicrosoftGraph + module Communications + module CallRecords + module Item + module Participants_v2 + ## + # Provides operations to manage the participants_v2 property of the microsoft.graph.callRecords.callRecord entity. + class ParticipantsV2RequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::Communications::CallRecords::Item::Participants_v2::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the participants_v2 property of the microsoft.graph.callRecords.callRecord entity. + ## @param participant_id The unique identifier of participant + ## @return a participant_item_request_builder + ## + def by_participant_id(participant_id) + raise StandardError, 'participant_id cannot be null' if participant_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["participant%2Did"] = participant_id + return MicrosoftGraph::Communications::CallRecords::Item::Participants_v2::Item::ParticipantItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new ParticipantsV2RequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords/{callRecord%2Did}/participants_v2{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Get the list of participant objects associated with a callRecord. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of call_records_participant_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallRecordsParticipantCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to participants_v2 for communications + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of call_records_participant + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallRecordsParticipant.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the list of participant objects associated with a callRecord. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to participants_v2 for communications + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a participants_v2_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ParticipantsV2RequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the list of participant objects associated with a callRecord. + class ParticipantsV2RequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/communications/call_records/item/sessions/count/count_request_builder.rb b/lib/communications/call_records/item/sessions/count/count_request_builder.rb index ab74779d9a..a291c9a036 100644 --- a/lib/communications/call_records/item/sessions/count/count_request_builder.rb +++ b/lib/communications/call_records/item/sessions/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords/{callRecord%2Did}/sessions/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords/{callRecord%2Did}/sessions/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/communications/call_records/item/sessions/item/segments/count/count_request_builder.rb b/lib/communications/call_records/item/sessions/item/segments/count/count_request_builder.rb index 6db11d748a..e71c3f87a1 100644 --- a/lib/communications/call_records/item/sessions/item/segments/count/count_request_builder.rb +++ b/lib/communications/call_records/item/sessions/item/segments/count/count_request_builder.rb @@ -28,7 +28,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords/{callRecord%2Did}/sessions/{session%2Did}/segments/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords/{callRecord%2Did}/sessions/{session%2Did}/segments/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -40,8 +40,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -51,17 +50,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/communications/call_records/item/sessions/item/segments/item/segment_item_request_builder.rb b/lib/communications/call_records/item/sessions/item/segments/item/segment_item_request_builder.rb index 0dee32be30..2e294dd7de 100644 --- a/lib/communications/call_records/item/sessions/item/segments/item/segment_item_request_builder.rb +++ b/lib/communications/call_records/item/sessions/item/segments/item/segment_item_request_builder.rb @@ -29,7 +29,7 @@ class SegmentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords/{callRecord%2Did}/sessions/{session%2Did}/segments/{segment%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords/{callRecord%2Did}/sessions/{session%2Did}/segments/{segment%2Did}{?%24expand,%24select}") end ## ## Delete navigation property segments for communications @@ -41,8 +41,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -55,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallRecordsSegment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -71,8 +69,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallRecordsSegment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -82,13 +79,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -98,15 +96,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -118,17 +116,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a segment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SegmentItemRequestBuilder.new(raw_url, @request_adapter) + end ## # The list of segments involved in the session. Read-only. Nullable. diff --git a/lib/communications/call_records/item/sessions/item/segments/segments_request_builder.rb b/lib/communications/call_records/item/sessions/item/segments/segments_request_builder.rb index 9bc6387a83..f3453ff2e7 100644 --- a/lib/communications/call_records/item/sessions/item/segments/segments_request_builder.rb +++ b/lib/communications/call_records/item/sessions/item/segments/segments_request_builder.rb @@ -46,7 +46,7 @@ def by_segment_id(segment_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords/{callRecord%2Did}/sessions/{session%2Did}/segments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords/{callRecord%2Did}/sessions/{session%2Did}/segments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## The list of segments involved in the session. Read-only. Nullable. @@ -58,8 +58,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallRecordsSegmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,8 +73,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallRecordsSegment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -85,15 +83,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -105,17 +103,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a segments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SegmentsRequestBuilder.new(raw_url, @request_adapter) + end ## # The list of segments involved in the session. Read-only. Nullable. diff --git a/lib/communications/call_records/item/sessions/item/session_item_request_builder.rb b/lib/communications/call_records/item/sessions/item/session_item_request_builder.rb index 8e9278d64b..1aaaa8626b 100644 --- a/lib/communications/call_records/item/sessions/item/session_item_request_builder.rb +++ b/lib/communications/call_records/item/sessions/item/session_item_request_builder.rb @@ -31,7 +31,7 @@ def segments() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords/{callRecord%2Did}/sessions/{session%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords/{callRecord%2Did}/sessions/{session%2Did}{?%24expand,%24select}") end ## ## Delete navigation property sessions for communications @@ -43,8 +43,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -57,8 +56,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallRecordsSession.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -73,8 +71,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallRecordsSession.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -84,13 +81,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -100,15 +98,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -120,17 +118,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a session_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SessionItemRequestBuilder.new(raw_url, @request_adapter) + end ## # List of sessions involved in the call. Peer-to-peer calls typically only have one session, whereas group calls typically have at least one session per participant. Read-only. Nullable. diff --git a/lib/communications/call_records/item/sessions/sessions_request_builder.rb b/lib/communications/call_records/item/sessions/sessions_request_builder.rb index 5d45f7a03e..1819d6cf2e 100644 --- a/lib/communications/call_records/item/sessions/sessions_request_builder.rb +++ b/lib/communications/call_records/item/sessions/sessions_request_builder.rb @@ -42,7 +42,7 @@ def by_session_id(session_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords/{callRecord%2Did}/sessions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords/{callRecord%2Did}/sessions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Retrieve the list of sessions associated with a callRecord object. If the sessions list is truncated, a sessions@odata.nextLink value will be provided to retrieve the next page of sessions. The maximum page size for sessions is 60 entries. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallRecordsSessionCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallRecordsSession.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a sessions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SessionsRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve the list of sessions associated with a callRecord object. If the sessions list is truncated, a sessions@odata.nextLink value will be provided to retrieve the next page of sessions. The maximum page size for sessions is 60 entries. diff --git a/lib/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/0b4f001d2cd1a7e58f5621cb93199ac931951ed45d61c42860726e4f516f11f4.rb b/lib/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/0b4f001d2cd1a7e58f5621cb93199ac931951ed45d61c42860726e4f516f11f4.rb index 24c05d1aef..dc5a6aa460 100644 --- a/lib/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/0b4f001d2cd1a7e58f5621cb93199ac931951ed45d61c42860726e4f516f11f4.rb +++ b/lib/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/0b4f001d2cd1a7e58f5621cb93199ac931951ed45d61c42860726e4f516f11f4.rb @@ -23,43 +23,51 @@ class MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTi ## @return a void ## def initialize(path_parameters, request_adapter, from_date_time=nil, to_date_time=nil) - super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords/microsoft.graph.callRecords.getDirectRoutingCalls(fromDateTime={fromDateTime},toDateTime={toDateTime}){?%24top,%24skip,%24search,%24filter,%24count}") + super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords/microsoft.graph.callRecords.getDirectRoutingCalls(fromDateTime={fromDateTime},toDateTime={toDateTime}){?%24count,%24filter,%24search,%24skip,%24top}") end ## - ## Invoke function getDirectRoutingCalls + ## Get a log of direct routing calls as a collection of directRoutingLogRow entries. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_direct_routing_calls_with_from_date_time_with_to_date_time_response + ## @return a Fiber of get_direct_routing_calls_with_from_date_time_with_to_date_time_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Communications::CallRecords::MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime::GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Communications::CallRecords::MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime::GetDirectRoutingCallsWithFromDateTimeWithToDateTimeGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Invoke function getDirectRoutingCalls + ## Get a log of direct routing calls as a collection of directRoutingLogRow entries. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder.new(raw_url, @request_adapter) + end ## - # Invoke function getDirectRoutingCalls + # Get a log of direct routing calls as a collection of directRoutingLogRow entries. class MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilderGetQueryParameters ## diff --git a/lib/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/get_direct_routing_calls_with_from_date_time_with_to_date_time_get_response.rb b/lib/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/get_direct_routing_calls_with_from_date_time_with_to_date_time_get_response.rb new file mode 100644 index 0000000000..59e804832e --- /dev/null +++ b/lib/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/get_direct_routing_calls_with_from_date_time_with_to_date_time_get_response.rb @@ -0,0 +1,72 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../../models/call_records_direct_routing_log_row' +require_relative '../../communications' +require_relative '../call_records' +require_relative './microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time' + +module MicrosoftGraph + module Communications + module CallRecords + module MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime + class GetDirectRoutingCallsWithFromDateTimeWithToDateTimeGetResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetDirectRoutingCallsWithFromDateTimeWithToDateTimeGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_direct_routing_calls_with_from_date_time_with_to_date_time_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetDirectRoutingCallsWithFromDateTimeWithToDateTimeGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::CallRecordsDirectRoutingLogRow.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a call_records_direct_routing_log_row + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/get_direct_routing_calls_with_from_date_time_with_to_date_time_response.rb b/lib/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/get_direct_routing_calls_with_from_date_time_with_to_date_time_response.rb deleted file mode 100644 index e3d8ccb4c7..0000000000 --- a/lib/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/get_direct_routing_calls_with_from_date_time_with_to_date_time_response.rb +++ /dev/null @@ -1,72 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../../models/call_records_direct_routing_log_row' -require_relative '../../communications' -require_relative '../call_records' -require_relative './microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time' - -module MicrosoftGraph - module Communications - module CallRecords - module MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime - class GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_direct_routing_calls_with_from_date_time_with_to_date_time_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::CallRecordsDirectRoutingLogRow.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a call_records_direct_routing_log_row - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time.rb b/lib/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time.rb index 01c8231928..723923446a 100644 --- a/lib/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time.rb +++ b/lib/communications/call_records/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time/microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time.rb @@ -1 +1 @@ -require_relative 'get_direct_routing_calls_with_from_date_time_with_to_date_time_response' +require_relative 'get_direct_routing_calls_with_from_date_time_with_to_date_time_get_response' diff --git a/lib/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/2ff200d164cec84baf5b570e76631427bf3cd3168578fa5068b156783f678b22.rb b/lib/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/2ff200d164cec84baf5b570e76631427bf3cd3168578fa5068b156783f678b22.rb index 3564b04229..153dc69bf7 100644 --- a/lib/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/2ff200d164cec84baf5b570e76631427bf3cd3168578fa5068b156783f678b22.rb +++ b/lib/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/2ff200d164cec84baf5b570e76631427bf3cd3168578fa5068b156783f678b22.rb @@ -23,43 +23,51 @@ class MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequest ## @return a void ## def initialize(path_parameters, request_adapter, from_date_time=nil, to_date_time=nil) - super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords/microsoft.graph.callRecords.getPstnCalls(fromDateTime={fromDateTime},toDateTime={toDateTime}){?%24top,%24skip,%24search,%24filter,%24count}") + super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords/microsoft.graph.callRecords.getPstnCalls(fromDateTime={fromDateTime},toDateTime={toDateTime}){?%24count,%24filter,%24search,%24skip,%24top}") end ## - ## Invoke function getPstnCalls + ## Get a log of PSTN calls as a collection of pstnCallLogRow entries. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_pstn_calls_with_from_date_time_with_to_date_time_response + ## @return a Fiber of get_pstn_calls_with_from_date_time_with_to_date_time_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Communications::CallRecords::MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime::GetPstnCallsWithFromDateTimeWithToDateTimeResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Communications::CallRecords::MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime::GetPstnCallsWithFromDateTimeWithToDateTimeGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Invoke function getPstnCalls + ## Get a log of PSTN calls as a collection of pstnCallLogRow entries. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder.new(raw_url, @request_adapter) + end ## - # Invoke function getPstnCalls + # Get a log of PSTN calls as a collection of pstnCallLogRow entries. class MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilderGetQueryParameters ## diff --git a/lib/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/get_pstn_calls_with_from_date_time_with_to_date_time_get_response.rb b/lib/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/get_pstn_calls_with_from_date_time_with_to_date_time_get_response.rb new file mode 100644 index 0000000000..47f32e2681 --- /dev/null +++ b/lib/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/get_pstn_calls_with_from_date_time_with_to_date_time_get_response.rb @@ -0,0 +1,72 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../../models/call_records_pstn_call_log_row' +require_relative '../../communications' +require_relative '../call_records' +require_relative './microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time' + +module MicrosoftGraph + module Communications + module CallRecords + module MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime + class GetPstnCallsWithFromDateTimeWithToDateTimeGetResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetPstnCallsWithFromDateTimeWithToDateTimeGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_pstn_calls_with_from_date_time_with_to_date_time_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetPstnCallsWithFromDateTimeWithToDateTimeGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::CallRecordsPstnCallLogRow.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a call_records_pstn_call_log_row + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/get_pstn_calls_with_from_date_time_with_to_date_time_response.rb b/lib/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/get_pstn_calls_with_from_date_time_with_to_date_time_response.rb deleted file mode 100644 index 6680a80726..0000000000 --- a/lib/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/get_pstn_calls_with_from_date_time_with_to_date_time_response.rb +++ /dev/null @@ -1,72 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../../models/call_records_pstn_call_log_row' -require_relative '../../communications' -require_relative '../call_records' -require_relative './microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time' - -module MicrosoftGraph - module Communications - module CallRecords - module MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime - class GetPstnCallsWithFromDateTimeWithToDateTimeResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getPstnCallsWithFromDateTimeWithToDateTimeResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_pstn_calls_with_from_date_time_with_to_date_time_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetPstnCallsWithFromDateTimeWithToDateTimeResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::CallRecordsPstnCallLogRow.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a call_records_pstn_call_log_row - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time.rb b/lib/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time.rb index 351296f522..fdd686be0d 100644 --- a/lib/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time.rb +++ b/lib/communications/call_records/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time/microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time.rb @@ -1 +1 @@ -require_relative 'get_pstn_calls_with_from_date_time_with_to_date_time_response' +require_relative 'get_pstn_calls_with_from_date_time_with_to_date_time_get_response' diff --git a/lib/communications/calls/calls_request_builder.rb b/lib/communications/calls/calls_request_builder.rb index 21a2640fb3..4b7a08d5a3 100644 --- a/lib/communications/calls/calls_request_builder.rb +++ b/lib/communications/calls/calls_request_builder.rb @@ -44,7 +44,7 @@ def by_call_id(call_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/calls{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/communications/calls{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Retrieve the properties and relationships of a call object. @@ -56,12 +56,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Create call enables your bot to create a new outgoing peer-to-peer or group call, or join an existing meeting. You will need to register the calling bot and go through the list of permissions needed as mentioned below. + ## Create call enables your bot to create a new outgoing peer-to-peer or group call, or join an existing meeting. You need to register the calling bot and go through the list of permissions needed. This API supports the following PSTN scenarios: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of call @@ -72,8 +71,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Call.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -83,19 +81,19 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Create call enables your bot to create a new outgoing peer-to-peer or group call, or join an existing meeting. You will need to register the calling bot and go through the list of permissions needed as mentioned below. + ## Create call enables your bot to create a new outgoing peer-to-peer or group call, or join an existing meeting. You need to register the calling bot and go through the list of permissions needed. This API supports the following PSTN scenarios: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -103,17 +101,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a calls_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CallsRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve the properties and relationships of a call object. diff --git a/lib/communications/calls/count/count_request_builder.rb b/lib/communications/calls/count/count_request_builder.rb index 1753adf9c5..a98211b7a1 100644 --- a/lib/communications/calls/count/count_request_builder.rb +++ b/lib/communications/calls/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/calls/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/communications/calls/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/communications/calls/item/add_large_gallery_view/add_large_gallery_view_post_request_body.rb b/lib/communications/calls/item/add_large_gallery_view/add_large_gallery_view_post_request_body.rb index 33d9f84432..747d5a81ac 100644 --- a/lib/communications/calls/item/add_large_gallery_view/add_large_gallery_view_post_request_body.rb +++ b/lib/communications/calls/item/add_large_gallery_view/add_large_gallery_view_post_request_body.rb @@ -19,15 +19,15 @@ class AddLargeGalleryViewPostRequestBody # The clientContext property @client_context ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -49,7 +49,7 @@ def client_context=(value) @client_context = value end ## - ## Instantiates a new addLargeGalleryViewPostRequestBody and sets the default values. + ## Instantiates a new AddLargeGalleryViewPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/communications/calls/item/add_large_gallery_view/add_large_gallery_view_request_builder.rb b/lib/communications/calls/item/add_large_gallery_view/add_large_gallery_view_request_builder.rb index 5db5a1c134..54f09aa472 100644 --- a/lib/communications/calls/item/add_large_gallery_view/add_large_gallery_view_request_builder.rb +++ b/lib/communications/calls/item/add_large_gallery_view/add_large_gallery_view_request_builder.rb @@ -37,8 +37,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AddLargeGalleryViewOperation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -50,17 +49,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a add_large_gallery_view_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AddLargeGalleryViewRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/calls/item/answer/answer_post_request_body.rb b/lib/communications/calls/item/answer/answer_post_request_body.rb index 9da071b556..a87638d05b 100644 --- a/lib/communications/calls/item/answer/answer_post_request_body.rb +++ b/lib/communications/calls/item/answer/answer_post_request_body.rb @@ -49,15 +49,15 @@ def accepted_modalities=(value) @accepted_modalities = value end ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -94,7 +94,7 @@ def callback_uri=(value) @callback_uri = value end ## - ## Instantiates a new answerPostRequestBody and sets the default values. + ## Instantiates a new AnswerPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/communications/calls/item/answer/answer_request_builder.rb b/lib/communications/calls/item/answer/answer_request_builder.rb index 529d2816fd..fd082941e8 100644 --- a/lib/communications/calls/item/answer/answer_request_builder.rb +++ b/lib/communications/calls/item/answer/answer_request_builder.rb @@ -25,7 +25,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/answer") end ## - ## Enable a bot to answer an incoming call. The incoming call request can be an invite from a participant in a group call or a peer-to-peer call. If an invite to a group call is received, the notification will contain the chatInfo and meetingInfo parameters. The bot is expected to answer, reject, or redirect the call before the call times out. The current timeout value is 15 seconds for regular scenarios, and 5 seconds for policy-based recording scenarios. + ## Enable a bot to answer an incoming call. The incoming call request can be an invitation from a participant in a group call or a peer-to-peer call. If an invitation to a group call is received, the notification contains the chatInfo and meetingInfo parameters. The bot is expected to answer, reject, or redirect the call before the call times out. The current timeout value is 15 seconds for regular scenarios and 5 seconds for policy-based recording scenarios. This API supports the following PSTN scenarios: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void @@ -36,12 +36,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Enable a bot to answer an incoming call. The incoming call request can be an invite from a participant in a group call or a peer-to-peer call. If an invite to a group call is received, the notification will contain the chatInfo and meetingInfo parameters. The bot is expected to answer, reject, or redirect the call before the call times out. The current timeout value is 15 seconds for regular scenarios, and 5 seconds for policy-based recording scenarios. + ## Enable a bot to answer an incoming call. The incoming call request can be an invitation from a participant in a group call or a peer-to-peer call. If an invitation to a group call is received, the notification contains the chatInfo and meetingInfo parameters. The bot is expected to answer, reject, or redirect the call before the call times out. The current timeout value is 15 seconds for regular scenarios and 5 seconds for policy-based recording scenarios. This API supports the following PSTN scenarios: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a answer_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AnswerRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/calls/item/audio_routing_groups/audio_routing_groups_request_builder.rb b/lib/communications/calls/item/audio_routing_groups/audio_routing_groups_request_builder.rb index cd9cf91cba..b5c89a2f39 100644 --- a/lib/communications/calls/item/audio_routing_groups/audio_routing_groups_request_builder.rb +++ b/lib/communications/calls/item/audio_routing_groups/audio_routing_groups_request_builder.rb @@ -42,7 +42,7 @@ def by_audio_routing_group_id(audio_routing_group_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/audioRoutingGroups{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/audioRoutingGroups{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Retrieve a list of audioRoutingGroup objects. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AudioRoutingGroupCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AudioRoutingGroup.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a audio_routing_groups_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AudioRoutingGroupsRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve a list of audioRoutingGroup objects. diff --git a/lib/communications/calls/item/audio_routing_groups/count/count_request_builder.rb b/lib/communications/calls/item/audio_routing_groups/count/count_request_builder.rb index c75840dbce..0a6ef47104 100644 --- a/lib/communications/calls/item/audio_routing_groups/count/count_request_builder.rb +++ b/lib/communications/calls/item/audio_routing_groups/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/audioRoutingGroups/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/audioRoutingGroups/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/communications/calls/item/audio_routing_groups/item/audio_routing_group_item_request_builder.rb b/lib/communications/calls/item/audio_routing_groups/item/audio_routing_group_item_request_builder.rb index b845996698..16c58df6cc 100644 --- a/lib/communications/calls/item/audio_routing_groups/item/audio_routing_group_item_request_builder.rb +++ b/lib/communications/calls/item/audio_routing_groups/item/audio_routing_group_item_request_builder.rb @@ -25,7 +25,7 @@ class AudioRoutingGroupItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequ ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/audioRoutingGroups/{audioRoutingGroup%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/audioRoutingGroups/{audioRoutingGroup%2Did}{?%24expand,%24select}") end ## ## Delete the specified audioRoutingGroup. @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AudioRoutingGroup.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AudioRoutingGroup.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a audio_routing_group_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AudioRoutingGroupItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve the properties and relationships of an audioRoutingGroup object. diff --git a/lib/communications/calls/item/call_item_request_builder.rb b/lib/communications/calls/item/call_item_request_builder.rb index 2837d58471..b2e52447a2 100644 --- a/lib/communications/calls/item/call_item_request_builder.rb +++ b/lib/communications/calls/item/call_item_request_builder.rb @@ -19,6 +19,7 @@ require_relative './record_response/record_response_request_builder' require_relative './redirect/redirect_request_builder' require_relative './reject/reject_request_builder' +require_relative './send_dtmf_tones/send_dtmf_tones_request_builder' require_relative './subscribe_to_tone/subscribe_to_tone_request_builder' require_relative './transfer/transfer_request_builder' require_relative './unmute/unmute_request_builder' @@ -103,6 +104,11 @@ def reject() return MicrosoftGraph::Communications::Calls::Item::Reject::RejectRequestBuilder.new(@path_parameters, @request_adapter) end ## + # Provides operations to call the sendDtmfTones method. + def send_dtmf_tones() + return MicrosoftGraph::Communications::Calls::Item::SendDtmfTones::SendDtmfTonesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## # Provides operations to call the subscribeToTone method. def subscribe_to_tone() return MicrosoftGraph::Communications::Calls::Item::SubscribeToTone::SubscribeToToneRequestBuilder.new(@path_parameters, @request_adapter) @@ -129,7 +135,7 @@ def update_recording_status() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}{?%24expand,%24select}") end ## ## Delete or hang up an active call. For group calls, this will only delete your call leg and the underlying group call will still continue. @@ -141,8 +147,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -155,8 +160,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Call.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -171,8 +175,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Call.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -182,13 +185,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -198,15 +202,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -218,17 +222,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a call_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CallItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve the properties and relationships of a call object. diff --git a/lib/communications/calls/item/cancel_media_processing/cancel_media_processing_post_request_body.rb b/lib/communications/calls/item/cancel_media_processing/cancel_media_processing_post_request_body.rb index faa243313b..10995f5f4c 100644 --- a/lib/communications/calls/item/cancel_media_processing/cancel_media_processing_post_request_body.rb +++ b/lib/communications/calls/item/cancel_media_processing/cancel_media_processing_post_request_body.rb @@ -19,15 +19,15 @@ class CancelMediaProcessingPostRequestBody # The clientContext property @client_context ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -49,7 +49,7 @@ def client_context=(value) @client_context = value end ## - ## Instantiates a new cancelMediaProcessingPostRequestBody and sets the default values. + ## Instantiates a new CancelMediaProcessingPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/communications/calls/item/cancel_media_processing/cancel_media_processing_request_builder.rb b/lib/communications/calls/item/cancel_media_processing/cancel_media_processing_request_builder.rb index 1805d7da53..4009b2671c 100644 --- a/lib/communications/calls/item/cancel_media_processing/cancel_media_processing_request_builder.rb +++ b/lib/communications/calls/item/cancel_media_processing/cancel_media_processing_request_builder.rb @@ -37,8 +37,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CancelMediaProcessingOperation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -50,17 +49,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a cancel_media_processing_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CancelMediaProcessingRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/calls/item/change_screen_sharing_role/change_screen_sharing_role_post_request_body.rb b/lib/communications/calls/item/change_screen_sharing_role/change_screen_sharing_role_post_request_body.rb index 5fe83dba32..e0bbfdfa46 100644 --- a/lib/communications/calls/item/change_screen_sharing_role/change_screen_sharing_role_post_request_body.rb +++ b/lib/communications/calls/item/change_screen_sharing_role/change_screen_sharing_role_post_request_body.rb @@ -20,22 +20,22 @@ class ChangeScreenSharingRolePostRequestBody # The role property @role ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new changeScreenSharingRolePostRequestBody and sets the default values. + ## Instantiates a new ChangeScreenSharingRolePostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/communications/calls/item/change_screen_sharing_role/change_screen_sharing_role_request_builder.rb b/lib/communications/calls/item/change_screen_sharing_role/change_screen_sharing_role_request_builder.rb index 52510824d3..1d6216967e 100644 --- a/lib/communications/calls/item/change_screen_sharing_role/change_screen_sharing_role_request_builder.rb +++ b/lib/communications/calls/item/change_screen_sharing_role/change_screen_sharing_role_request_builder.rb @@ -36,8 +36,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a change_screen_sharing_role_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ChangeScreenSharingRoleRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/calls/item/content_sharing_sessions/content_sharing_sessions_request_builder.rb b/lib/communications/calls/item/content_sharing_sessions/content_sharing_sessions_request_builder.rb index b026d52f66..3a216163dd 100644 --- a/lib/communications/calls/item/content_sharing_sessions/content_sharing_sessions_request_builder.rb +++ b/lib/communications/calls/item/content_sharing_sessions/content_sharing_sessions_request_builder.rb @@ -42,7 +42,7 @@ def by_content_sharing_session_id(content_sharing_session_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/contentSharingSessions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/contentSharingSessions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Retrieve a list of contentSharingSession objects in a call. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ContentSharingSessionCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ContentSharingSession.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a content_sharing_sessions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContentSharingSessionsRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve a list of contentSharingSession objects in a call. diff --git a/lib/communications/calls/item/content_sharing_sessions/count/count_request_builder.rb b/lib/communications/calls/item/content_sharing_sessions/count/count_request_builder.rb index d71ae3e480..e0dcf1aea5 100644 --- a/lib/communications/calls/item/content_sharing_sessions/count/count_request_builder.rb +++ b/lib/communications/calls/item/content_sharing_sessions/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/contentSharingSessions/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/contentSharingSessions/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/communications/calls/item/content_sharing_sessions/item/content_sharing_session_item_request_builder.rb b/lib/communications/calls/item/content_sharing_sessions/item/content_sharing_session_item_request_builder.rb index 3558c54de6..d4b3a7d5e7 100644 --- a/lib/communications/calls/item/content_sharing_sessions/item/content_sharing_session_item_request_builder.rb +++ b/lib/communications/calls/item/content_sharing_sessions/item/content_sharing_session_item_request_builder.rb @@ -25,7 +25,7 @@ class ContentSharingSessionItemRequestBuilder < MicrosoftKiotaAbstractions::Base ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/contentSharingSessions/{contentSharingSession%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/contentSharingSessions/{contentSharingSession%2Did}{?%24expand,%24select}") end ## ## Delete navigation property contentSharingSessions for communications @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ContentSharingSession.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ContentSharingSession.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a content_sharing_session_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContentSharingSessionItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve the properties of a contentSharingSession object in a call. diff --git a/lib/communications/calls/item/keep_alive/keep_alive_request_builder.rb b/lib/communications/calls/item/keep_alive/keep_alive_request_builder.rb index 2c23ed5b60..8cedcadff9 100644 --- a/lib/communications/calls/item/keep_alive/keep_alive_request_builder.rb +++ b/lib/communications/calls/item/keep_alive/keep_alive_request_builder.rb @@ -34,8 +34,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,15 +44,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a keep_alive_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return KeepAliveRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/calls/item/mute/mute_post_request_body.rb b/lib/communications/calls/item/mute/mute_post_request_body.rb index 077c48ffb6..03f7276551 100644 --- a/lib/communications/calls/item/mute/mute_post_request_body.rb +++ b/lib/communications/calls/item/mute/mute_post_request_body.rb @@ -19,15 +19,15 @@ class MutePostRequestBody # The clientContext property @client_context ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -49,7 +49,7 @@ def client_context=(value) @client_context = value end ## - ## Instantiates a new mutePostRequestBody and sets the default values. + ## Instantiates a new MutePostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/communications/calls/item/mute/mute_request_builder.rb b/lib/communications/calls/item/mute/mute_request_builder.rb index 73d4337d5d..41403ce4b9 100644 --- a/lib/communications/calls/item/mute/mute_request_builder.rb +++ b/lib/communications/calls/item/mute/mute_request_builder.rb @@ -37,8 +37,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MuteParticipantOperation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -50,17 +49,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mute_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MuteRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/calls/item/operations/count/count_request_builder.rb b/lib/communications/calls/item/operations/count/count_request_builder.rb index 0c0f0c0440..75f173dafc 100644 --- a/lib/communications/calls/item/operations/count/count_request_builder.rb +++ b/lib/communications/calls/item/operations/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/operations/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/operations/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/communications/calls/item/operations/item/comms_operation_item_request_builder.rb b/lib/communications/calls/item/operations/item/comms_operation_item_request_builder.rb index b7a3242c88..ce63d6f9a4 100644 --- a/lib/communications/calls/item/operations/item/comms_operation_item_request_builder.rb +++ b/lib/communications/calls/item/operations/item/comms_operation_item_request_builder.rb @@ -25,7 +25,7 @@ class CommsOperationItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequest ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/operations/{commsOperation%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/operations/{commsOperation%2Did}{?%24expand,%24select}") end ## ## Delete navigation property operations for communications @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CommsOperation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CommsOperation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a comms_operation_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CommsOperationItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the status of an operation that adds the large gallery view to a call. diff --git a/lib/communications/calls/item/operations/operations_request_builder.rb b/lib/communications/calls/item/operations/operations_request_builder.rb index 546e9a195c..e4a54842d7 100644 --- a/lib/communications/calls/item/operations/operations_request_builder.rb +++ b/lib/communications/calls/item/operations/operations_request_builder.rb @@ -42,7 +42,7 @@ def by_comms_operation_id(comms_operation_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/operations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/operations{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the status of an operation that adds the large gallery view to a call. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CommsOperationCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CommsOperation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a operations_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return OperationsRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the status of an operation that adds the large gallery view to a call. diff --git a/lib/communications/calls/item/participants/count/count_request_builder.rb b/lib/communications/calls/item/participants/count/count_request_builder.rb index 3645669481..fa9570ddac 100644 --- a/lib/communications/calls/item/participants/count/count_request_builder.rb +++ b/lib/communications/calls/item/participants/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/participants/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/participants/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/communications/calls/item/participants/invite/invite_post_request_body.rb b/lib/communications/calls/item/participants/invite/invite_post_request_body.rb index 798632dd38..d8065bd7e9 100644 --- a/lib/communications/calls/item/participants/invite/invite_post_request_body.rb +++ b/lib/communications/calls/item/participants/invite/invite_post_request_body.rb @@ -25,15 +25,15 @@ class InvitePostRequestBody # The participants property @participants ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -55,7 +55,7 @@ def client_context=(value) @client_context = value end ## - ## Instantiates a new invitePostRequestBody and sets the default values. + ## Instantiates a new InvitePostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/communications/calls/item/participants/invite/invite_request_builder.rb b/lib/communications/calls/item/participants/invite/invite_request_builder.rb index be949ad4a6..f8b7c3cefa 100644 --- a/lib/communications/calls/item/participants/invite/invite_request_builder.rb +++ b/lib/communications/calls/item/participants/invite/invite_request_builder.rb @@ -28,7 +28,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/participants/invite") end ## - ## Delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled. + ## Invite participants to the active call. For more information about how to handle operations, see commsOperation. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of invite_participants_operation @@ -39,12 +39,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::InviteParticipantsOperation.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled. + ## Invite participants to the active call. For more information about how to handle operations, see commsOperation. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -52,17 +51,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a invite_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return InviteRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/calls/item/participants/item/mute/mute_post_request_body.rb b/lib/communications/calls/item/participants/item/mute/mute_post_request_body.rb index 45cc881b64..7d9c2c5e9b 100644 --- a/lib/communications/calls/item/participants/item/mute/mute_post_request_body.rb +++ b/lib/communications/calls/item/participants/item/mute/mute_post_request_body.rb @@ -23,15 +23,15 @@ class MutePostRequestBody # The clientContext property @client_context ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -53,7 +53,7 @@ def client_context=(value) @client_context = value end ## - ## Instantiates a new mutePostRequestBody and sets the default values. + ## Instantiates a new MutePostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/communications/calls/item/participants/item/mute/mute_request_builder.rb b/lib/communications/calls/item/participants/item/mute/mute_request_builder.rb index 1fc309e433..57312ca8ee 100644 --- a/lib/communications/calls/item/participants/item/mute/mute_request_builder.rb +++ b/lib/communications/calls/item/participants/item/mute/mute_request_builder.rb @@ -41,8 +41,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MuteParticipantOperation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -54,17 +53,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mute_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MuteRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/calls/item/participants/item/participant_item_request_builder.rb b/lib/communications/calls/item/participants/item/participant_item_request_builder.rb index ef4f805d44..3958b4faad 100644 --- a/lib/communications/calls/item/participants/item/participant_item_request_builder.rb +++ b/lib/communications/calls/item/participants/item/participant_item_request_builder.rb @@ -43,7 +43,7 @@ def stop_hold_music() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/participants/{participant%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/participants/{participant%2Did}{?%24expand,%24select}") end ## ## Delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled. @@ -55,8 +55,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -69,8 +68,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Participant.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -85,8 +83,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Participant.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -96,13 +93,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,15 +110,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -132,17 +130,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a participant_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ParticipantItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve the properties and relationships of a participant object. diff --git a/lib/communications/calls/item/participants/item/start_hold_music/start_hold_music_post_request_body.rb b/lib/communications/calls/item/participants/item/start_hold_music/start_hold_music_post_request_body.rb index 1165b598f7..2d9a5ed1cb 100644 --- a/lib/communications/calls/item/participants/item/start_hold_music/start_hold_music_post_request_body.rb +++ b/lib/communications/calls/item/participants/item/start_hold_music/start_hold_music_post_request_body.rb @@ -27,15 +27,15 @@ class StartHoldMusicPostRequestBody # The customPrompt property @custom_prompt ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -57,7 +57,7 @@ def client_context=(value) @client_context = value end ## - ## Instantiates a new startHoldMusicPostRequestBody and sets the default values. + ## Instantiates a new StartHoldMusicPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/communications/calls/item/participants/item/start_hold_music/start_hold_music_request_builder.rb b/lib/communications/calls/item/participants/item/start_hold_music/start_hold_music_request_builder.rb index 796d14bab4..d873b89e23 100644 --- a/lib/communications/calls/item/participants/item/start_hold_music/start_hold_music_request_builder.rb +++ b/lib/communications/calls/item/participants/item/start_hold_music/start_hold_music_request_builder.rb @@ -41,8 +41,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::StartHoldMusicOperation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -54,17 +53,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a start_hold_music_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return StartHoldMusicRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/calls/item/participants/item/stop_hold_music/stop_hold_music_post_request_body.rb b/lib/communications/calls/item/participants/item/stop_hold_music/stop_hold_music_post_request_body.rb index 62cbb6e8f6..8906193104 100644 --- a/lib/communications/calls/item/participants/item/stop_hold_music/stop_hold_music_post_request_body.rb +++ b/lib/communications/calls/item/participants/item/stop_hold_music/stop_hold_music_post_request_body.rb @@ -23,15 +23,15 @@ class StopHoldMusicPostRequestBody # The clientContext property @client_context ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -53,7 +53,7 @@ def client_context=(value) @client_context = value end ## - ## Instantiates a new stopHoldMusicPostRequestBody and sets the default values. + ## Instantiates a new StopHoldMusicPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/communications/calls/item/participants/item/stop_hold_music/stop_hold_music_request_builder.rb b/lib/communications/calls/item/participants/item/stop_hold_music/stop_hold_music_request_builder.rb index 763bca387f..f361bdbf46 100644 --- a/lib/communications/calls/item/participants/item/stop_hold_music/stop_hold_music_request_builder.rb +++ b/lib/communications/calls/item/participants/item/stop_hold_music/stop_hold_music_request_builder.rb @@ -41,8 +41,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::StopHoldMusicOperation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -54,17 +53,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a stop_hold_music_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return StopHoldMusicRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/calls/item/participants/participants_request_builder.rb b/lib/communications/calls/item/participants/participants_request_builder.rb index 6a153bd876..43f09819c0 100644 --- a/lib/communications/calls/item/participants/participants_request_builder.rb +++ b/lib/communications/calls/item/participants/participants_request_builder.rb @@ -48,7 +48,7 @@ def by_participant_id(participant_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/participants{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/participants{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Retrieve a list of participant objects in the call. @@ -60,8 +60,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ParticipantCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,8 +75,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Participant.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -87,15 +85,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -107,17 +105,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a participants_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ParticipantsRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve a list of participant objects in the call. diff --git a/lib/communications/calls/item/play_prompt/play_prompt_post_request_body.rb b/lib/communications/calls/item/play_prompt/play_prompt_post_request_body.rb index 5926cfa00b..61455fa5db 100644 --- a/lib/communications/calls/item/play_prompt/play_prompt_post_request_body.rb +++ b/lib/communications/calls/item/play_prompt/play_prompt_post_request_body.rb @@ -23,15 +23,15 @@ class PlayPromptPostRequestBody # The prompts property @prompts ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -53,7 +53,7 @@ def client_context=(value) @client_context = value end ## - ## Instantiates a new playPromptPostRequestBody and sets the default values. + ## Instantiates a new PlayPromptPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/communications/calls/item/play_prompt/play_prompt_request_builder.rb b/lib/communications/calls/item/play_prompt/play_prompt_request_builder.rb index db63bdcf26..ca906cf0e0 100644 --- a/lib/communications/calls/item/play_prompt/play_prompt_request_builder.rb +++ b/lib/communications/calls/item/play_prompt/play_prompt_request_builder.rb @@ -37,8 +37,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::PlayPromptOperation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -50,17 +49,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a play_prompt_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return PlayPromptRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/calls/item/record_response/record_response_post_request_body.rb b/lib/communications/calls/item/record_response/record_response_post_request_body.rb index 2740a09feb..2f538fb802 100644 --- a/lib/communications/calls/item/record_response/record_response_post_request_body.rb +++ b/lib/communications/calls/item/record_response/record_response_post_request_body.rb @@ -41,15 +41,15 @@ class RecordResponsePostRequestBody # The stopTones property @stop_tones ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -86,7 +86,7 @@ def client_context=(value) @client_context = value end ## - ## Instantiates a new recordResponsePostRequestBody and sets the default values. + ## Instantiates a new RecordResponsePostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/communications/calls/item/record_response/record_response_request_builder.rb b/lib/communications/calls/item/record_response/record_response_request_builder.rb index ee1944b45f..bb20381b9c 100644 --- a/lib/communications/calls/item/record_response/record_response_request_builder.rb +++ b/lib/communications/calls/item/record_response/record_response_request_builder.rb @@ -37,8 +37,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::RecordOperation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -50,17 +49,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a record_response_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RecordResponseRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/calls/item/redirect/redirect_post_request_body.rb b/lib/communications/calls/item/redirect/redirect_post_request_body.rb index ad8af631e4..de62af508d 100644 --- a/lib/communications/calls/item/redirect/redirect_post_request_body.rb +++ b/lib/communications/calls/item/redirect/redirect_post_request_body.rb @@ -26,15 +26,15 @@ class RedirectPostRequestBody # The timeout property @timeout ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -56,7 +56,7 @@ def callback_uri=(value) @callback_uri = value end ## - ## Instantiates a new redirectPostRequestBody and sets the default values. + ## Instantiates a new RedirectPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/communications/calls/item/redirect/redirect_request_builder.rb b/lib/communications/calls/item/redirect/redirect_request_builder.rb index 91dc1c6293..f4b6c0a4a2 100644 --- a/lib/communications/calls/item/redirect/redirect_request_builder.rb +++ b/lib/communications/calls/item/redirect/redirect_request_builder.rb @@ -36,8 +36,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a redirect_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RedirectRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/calls/item/reject/reject_post_request_body.rb b/lib/communications/calls/item/reject/reject_post_request_body.rb index a45e81514f..97559f0e0e 100644 --- a/lib/communications/calls/item/reject/reject_post_request_body.rb +++ b/lib/communications/calls/item/reject/reject_post_request_body.rb @@ -23,15 +23,15 @@ class RejectPostRequestBody # The reason property @reason ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -53,7 +53,7 @@ def callback_uri=(value) @callback_uri = value end ## - ## Instantiates a new rejectPostRequestBody and sets the default values. + ## Instantiates a new RejectPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/communications/calls/item/reject/reject_request_builder.rb b/lib/communications/calls/item/reject/reject_request_builder.rb index c0cc84a60b..dc1ba480f4 100644 --- a/lib/communications/calls/item/reject/reject_request_builder.rb +++ b/lib/communications/calls/item/reject/reject_request_builder.rb @@ -36,8 +36,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a reject_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RejectRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/calls/item/send_dtmf_tones/send_dtmf_tones.rb b/lib/communications/calls/item/send_dtmf_tones/send_dtmf_tones.rb new file mode 100644 index 0000000000..a87fd4550f --- /dev/null +++ b/lib/communications/calls/item/send_dtmf_tones/send_dtmf_tones.rb @@ -0,0 +1 @@ +require_relative 'send_dtmf_tones_post_request_body' diff --git a/lib/communications/calls/item/send_dtmf_tones/send_dtmf_tones_post_request_body.rb b/lib/communications/calls/item/send_dtmf_tones/send_dtmf_tones_post_request_body.rb new file mode 100644 index 0000000000..04d8faa74f --- /dev/null +++ b/lib/communications/calls/item/send_dtmf_tones/send_dtmf_tones_post_request_body.rb @@ -0,0 +1,132 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/tone' +require_relative '../../../communications' +require_relative '../../calls' +require_relative '../item' +require_relative './send_dtmf_tones' + +module MicrosoftGraph + module Communications + module Calls + module Item + module SendDtmfTones + class SendDtmfTonesPostRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The clientContext property + @client_context + ## + # The delayBetweenTonesMs property + @delay_between_tones_ms + ## + # The tones property + @tones + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Gets the clientContext property value. The clientContext property + ## @return a string + ## + def client_context + return @client_context + end + ## + ## Sets the clientContext property value. The clientContext property + ## @param value Value to set for the clientContext property. + ## @return a void + ## + def client_context=(value) + @client_context = value + end + ## + ## Instantiates a new SendDtmfTonesPostRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a send_dtmf_tones_post_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return SendDtmfTonesPostRequestBody.new + end + ## + ## Gets the delayBetweenTonesMs property value. The delayBetweenTonesMs property + ## @return a integer + ## + def delay_between_tones_ms + return @delay_between_tones_ms + end + ## + ## Sets the delayBetweenTonesMs property value. The delayBetweenTonesMs property + ## @param value Value to set for the delayBetweenTonesMs property. + ## @return a void + ## + def delay_between_tones_ms=(value) + @delay_between_tones_ms = value + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "clientContext" => lambda {|n| @client_context = n.get_string_value() }, + "delayBetweenTonesMs" => lambda {|n| @delay_between_tones_ms = n.get_number_value() }, + "tones" => lambda {|n| @tones = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Tone.create_from_discriminator_value(pn) }) }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_string_value("clientContext", @client_context) + writer.write_number_value("delayBetweenTonesMs", @delay_between_tones_ms) + writer.write_collection_of_object_values("tones", @tones) + writer.write_additional_data(@additional_data) + end + ## + ## Gets the tones property value. The tones property + ## @return a tone + ## + def tones + return @tones + end + ## + ## Sets the tones property value. The tones property + ## @param value Value to set for the tones property. + ## @return a void + ## + def tones=(value) + @tones = value + end + end + end + end + end + end +end diff --git a/lib/communications/calls/item/send_dtmf_tones/send_dtmf_tones_request_builder.rb b/lib/communications/calls/item/send_dtmf_tones/send_dtmf_tones_request_builder.rb new file mode 100644 index 0000000000..c13a888ab5 --- /dev/null +++ b/lib/communications/calls/item/send_dtmf_tones/send_dtmf_tones_request_builder.rb @@ -0,0 +1,77 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../../models/send_dtmf_tones_operation' +require_relative '../../../communications' +require_relative '../../calls' +require_relative '../item' +require_relative './send_dtmf_tones' + +module MicrosoftGraph + module Communications + module Calls + module Item + module SendDtmfTones + ## + # Provides operations to call the sendDtmfTones method. + class SendDtmfTonesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new SendDtmfTonesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/sendDtmfTones") + end + ## + ## Invoke action sendDtmfTones + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of send_dtmf_tones_operation + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SendDtmfTonesOperation.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Invoke action sendDtmfTones + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a send_dtmf_tones_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SendDtmfTonesRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end +end diff --git a/lib/communications/calls/item/subscribe_to_tone/subscribe_to_tone_post_request_body.rb b/lib/communications/calls/item/subscribe_to_tone/subscribe_to_tone_post_request_body.rb index ffc63673f8..f445f17ad8 100644 --- a/lib/communications/calls/item/subscribe_to_tone/subscribe_to_tone_post_request_body.rb +++ b/lib/communications/calls/item/subscribe_to_tone/subscribe_to_tone_post_request_body.rb @@ -19,15 +19,15 @@ class SubscribeToTonePostRequestBody # The clientContext property @client_context ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -49,7 +49,7 @@ def client_context=(value) @client_context = value end ## - ## Instantiates a new subscribeToTonePostRequestBody and sets the default values. + ## Instantiates a new SubscribeToTonePostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/communications/calls/item/subscribe_to_tone/subscribe_to_tone_request_builder.rb b/lib/communications/calls/item/subscribe_to_tone/subscribe_to_tone_request_builder.rb index 730f926d8f..1a05fca808 100644 --- a/lib/communications/calls/item/subscribe_to_tone/subscribe_to_tone_request_builder.rb +++ b/lib/communications/calls/item/subscribe_to_tone/subscribe_to_tone_request_builder.rb @@ -26,7 +26,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}/subscribeToTone") end ## - ## Subscribe to DTMF (dual-tone multi-frequency signaling). This allows you to be notified when the user presses keys on a 'dialpad'. + ## Subscribe to DTMF (dual-tone multi-frequency signaling) which allows you to be notified when the user presses keys on a 'dialpad'. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of subscribe_to_tone_operation @@ -37,12 +37,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SubscribeToToneOperation.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Subscribe to DTMF (dual-tone multi-frequency signaling). This allows you to be notified when the user presses keys on a 'dialpad'. + ## Subscribe to DTMF (dual-tone multi-frequency signaling) which allows you to be notified when the user presses keys on a 'dialpad'. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -50,17 +49,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a subscribe_to_tone_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SubscribeToToneRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/calls/item/transfer/transfer_post_request_body.rb b/lib/communications/calls/item/transfer/transfer_post_request_body.rb index 85982c6771..03a0d8e488 100644 --- a/lib/communications/calls/item/transfer/transfer_post_request_body.rb +++ b/lib/communications/calls/item/transfer/transfer_post_request_body.rb @@ -24,22 +24,22 @@ class TransferPostRequestBody # The transferee property @transferee ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new transferPostRequestBody and sets the default values. + ## Instantiates a new TransferPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/communications/calls/item/transfer/transfer_request_builder.rb b/lib/communications/calls/item/transfer/transfer_request_builder.rb index 8709febbe0..2d948f3d18 100644 --- a/lib/communications/calls/item/transfer/transfer_request_builder.rb +++ b/lib/communications/calls/item/transfer/transfer_request_builder.rb @@ -36,8 +36,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a transfer_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TransferRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/calls/item/unmute/unmute_post_request_body.rb b/lib/communications/calls/item/unmute/unmute_post_request_body.rb index a08115687f..7316d525a5 100644 --- a/lib/communications/calls/item/unmute/unmute_post_request_body.rb +++ b/lib/communications/calls/item/unmute/unmute_post_request_body.rb @@ -19,15 +19,15 @@ class UnmutePostRequestBody # The clientContext property @client_context ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -49,7 +49,7 @@ def client_context=(value) @client_context = value end ## - ## Instantiates a new unmutePostRequestBody and sets the default values. + ## Instantiates a new UnmutePostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/communications/calls/item/unmute/unmute_request_builder.rb b/lib/communications/calls/item/unmute/unmute_request_builder.rb index 0993fe9409..00c437ed1b 100644 --- a/lib/communications/calls/item/unmute/unmute_request_builder.rb +++ b/lib/communications/calls/item/unmute/unmute_request_builder.rb @@ -37,8 +37,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UnmuteParticipantOperation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -50,17 +49,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a unmute_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UnmuteRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/calls/item/update_recording_status/update_recording_status_post_request_body.rb b/lib/communications/calls/item/update_recording_status/update_recording_status_post_request_body.rb index 57e6f8b6f4..cd356efa9d 100644 --- a/lib/communications/calls/item/update_recording_status/update_recording_status_post_request_body.rb +++ b/lib/communications/calls/item/update_recording_status/update_recording_status_post_request_body.rb @@ -23,15 +23,15 @@ class UpdateRecordingStatusPostRequestBody # The status property @status ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -53,7 +53,7 @@ def client_context=(value) @client_context = value end ## - ## Instantiates a new updateRecordingStatusPostRequestBody and sets the default values. + ## Instantiates a new UpdateRecordingStatusPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/communications/calls/item/update_recording_status/update_recording_status_request_builder.rb b/lib/communications/calls/item/update_recording_status/update_recording_status_request_builder.rb index 0265f91a26..d733465b2c 100644 --- a/lib/communications/calls/item/update_recording_status/update_recording_status_request_builder.rb +++ b/lib/communications/calls/item/update_recording_status/update_recording_status_request_builder.rb @@ -37,8 +37,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UpdateRecordingStatusOperation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -50,17 +49,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a update_recording_status_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UpdateRecordingStatusRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/calls/log_teleconference_device_quality/log_teleconference_device_quality_post_request_body.rb b/lib/communications/calls/log_teleconference_device_quality/log_teleconference_device_quality_post_request_body.rb index dbb9807525..bcc70a434e 100644 --- a/lib/communications/calls/log_teleconference_device_quality/log_teleconference_device_quality_post_request_body.rb +++ b/lib/communications/calls/log_teleconference_device_quality/log_teleconference_device_quality_post_request_body.rb @@ -18,22 +18,22 @@ class LogTeleconferenceDeviceQualityPostRequestBody # The quality property @quality ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new logTeleconferenceDeviceQualityPostRequestBody and sets the default values. + ## Instantiates a new LogTeleconferenceDeviceQualityPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/communications/calls/log_teleconference_device_quality/log_teleconference_device_quality_request_builder.rb b/lib/communications/calls/log_teleconference_device_quality/log_teleconference_device_quality_request_builder.rb index 0d53590807..59975f9b4f 100644 --- a/lib/communications/calls/log_teleconference_device_quality/log_teleconference_device_quality_request_builder.rb +++ b/lib/communications/calls/log_teleconference_device_quality/log_teleconference_device_quality_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a log_teleconference_device_quality_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return LogTeleconferenceDeviceQualityRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/communications_request_builder.rb b/lib/communications/communications_request_builder.rb index 0948331828..8c9835d012 100644 --- a/lib/communications/communications_request_builder.rb +++ b/lib/communications/communications_request_builder.rb @@ -47,7 +47,7 @@ def presences() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/communications{?%24expand,%24select}") end ## ## Get communications @@ -59,8 +59,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudCommunications.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -75,8 +74,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudCommunications.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -86,15 +84,15 @@ def patch(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -106,17 +104,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a communications_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CommunicationsRequestBuilder.new(raw_url, @request_adapter) + end ## # Get communications diff --git a/lib/communications/get_presences_by_user_id/get_presences_by_user_id.rb b/lib/communications/get_presences_by_user_id/get_presences_by_user_id.rb index c6d1faac71..707c775b34 100644 --- a/lib/communications/get_presences_by_user_id/get_presences_by_user_id.rb +++ b/lib/communications/get_presences_by_user_id/get_presences_by_user_id.rb @@ -1,2 +1,2 @@ require_relative 'get_presences_by_user_id_post_request_body' -require_relative 'get_presences_by_user_id_response' +require_relative 'get_presences_by_user_id_post_response' diff --git a/lib/communications/get_presences_by_user_id/get_presences_by_user_id_post_request_body.rb b/lib/communications/get_presences_by_user_id/get_presences_by_user_id_post_request_body.rb index 28f607a6c7..982fef811b 100644 --- a/lib/communications/get_presences_by_user_id/get_presences_by_user_id_post_request_body.rb +++ b/lib/communications/get_presences_by_user_id/get_presences_by_user_id_post_request_body.rb @@ -15,22 +15,22 @@ class GetPresencesByUserIdPostRequestBody # The ids property @ids ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getPresencesByUserIdPostRequestBody and sets the default values. + ## Instantiates a new GetPresencesByUserIdPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/communications/get_presences_by_user_id/get_presences_by_user_id_post_response.rb b/lib/communications/get_presences_by_user_id/get_presences_by_user_id_post_response.rb new file mode 100644 index 0000000000..9a27f0ee0b --- /dev/null +++ b/lib/communications/get_presences_by_user_id/get_presences_by_user_id_post_response.rb @@ -0,0 +1,69 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/base_collection_pagination_count_response' +require_relative '../../models/presence' +require_relative '../communications' +require_relative './get_presences_by_user_id' + +module MicrosoftGraph + module Communications + module GetPresencesByUserId + class GetPresencesByUserIdPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetPresencesByUserIdPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_presences_by_user_id_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetPresencesByUserIdPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Presence.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a presence + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/communications/get_presences_by_user_id/get_presences_by_user_id_request_builder.rb b/lib/communications/get_presences_by_user_id/get_presences_by_user_id_request_builder.rb index 43fc6fa047..8b039b291c 100644 --- a/lib/communications/get_presences_by_user_id/get_presences_by_user_id_request_builder.rb +++ b/lib/communications/get_presences_by_user_id/get_presences_by_user_id_request_builder.rb @@ -24,7 +24,7 @@ def initialize(path_parameters, request_adapter) ## Get the presence information for multiple users. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_presences_by_user_id_response + ## @return a Fiber of get_presences_by_user_id_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -32,9 +32,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Communications::GetPresencesByUserId::GetPresencesByUserIdResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Communications::GetPresencesByUserId::GetPresencesByUserIdPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Get the presence information for multiple users. @@ -45,17 +44,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_presences_by_user_id_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetPresencesByUserIdRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/get_presences_by_user_id/get_presences_by_user_id_response.rb b/lib/communications/get_presences_by_user_id/get_presences_by_user_id_response.rb deleted file mode 100644 index 85bc71d969..0000000000 --- a/lib/communications/get_presences_by_user_id/get_presences_by_user_id_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../microsoft_graph' -require_relative '../../models/base_collection_pagination_count_response' -require_relative '../../models/presence' -require_relative '../communications' -require_relative './get_presences_by_user_id' - -module MicrosoftGraph - module Communications - module GetPresencesByUserId - class GetPresencesByUserIdResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getPresencesByUserIdResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_presences_by_user_id_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetPresencesByUserIdResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Presence.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a presence - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end -end diff --git a/lib/communications/online_meetings/count/count_request_builder.rb b/lib/communications/online_meetings/count/count_request_builder.rb index 48915b62e3..6163a0a268 100644 --- a/lib/communications/online_meetings/count/count_request_builder.rb +++ b/lib/communications/online_meetings/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/communications/online_meetings/create_or_get/create_or_get_post_request_body.rb b/lib/communications/online_meetings/create_or_get/create_or_get_post_request_body.rb index 45b0253c88..d277f9836c 100644 --- a/lib/communications/online_meetings/create_or_get/create_or_get_post_request_body.rb +++ b/lib/communications/online_meetings/create_or_get/create_or_get_post_request_body.rb @@ -35,15 +35,15 @@ class CreateOrGetPostRequestBody # The subject property @subject ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -65,7 +65,7 @@ def chat_info=(value) @chat_info = value end ## - ## Instantiates a new createOrGetPostRequestBody and sets the default values. + ## Instantiates a new CreateOrGetPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/communications/online_meetings/create_or_get/create_or_get_request_builder.rb b/lib/communications/online_meetings/create_or_get/create_or_get_request_builder.rb index 3cc88ee6d7..a5ba23e7ef 100644 --- a/lib/communications/online_meetings/create_or_get/create_or_get_request_builder.rb +++ b/lib/communications/online_meetings/create_or_get/create_or_get_request_builder.rb @@ -35,8 +35,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::OnlineMeeting.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a create_or_get_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CreateOrGetRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/online_meetings/i056e0011aad1cfd99d94f2d6b75f21d85f8b7cfe3c3983a69234033a5ffcd08b/1a70dcd6f06681cb6af54b45f7af2496869dd6d9321f86addda358e46c7fe7a9.rb b/lib/communications/online_meetings/i056e0011aad1cfd99d94f2d6b75f21d85f8b7cfe3c3983a69234033a5ffcd08b/1a70dcd6f06681cb6af54b45f7af2496869dd6d9321f86addda358e46c7fe7a9.rb new file mode 100644 index 0000000000..be891acc77 --- /dev/null +++ b/lib/communications/online_meetings/i056e0011aad1cfd99d94f2d6b75f21d85f8b7cfe3c3983a69234033a5ffcd08b/1a70dcd6f06681cb6af54b45f7af2496869dd6d9321f86addda358e46c7fe7a9.rb @@ -0,0 +1,72 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../../models/call_transcript' +require_relative '../../communications' +require_relative '../online_meetings' +require_relative './i056e0011aad1cfd99d94f2d6b75f21d85f8b7cfe3c3983a69234033a5ffcd08b' + +module MicrosoftGraph + module Communications + module OnlineMeetings + module I056e0011aad1cfd99d94f2d6b75f21d85f8b7cfe3c3983a69234033a5ffcd08b + class GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_all_transcriptsmeeting_organizer_user_id_meeting_organizer_user_id_with_start_date_time_with_end_date_time_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::CallTranscript.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a call_transcript + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/communications/online_meetings/i056e0011aad1cfd99d94f2d6b75f21d85f8b7cfe3c3983a69234033a5ffcd08b/e61b2d5484df5c99782598f88bad613fa3840c5ed2a29782329c8b045393beae.rb b/lib/communications/online_meetings/i056e0011aad1cfd99d94f2d6b75f21d85f8b7cfe3c3983a69234033a5ffcd08b/e61b2d5484df5c99782598f88bad613fa3840c5ed2a29782329c8b045393beae.rb new file mode 100644 index 0000000000..a9ac06293c --- /dev/null +++ b/lib/communications/online_meetings/i056e0011aad1cfd99d94f2d6b75f21d85f8b7cfe3c3983a69234033a5ffcd08b/e61b2d5484df5c99782598f88bad613fa3840c5ed2a29782329c8b045393beae.rb @@ -0,0 +1,142 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../communications' +require_relative '../online_meetings' +require_relative './i056e0011aad1cfd99d94f2d6b75f21d85f8b7cfe3c3983a69234033a5ffcd08b' + +module MicrosoftGraph + module Communications + module OnlineMeetings + module I056e0011aad1cfd99d94f2d6b75f21d85f8b7cfe3c3983a69234033a5ffcd08b + ## + # Provides operations to call the getAllTranscripts method. + class GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/getAllTranscripts(meetingOrganizerUserId='@meetingOrganizerUserId',startDateTime=@startDateTime,endDateTime=@endDateTime){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top,endDateTime*,meetingOrganizerUserId*,startDateTime*}") + end + ## + ## Get all transcripts from scheduled onlineMeeting instances for which the specified user is the organizer. This API currently doesn't support getting call transcripts from channel meetings. You can apply the delta function on getAllTranscripts to synchronize and get callTranscript resources as they're added for onlineMeeting instances organized by the specified user. Delta query supports both full synchronization and incremental synchronization. Full synchronization gets all the transcripts for online meetings organized by the user. Incremental synchronization gets transcripts that are added since the last synchronization. Typically, you perform an initial full synchronization, and then get incremental changes to that recording view periodically. For more information, see delta query. For more examples, see callTranscript: delta. To learn more about using the Microsoft Teams export APIs to export content, see Export content with the Microsoft Teams export APIs. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of get_all_transcriptsmeeting_organizer_user_id_meeting_organizer_user_id_with_start_date_time_with_end_date_time_get_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Communications::OnlineMeetings::I056e0011aad1cfd99d94f2d6b75f21d85f8b7cfe3c3983a69234033a5ffcd08b::GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get all transcripts from scheduled onlineMeeting instances for which the specified user is the organizer. This API currently doesn't support getting call transcripts from channel meetings. You can apply the delta function on getAllTranscripts to synchronize and get callTranscript resources as they're added for onlineMeeting instances organized by the specified user. Delta query supports both full synchronization and incremental synchronization. Full synchronization gets all the transcripts for online meetings organized by the user. Incremental synchronization gets transcripts that are added since the last synchronization. Typically, you perform an initial full synchronization, and then get incremental changes to that recording view periodically. For more information, see delta query. For more examples, see callTranscript: delta. To learn more about using the Microsoft Teams export APIs to export content, see Export content with the Microsoft Teams export APIs. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_all_transcriptsmeeting_organizer_user_id_meeting_organizer_user_id_with_start_date_time_with_end_date_time_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get all transcripts from scheduled onlineMeeting instances for which the specified user is the organizer. This API currently doesn't support getting call transcripts from channel meetings. You can apply the delta function on getAllTranscripts to synchronize and get callTranscript resources as they're added for onlineMeeting instances organized by the specified user. Delta query supports both full synchronization and incremental synchronization. Full synchronization gets all the transcripts for online meetings organized by the user. Incremental synchronization gets transcripts that are added since the last synchronization. Typically, you perform an initial full synchronization, and then get incremental changes to that recording view periodically. For more information, see delta query. For more examples, see callTranscript: delta. To learn more about using the Microsoft Teams export APIs to export content, see Export content with the Microsoft Teams export APIs. + class GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Usage: endDateTime=@endDateTime + attr_accessor :end_date_time + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Usage: meetingOrganizerUserId='@meetingOrganizerUserId' + attr_accessor :meeting_organizer_user_id + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Usage: startDateTime=@startDateTime + attr_accessor :start_date_time + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "end_date_time" + return "endDateTime" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "meeting_organizer_user_id" + return "meetingOrganizerUserId" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "start_date_time" + return "startDateTime" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/communications/online_meetings/i056e0011aad1cfd99d94f2d6b75f21d85f8b7cfe3c3983a69234033a5ffcd08b/i056e0011aad1cfd99d94f2d6b75f21d85f8b7cfe3c3983a69234033a5ffcd08b.rb b/lib/communications/online_meetings/i056e0011aad1cfd99d94f2d6b75f21d85f8b7cfe3c3983a69234033a5ffcd08b/i056e0011aad1cfd99d94f2d6b75f21d85f8b7cfe3c3983a69234033a5ffcd08b.rb new file mode 100644 index 0000000000..5de55af0fe --- /dev/null +++ b/lib/communications/online_meetings/i056e0011aad1cfd99d94f2d6b75f21d85f8b7cfe3c3983a69234033a5ffcd08b/i056e0011aad1cfd99d94f2d6b75f21d85f8b7cfe3c3983a69234033a5ffcd08b.rb @@ -0,0 +1 @@ +require_relative '1a70dcd6f06681cb6af54b45f7af2496869dd6d9321f86addda358e46c7fe7a9' diff --git a/lib/communications/online_meetings/ibe4c23e921ad9fcaa5c959c34e393ba839c959ee578ec95fd69bc2d9aa0b2597/93b7daca5be018c77b93b12567ae342e4db62833cf6672535af71a36cfe6bba1.rb b/lib/communications/online_meetings/ibe4c23e921ad9fcaa5c959c34e393ba839c959ee578ec95fd69bc2d9aa0b2597/93b7daca5be018c77b93b12567ae342e4db62833cf6672535af71a36cfe6bba1.rb new file mode 100644 index 0000000000..e1995b3d89 --- /dev/null +++ b/lib/communications/online_meetings/ibe4c23e921ad9fcaa5c959c34e393ba839c959ee578ec95fd69bc2d9aa0b2597/93b7daca5be018c77b93b12567ae342e4db62833cf6672535af71a36cfe6bba1.rb @@ -0,0 +1,142 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../communications' +require_relative '../online_meetings' +require_relative './ibe4c23e921ad9fcaa5c959c34e393ba839c959ee578ec95fd69bc2d9aa0b2597' + +module MicrosoftGraph + module Communications + module OnlineMeetings + module Ibe4c23e921ad9fcaa5c959c34e393ba839c959ee578ec95fd69bc2d9aa0b2597 + ## + # Provides operations to call the getAllRecordings method. + class GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/getAllRecordings(meetingOrganizerUserId='@meetingOrganizerUserId',startDateTime=@startDateTime,endDateTime=@endDateTime){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top,endDateTime*,meetingOrganizerUserId*,startDateTime*}") + end + ## + ## Get all recordings from scheduled onlineMeeting instances for which the specified user is the organizer. This API currently doesn't support getting call recordings from channel meetings. You can apply the delta function on getAllRecordings to synchronize and get callRecording resources as they're added for onlineMeeting instances organized by the specified user. The delta query supports both full synchronization and incremental synchronization. Full synchronization gets all the recordings for online meetings organized by the user. Incremental synchronization gets recordings that are added since the last synchronization. Typically, you perform an initial full synchronization, and then get incremental changes to that recording view periodically. Find more information in the delta query documentation. For more examples, see callRecording: delta. To learn more about using the Microsoft Teams export APIs to export content, see Export content with the Microsoft Teams export APIs. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of get_all_recordingsmeeting_organizer_user_id_meeting_organizer_user_id_with_start_date_time_with_end_date_time_get_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Communications::OnlineMeetings::Ibe4c23e921ad9fcaa5c959c34e393ba839c959ee578ec95fd69bc2d9aa0b2597::GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get all recordings from scheduled onlineMeeting instances for which the specified user is the organizer. This API currently doesn't support getting call recordings from channel meetings. You can apply the delta function on getAllRecordings to synchronize and get callRecording resources as they're added for onlineMeeting instances organized by the specified user. The delta query supports both full synchronization and incremental synchronization. Full synchronization gets all the recordings for online meetings organized by the user. Incremental synchronization gets recordings that are added since the last synchronization. Typically, you perform an initial full synchronization, and then get incremental changes to that recording view periodically. Find more information in the delta query documentation. For more examples, see callRecording: delta. To learn more about using the Microsoft Teams export APIs to export content, see Export content with the Microsoft Teams export APIs. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_all_recordingsmeeting_organizer_user_id_meeting_organizer_user_id_with_start_date_time_with_end_date_time_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get all recordings from scheduled onlineMeeting instances for which the specified user is the organizer. This API currently doesn't support getting call recordings from channel meetings. You can apply the delta function on getAllRecordings to synchronize and get callRecording resources as they're added for onlineMeeting instances organized by the specified user. The delta query supports both full synchronization and incremental synchronization. Full synchronization gets all the recordings for online meetings organized by the user. Incremental synchronization gets recordings that are added since the last synchronization. Typically, you perform an initial full synchronization, and then get incremental changes to that recording view periodically. Find more information in the delta query documentation. For more examples, see callRecording: delta. To learn more about using the Microsoft Teams export APIs to export content, see Export content with the Microsoft Teams export APIs. + class GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Usage: endDateTime=@endDateTime + attr_accessor :end_date_time + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Usage: meetingOrganizerUserId='@meetingOrganizerUserId' + attr_accessor :meeting_organizer_user_id + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Usage: startDateTime=@startDateTime + attr_accessor :start_date_time + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "end_date_time" + return "endDateTime" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "meeting_organizer_user_id" + return "meetingOrganizerUserId" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "start_date_time" + return "startDateTime" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/communications/online_meetings/ibe4c23e921ad9fcaa5c959c34e393ba839c959ee578ec95fd69bc2d9aa0b2597/bbe8ff85c1dde26aab80343dfbdb76cd8b89b9ff2e032493c018ee68f405e559.rb b/lib/communications/online_meetings/ibe4c23e921ad9fcaa5c959c34e393ba839c959ee578ec95fd69bc2d9aa0b2597/bbe8ff85c1dde26aab80343dfbdb76cd8b89b9ff2e032493c018ee68f405e559.rb new file mode 100644 index 0000000000..b9aa99ab97 --- /dev/null +++ b/lib/communications/online_meetings/ibe4c23e921ad9fcaa5c959c34e393ba839c959ee578ec95fd69bc2d9aa0b2597/bbe8ff85c1dde26aab80343dfbdb76cd8b89b9ff2e032493c018ee68f405e559.rb @@ -0,0 +1,72 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../../models/call_recording' +require_relative '../../communications' +require_relative '../online_meetings' +require_relative './ibe4c23e921ad9fcaa5c959c34e393ba839c959ee578ec95fd69bc2d9aa0b2597' + +module MicrosoftGraph + module Communications + module OnlineMeetings + module Ibe4c23e921ad9fcaa5c959c34e393ba839c959ee578ec95fd69bc2d9aa0b2597 + class GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_all_recordingsmeeting_organizer_user_id_meeting_organizer_user_id_with_start_date_time_with_end_date_time_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::CallRecording.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a call_recording + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/communications/online_meetings/ibe4c23e921ad9fcaa5c959c34e393ba839c959ee578ec95fd69bc2d9aa0b2597/ibe4c23e921ad9fcaa5c959c34e393ba839c959ee578ec95fd69bc2d9aa0b2597.rb b/lib/communications/online_meetings/ibe4c23e921ad9fcaa5c959c34e393ba839c959ee578ec95fd69bc2d9aa0b2597/ibe4c23e921ad9fcaa5c959c34e393ba839c959ee578ec95fd69bc2d9aa0b2597.rb new file mode 100644 index 0000000000..6da71270fe --- /dev/null +++ b/lib/communications/online_meetings/ibe4c23e921ad9fcaa5c959c34e393ba839c959ee578ec95fd69bc2d9aa0b2597/ibe4c23e921ad9fcaa5c959c34e393ba839c959ee578ec95fd69bc2d9aa0b2597.rb @@ -0,0 +1 @@ +require_relative 'bbe8ff85c1dde26aab80343dfbdb76cd8b89b9ff2e032493c018ee68f405e559' diff --git a/lib/communications/online_meetings/item/attendance_reports/attendance_reports_request_builder.rb b/lib/communications/online_meetings/item/attendance_reports/attendance_reports_request_builder.rb index f8300a17e3..90c1866889 100644 --- a/lib/communications/online_meetings/item/attendance_reports/attendance_reports_request_builder.rb +++ b/lib/communications/online_meetings/item/attendance_reports/attendance_reports_request_builder.rb @@ -16,7 +16,7 @@ module OnlineMeetings module Item module AttendanceReports ## - # Provides operations to manage the attendanceReports property of the microsoft.graph.onlineMeeting entity. + # Provides operations to manage the attendanceReports property of the microsoft.graph.onlineMeetingBase entity. class AttendanceReportsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @@ -25,7 +25,7 @@ def count() return MicrosoftGraph::Communications::OnlineMeetings::Item::AttendanceReports::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) end ## - ## Provides operations to manage the attendanceReports property of the microsoft.graph.onlineMeeting entity. + ## Provides operations to manage the attendanceReports property of the microsoft.graph.onlineMeetingBase entity. ## @param meeting_attendance_report_id The unique identifier of meetingAttendanceReport ## @return a meeting_attendance_report_item_request_builder ## @@ -42,10 +42,10 @@ def by_meeting_attendance_report_id(meeting_attendance_report_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/attendanceReports{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/attendanceReports{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Get a list of meetingAttendanceReport objects for an onlineMeeting. Each time an online meeting ends, an attendance report is generated for that session. + ## The attendance reports of an online meeting. Read-only. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of meeting_attendance_report_collection_response ## @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MeetingAttendanceReportCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,26 +69,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MeetingAttendanceReport.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Get a list of meetingAttendanceReport objects for an onlineMeeting. Each time an online meeting ends, an attendance report is generated for that session. + ## The attendance reports of an online meeting. Read-only. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,20 +99,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a attendance_reports_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AttendanceReportsRequestBuilder.new(raw_url, @request_adapter) + end ## - # Get a list of meetingAttendanceReport objects for an onlineMeeting. Each time an online meeting ends, an attendance report is generated for that session. + # The attendance reports of an online meeting. Read-only. class AttendanceReportsRequestBuilderGetQueryParameters ## diff --git a/lib/communications/online_meetings/item/attendance_reports/count/count_request_builder.rb b/lib/communications/online_meetings/item/attendance_reports/count/count_request_builder.rb index 552890ef29..1df7b97477 100644 --- a/lib/communications/online_meetings/item/attendance_reports/count/count_request_builder.rb +++ b/lib/communications/online_meetings/item/attendance_reports/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/attendanceReports/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/attendanceReports/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/communications/online_meetings/item/attendance_reports/item/attendance_records/attendance_records_request_builder.rb b/lib/communications/online_meetings/item/attendance_reports/item/attendance_records/attendance_records_request_builder.rb index ffa5081600..64906d141d 100644 --- a/lib/communications/online_meetings/item/attendance_reports/item/attendance_records/attendance_records_request_builder.rb +++ b/lib/communications/online_meetings/item/attendance_reports/item/attendance_records/attendance_records_request_builder.rb @@ -46,10 +46,10 @@ def by_attendance_record_id(attendance_record_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/attendanceReports/{meetingAttendanceReport%2Did}/attendanceRecords{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/attendanceReports/{meetingAttendanceReport%2Did}/attendanceRecords{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Get a list of attendanceRecord objects and their properties. + ## List of attendance records of an attendance report. Read-only. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of attendance_record_collection_response ## @@ -58,8 +58,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AttendanceRecordCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,26 +73,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AttendanceRecord.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Get a list of attendanceRecord objects and their properties. + ## List of attendance records of an attendance report. Read-only. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -105,20 +103,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a attendance_records_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AttendanceRecordsRequestBuilder.new(raw_url, @request_adapter) + end ## - # Get a list of attendanceRecord objects and their properties. + # List of attendance records of an attendance report. Read-only. class AttendanceRecordsRequestBuilderGetQueryParameters ## diff --git a/lib/communications/online_meetings/item/attendance_reports/item/attendance_records/count/count_request_builder.rb b/lib/communications/online_meetings/item/attendance_reports/item/attendance_records/count/count_request_builder.rb index 02110698fe..3fdbe80ffc 100644 --- a/lib/communications/online_meetings/item/attendance_reports/item/attendance_records/count/count_request_builder.rb +++ b/lib/communications/online_meetings/item/attendance_reports/item/attendance_records/count/count_request_builder.rb @@ -28,7 +28,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/attendanceReports/{meetingAttendanceReport%2Did}/attendanceRecords/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/attendanceReports/{meetingAttendanceReport%2Did}/attendanceRecords/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -40,8 +40,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -51,17 +50,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/communications/online_meetings/item/attendance_reports/item/attendance_records/item/attendance_record_item_request_builder.rb b/lib/communications/online_meetings/item/attendance_reports/item/attendance_records/item/attendance_record_item_request_builder.rb index afc09f0e7b..4b8ae821d4 100644 --- a/lib/communications/online_meetings/item/attendance_reports/item/attendance_records/item/attendance_record_item_request_builder.rb +++ b/lib/communications/online_meetings/item/attendance_reports/item/attendance_records/item/attendance_record_item_request_builder.rb @@ -29,7 +29,7 @@ class AttendanceRecordItemRequestBuilder < MicrosoftKiotaAbstractions::BaseReque ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/attendanceReports/{meetingAttendanceReport%2Did}/attendanceRecords/{attendanceRecord%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/attendanceReports/{meetingAttendanceReport%2Did}/attendanceRecords/{attendanceRecord%2Did}{?%24expand,%24select}") end ## ## Delete navigation property attendanceRecords for communications @@ -41,8 +41,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -55,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AttendanceRecord.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -71,8 +69,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AttendanceRecord.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -82,13 +79,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -98,15 +96,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -118,17 +116,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a attendance_record_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AttendanceRecordItemRequestBuilder.new(raw_url, @request_adapter) + end ## # List of attendance records of an attendance report. Read-only. diff --git a/lib/communications/online_meetings/item/attendance_reports/item/meeting_attendance_report_item_request_builder.rb b/lib/communications/online_meetings/item/attendance_reports/item/meeting_attendance_report_item_request_builder.rb index 25bd4103dc..16581ad5df 100644 --- a/lib/communications/online_meetings/item/attendance_reports/item/meeting_attendance_report_item_request_builder.rb +++ b/lib/communications/online_meetings/item/attendance_reports/item/meeting_attendance_report_item_request_builder.rb @@ -16,7 +16,7 @@ module Item module AttendanceReports module Item ## - # Provides operations to manage the attendanceReports property of the microsoft.graph.onlineMeeting entity. + # Provides operations to manage the attendanceReports property of the microsoft.graph.onlineMeetingBase entity. class MeetingAttendanceReportItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @@ -31,7 +31,7 @@ def attendance_records() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/attendanceReports/{meetingAttendanceReport%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/attendanceReports/{meetingAttendanceReport%2Did}{?%24expand,%24select}") end ## ## Delete navigation property attendanceReports for communications @@ -43,12 +43,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report will be generated for that session. + ## The attendance reports of an online meeting. Read-only. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of meeting_attendance_report ## @@ -57,8 +56,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MeetingAttendanceReport.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -73,8 +71,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MeetingAttendanceReport.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -84,31 +81,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report will be generated for that session. + ## The attendance reports of an online meeting. Read-only. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -120,20 +118,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a meeting_attendance_report_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MeetingAttendanceReportItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Get the meetingAttendanceReport for an onlineMeeting. Each time an online meeting ends, an attendance report will be generated for that session. + # The attendance reports of an online meeting. Read-only. class MeetingAttendanceReportItemRequestBuilderGetQueryParameters ## diff --git a/lib/communications/online_meetings/item/attendee_report/attendee_report_request_builder.rb b/lib/communications/online_meetings/item/attendee_report/attendee_report_request_builder.rb index c2041850d4..e2513fac80 100644 --- a/lib/communications/online_meetings/item/attendee_report/attendee_report_request_builder.rb +++ b/lib/communications/online_meetings/item/attendee_report/attendee_report_request_builder.rb @@ -27,6 +27,19 @@ def initialize(path_parameters, request_adapter) ## ## The content stream of the attendee report of a Microsoft Teams live event. Read-only. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The content stream of the attendee report of a Microsoft Teams live event. Read-only. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of binary ## def get(request_configuration=nil) @@ -34,8 +47,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -50,8 +62,7 @@ def put(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -59,15 +70,33 @@ def put(body, request_configuration=nil) ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## - def to_get_request_information(request_configuration=nil) + def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end request_info.url_template = @url_template request_info.path_parameters = @path_parameters - request_info.http_method = :GET + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The content stream of the attendee report of a Microsoft Teams live event. Read-only. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end ## @@ -79,16 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_put_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PUT unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "", body) + request_info.set_content_from_parsable(@request_adapter, 'application/octet-stream', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PUT + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a attendee_report_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AttendeeReportRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url.rb b/lib/communications/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url.rb index 4d412797ee..93bbb6b5a0 100644 --- a/lib/communications/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url.rb +++ b/lib/communications/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url.rb @@ -1 +1 @@ -require_relative 'get_virtual_appointment_join_web_url_response' +require_relative 'get_virtual_appointment_join_web_url_get_response' diff --git a/lib/communications/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_get_response.rb b/lib/communications/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_get_response.rb new file mode 100644 index 0000000000..2ab17bbdfe --- /dev/null +++ b/lib/communications/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_get_response.rb @@ -0,0 +1,91 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../communications' +require_relative '../../online_meetings' +require_relative '../item' +require_relative './get_virtual_appointment_join_web_url' + +module MicrosoftGraph + module Communications + module OnlineMeetings + module Item + module GetVirtualAppointmentJoinWebUrl + class GetVirtualAppointmentJoinWebUrlGetResponse + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The value property + @value + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new GetVirtualAppointmentJoinWebUrlGetResponse and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_virtual_appointment_join_web_url_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetVirtualAppointmentJoinWebUrlGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "value" => lambda {|n| @value = n.get_string_value() }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_string_value("value", @value) + writer.write_additional_data(@additional_data) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end +end diff --git a/lib/communications/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_request_builder.rb b/lib/communications/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_request_builder.rb index a3a0a20823..fc5bef745a 100644 --- a/lib/communications/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_request_builder.rb +++ b/lib/communications/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_request_builder.rb @@ -25,36 +25,44 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/getVirtualAppointmentJoinWebUrl()") end ## - ## Invoke function getVirtualAppointmentJoinWebUrl + ## Get a join web URL for a Microsoft Virtual Appointment. This web URL includes enhanced business-to-customer experiences such as mobile browser join and virtual lobby rooms. With Teams Premium, you can configure a custom lobby room experience for attendees by adding your company logo and access the Virtual Appointments usage report for organizational analytics. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_virtual_appointment_join_web_url_response + ## @return a Fiber of get_virtual_appointment_join_web_url_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Communications::OnlineMeetings::Item::GetVirtualAppointmentJoinWebUrl::GetVirtualAppointmentJoinWebUrlResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Communications::OnlineMeetings::Item::GetVirtualAppointmentJoinWebUrl::GetVirtualAppointmentJoinWebUrlGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Invoke function getVirtualAppointmentJoinWebUrl + ## Get a join web URL for a Microsoft Virtual Appointment. This web URL includes enhanced business-to-customer experiences such as mobile browser join and virtual lobby rooms. With Teams Premium, you can configure a custom lobby room experience for attendees by adding your company logo and access the Virtual Appointments usage report for organizational analytics. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_virtual_appointment_join_web_url_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetVirtualAppointmentJoinWebUrlRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_response.rb b/lib/communications/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_response.rb deleted file mode 100644 index c0ea6bfff2..0000000000 --- a/lib/communications/online_meetings/item/get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_response.rb +++ /dev/null @@ -1,91 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../communications' -require_relative '../../online_meetings' -require_relative '../item' -require_relative './get_virtual_appointment_join_web_url' - -module MicrosoftGraph - module Communications - module OnlineMeetings - module Item - module GetVirtualAppointmentJoinWebUrl - class GetVirtualAppointmentJoinWebUrlResponse - include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable - ## - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - @additional_data - ## - # The value property - @value - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @return a i_dictionary - ## - def additional_data - return @additional_data - end - ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. - ## @return a void - ## - def additional_data=(value) - @additional_data = value - end - ## - ## Instantiates a new getVirtualAppointmentJoinWebUrlResponse and sets the default values. - ## @return a void - ## - def initialize() - @additional_data = Hash.new - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_virtual_appointment_join_web_url_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetVirtualAppointmentJoinWebUrlResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return { - "value" => lambda {|n| @value = n.get_string_value() }, - } - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_string_value("value", @value) - writer.write_additional_data(@additional_data) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end -end diff --git a/lib/communications/online_meetings/item/online_meeting_item_request_builder.rb b/lib/communications/online_meetings/item/online_meeting_item_request_builder.rb index 7a40415ee5..15fe7b760e 100644 --- a/lib/communications/online_meetings/item/online_meeting_item_request_builder.rb +++ b/lib/communications/online_meetings/item/online_meeting_item_request_builder.rb @@ -8,6 +8,10 @@ require_relative './attendee_report/attendee_report_request_builder' require_relative './get_virtual_appointment_join_web_url/get_virtual_appointment_join_web_url_request_builder' require_relative './item' +require_relative './recordings/recordings_request_builder' +require_relative './send_virtual_appointment_reminder_sms/send_virtual_appointment_reminder_sms_request_builder' +require_relative './send_virtual_appointment_sms/send_virtual_appointment_sms_request_builder' +require_relative './transcripts/transcripts_request_builder' module MicrosoftGraph module Communications @@ -18,7 +22,7 @@ module Item class OnlineMeetingItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## - # Provides operations to manage the attendanceReports property of the microsoft.graph.onlineMeeting entity. + # Provides operations to manage the attendanceReports property of the microsoft.graph.onlineMeetingBase entity. def attendance_reports() return MicrosoftGraph::Communications::OnlineMeetings::Item::AttendanceReports::AttendanceReportsRequestBuilder.new(@path_parameters, @request_adapter) end @@ -33,13 +37,33 @@ def get_virtual_appointment_join_web_url() return MicrosoftGraph::Communications::OnlineMeetings::Item::GetVirtualAppointmentJoinWebUrl::GetVirtualAppointmentJoinWebUrlRequestBuilder.new(@path_parameters, @request_adapter) end ## + # Provides operations to manage the recordings property of the microsoft.graph.onlineMeeting entity. + def recordings() + return MicrosoftGraph::Communications::OnlineMeetings::Item::Recordings::RecordingsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to call the sendVirtualAppointmentReminderSms method. + def send_virtual_appointment_reminder_sms() + return MicrosoftGraph::Communications::OnlineMeetings::Item::SendVirtualAppointmentReminderSms::SendVirtualAppointmentReminderSmsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to call the sendVirtualAppointmentSms method. + def send_virtual_appointment_sms() + return MicrosoftGraph::Communications::OnlineMeetings::Item::SendVirtualAppointmentSms::SendVirtualAppointmentSmsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the transcripts property of the microsoft.graph.onlineMeeting entity. + def transcripts() + return MicrosoftGraph::Communications::OnlineMeetings::Item::Transcripts::TranscriptsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## ## Instantiates a new OnlineMeetingItemRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request ## @param request_adapter The request adapter to use to execute the requests. ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}{?%24expand,%24select}") end ## ## Delete navigation property onlineMeetings for communications @@ -51,8 +75,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -65,8 +88,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::OnlineMeeting.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,8 +103,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::OnlineMeeting.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -92,13 +113,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -108,15 +130,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -128,17 +150,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a online_meeting_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return OnlineMeetingItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Get onlineMeetings from communications diff --git a/lib/groups/item/calendar/calendar_view/item/instances/item/extensions/count/count.rb b/lib/communications/online_meetings/item/recordings/count/count.rb similarity index 100% rename from lib/groups/item/calendar/calendar_view/item/instances/item/extensions/count/count.rb rename to lib/communications/online_meetings/item/recordings/count/count.rb diff --git a/lib/communications/online_meetings/item/recordings/count/count_request_builder.rb b/lib/communications/online_meetings/item/recordings/count/count_request_builder.rb new file mode 100644 index 0000000000..ef9fbac95b --- /dev/null +++ b/lib/communications/online_meetings/item/recordings/count/count_request_builder.rb @@ -0,0 +1,103 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../communications' +require_relative '../../../online_meetings' +require_relative '../../item' +require_relative '../recordings' +require_relative './count' + +module MicrosoftGraph + module Communications + module OnlineMeetings + module Item + module Recordings + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/recordings/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/communications/online_meetings/item/recordings/delta/delta.rb b/lib/communications/online_meetings/item/recordings/delta/delta.rb new file mode 100644 index 0000000000..8a3dc08b72 --- /dev/null +++ b/lib/communications/online_meetings/item/recordings/delta/delta.rb @@ -0,0 +1 @@ +require_relative 'delta_get_response' diff --git a/lib/communications/online_meetings/item/recordings/delta/delta_get_response.rb b/lib/communications/online_meetings/item/recordings/delta/delta_get_response.rb new file mode 100644 index 0000000000..597323a91a --- /dev/null +++ b/lib/communications/online_meetings/item/recordings/delta/delta_get_response.rb @@ -0,0 +1,78 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/base_delta_function_response' +require_relative '../../../../../models/call_recording' +require_relative '../../../../communications' +require_relative '../../../online_meetings' +require_relative '../../item' +require_relative '../recordings' +require_relative './delta' + +module MicrosoftGraph + module Communications + module OnlineMeetings + module Item + module Recordings + module Delta + class DeltaGetResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new DeltaGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a delta_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return DeltaGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::CallRecording.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a call_recording + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end + end +end diff --git a/lib/communications/online_meetings/item/recordings/delta/delta_request_builder.rb b/lib/communications/online_meetings/item/recordings/delta/delta_request_builder.rb new file mode 100644 index 0000000000..e9a42cb7c0 --- /dev/null +++ b/lib/communications/online_meetings/item/recordings/delta/delta_request_builder.rb @@ -0,0 +1,133 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../communications' +require_relative '../../../online_meetings' +require_relative '../../item' +require_relative '../recordings' +require_relative './delta' + +module MicrosoftGraph + module Communications + module OnlineMeetings + module Item + module Recordings + module Delta + ## + # Provides operations to call the delta method. + class DeltaRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new DeltaRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/recordings/delta(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Invoke function delta + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of delta_get_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Communications::OnlineMeetings::Item::Recordings::Delta::DeltaGetResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Invoke function delta + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a delta_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeltaRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Invoke function delta + class DeltaRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/communications/online_meetings/item/recordings/item/call_recording_item_request_builder.rb b/lib/communications/online_meetings/item/recordings/item/call_recording_item_request_builder.rb new file mode 100644 index 0000000000..4a360905df --- /dev/null +++ b/lib/communications/online_meetings/item/recordings/item/call_recording_item_request_builder.rb @@ -0,0 +1,175 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/call_recording' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../communications' +require_relative '../../../online_meetings' +require_relative '../../item' +require_relative '../recordings' +require_relative './content/content_request_builder' +require_relative './item' + +module MicrosoftGraph + module Communications + module OnlineMeetings + module Item + module Recordings + module Item + ## + # Provides operations to manage the recordings property of the microsoft.graph.onlineMeeting entity. + class CallRecordingItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the media for the cloudCommunications entity. + def content() + return MicrosoftGraph::Communications::OnlineMeetings::Item::Recordings::Item::Content::ContentRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new CallRecordingItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/recordings/{callRecording%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property recordings for communications + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The recordings of an online meeting. Read-only. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of call_recording + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallRecording.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property recordings in communications + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of call_recording + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallRecording.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property recordings for communications + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The recordings of an online meeting. Read-only. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property recordings in communications + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a call_recording_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CallRecordingItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The recordings of an online meeting. Read-only. + class CallRecordingItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar/calendar_view/item/instances/item/attachments/attachments.rb b/lib/communications/online_meetings/item/recordings/item/content/content.rb similarity index 100% rename from lib/groups/item/calendar/calendar_view/item/instances/item/attachments/attachments.rb rename to lib/communications/online_meetings/item/recordings/item/content/content.rb diff --git a/lib/communications/online_meetings/item/recordings/item/content/content_request_builder.rb b/lib/communications/online_meetings/item/recordings/item/content/content_request_builder.rb new file mode 100644 index 0000000000..c2fbc49ec0 --- /dev/null +++ b/lib/communications/online_meetings/item/recordings/item/content/content_request_builder.rb @@ -0,0 +1,143 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/call_recording' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../communications' +require_relative '../../../../online_meetings' +require_relative '../../../item' +require_relative '../../recordings' +require_relative '../item' +require_relative './content' + +module MicrosoftGraph + module Communications + module OnlineMeetings + module Item + module Recordings + module Item + module Content + ## + # Provides operations to manage the media for the cloudCommunications entity. + class ContentRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new ContentRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/recordings/{callRecording%2Did}/content") + end + ## + ## The content of the recording. Read-only. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The content of the recording. Read-only. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of binary + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, Binary, error_mapping) + end + ## + ## The content of the recording. Read-only. + ## @param body Binary request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of call_recording + ## + def put(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_put_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallRecording.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The content of the recording. Read-only. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The content of the recording. Read-only. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') + return request_info + end + ## + ## The content of the recording. Read-only. + ## @param body Binary request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_put_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/octet-stream', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PUT + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a content_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContentRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar/calendar_view/item/instances/item/extensions/item/item.rb b/lib/communications/online_meetings/item/recordings/item/item.rb similarity index 100% rename from lib/groups/item/calendar/calendar_view/item/instances/item/extensions/item/item.rb rename to lib/communications/online_meetings/item/recordings/item/item.rb diff --git a/lib/groups/item/calendar/calendar_view/item/instances/item/calendar/calendar.rb b/lib/communications/online_meetings/item/recordings/recordings.rb similarity index 100% rename from lib/groups/item/calendar/calendar_view/item/instances/item/calendar/calendar.rb rename to lib/communications/online_meetings/item/recordings/recordings.rb diff --git a/lib/communications/online_meetings/item/recordings/recordings_request_builder.rb b/lib/communications/online_meetings/item/recordings/recordings_request_builder.rb new file mode 100644 index 0000000000..c060e5e90e --- /dev/null +++ b/lib/communications/online_meetings/item/recordings/recordings_request_builder.rb @@ -0,0 +1,191 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/call_recording' +require_relative '../../../../models/call_recording_collection_response' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../communications' +require_relative '../../online_meetings' +require_relative '../item' +require_relative './count/count_request_builder' +require_relative './delta/delta_request_builder' +require_relative './item/call_recording_item_request_builder' +require_relative './recordings' + +module MicrosoftGraph + module Communications + module OnlineMeetings + module Item + module Recordings + ## + # Provides operations to manage the recordings property of the microsoft.graph.onlineMeeting entity. + class RecordingsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::Communications::OnlineMeetings::Item::Recordings::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to call the delta method. + def delta() + return MicrosoftGraph::Communications::OnlineMeetings::Item::Recordings::Delta::DeltaRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the recordings property of the microsoft.graph.onlineMeeting entity. + ## @param call_recording_id The unique identifier of callRecording + ## @return a call_recording_item_request_builder + ## + def by_call_recording_id(call_recording_id) + raise StandardError, 'call_recording_id cannot be null' if call_recording_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["callRecording%2Did"] = call_recording_id + return MicrosoftGraph::Communications::OnlineMeetings::Item::Recordings::Item::CallRecordingItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new RecordingsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/recordings{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The recordings of an online meeting. Read-only. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of call_recording_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallRecordingCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to recordings for communications + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of call_recording + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallRecording.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The recordings of an online meeting. Read-only. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to recordings for communications + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a recordings_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RecordingsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The recordings of an online meeting. Read-only. + class RecordingsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/communications/online_meetings/item/send_virtual_appointment_reminder_sms/send_virtual_appointment_reminder_sms.rb b/lib/communications/online_meetings/item/send_virtual_appointment_reminder_sms/send_virtual_appointment_reminder_sms.rb new file mode 100644 index 0000000000..e1aec549c7 --- /dev/null +++ b/lib/communications/online_meetings/item/send_virtual_appointment_reminder_sms/send_virtual_appointment_reminder_sms.rb @@ -0,0 +1 @@ +require_relative 'send_virtual_appointment_reminder_sms_post_request_body' diff --git a/lib/communications/online_meetings/item/send_virtual_appointment_reminder_sms/send_virtual_appointment_reminder_sms_post_request_body.rb b/lib/communications/online_meetings/item/send_virtual_appointment_reminder_sms/send_virtual_appointment_reminder_sms_post_request_body.rb new file mode 100644 index 0000000000..44b7848813 --- /dev/null +++ b/lib/communications/online_meetings/item/send_virtual_appointment_reminder_sms/send_virtual_appointment_reminder_sms_post_request_body.rb @@ -0,0 +1,113 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/attendee_notification_info' +require_relative '../../../../models/remind_before_time_in_minutes_type' +require_relative '../../../communications' +require_relative '../../online_meetings' +require_relative '../item' +require_relative './send_virtual_appointment_reminder_sms' + +module MicrosoftGraph + module Communications + module OnlineMeetings + module Item + module SendVirtualAppointmentReminderSms + class SendVirtualAppointmentReminderSmsPostRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The attendees property + @attendees + ## + # The remindBeforeTimeInMinutesType property + @remind_before_time_in_minutes_type + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Gets the attendees property value. The attendees property + ## @return a attendee_notification_info + ## + def attendees + return @attendees + end + ## + ## Sets the attendees property value. The attendees property + ## @param value Value to set for the attendees property. + ## @return a void + ## + def attendees=(value) + @attendees = value + end + ## + ## Instantiates a new SendVirtualAppointmentReminderSmsPostRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a send_virtual_appointment_reminder_sms_post_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return SendVirtualAppointmentReminderSmsPostRequestBody.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "attendees" => lambda {|n| @attendees = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AttendeeNotificationInfo.create_from_discriminator_value(pn) }) }, + "remindBeforeTimeInMinutesType" => lambda {|n| @remind_before_time_in_minutes_type = n.get_enum_value(MicrosoftGraph::Models::RemindBeforeTimeInMinutesType) }, + } + end + ## + ## Gets the remindBeforeTimeInMinutesType property value. The remindBeforeTimeInMinutesType property + ## @return a remind_before_time_in_minutes_type + ## + def remind_before_time_in_minutes_type + return @remind_before_time_in_minutes_type + end + ## + ## Sets the remindBeforeTimeInMinutesType property value. The remindBeforeTimeInMinutesType property + ## @param value Value to set for the remindBeforeTimeInMinutesType property. + ## @return a void + ## + def remind_before_time_in_minutes_type=(value) + @remind_before_time_in_minutes_type = value + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_collection_of_object_values("attendees", @attendees) + writer.write_enum_value("remindBeforeTimeInMinutesType", @remind_before_time_in_minutes_type) + writer.write_additional_data(@additional_data) + end + end + end + end + end + end +end diff --git a/lib/communications/online_meetings/item/send_virtual_appointment_reminder_sms/send_virtual_appointment_reminder_sms_request_builder.rb b/lib/communications/online_meetings/item/send_virtual_appointment_reminder_sms/send_virtual_appointment_reminder_sms_request_builder.rb new file mode 100644 index 0000000000..0e2f8c5769 --- /dev/null +++ b/lib/communications/online_meetings/item/send_virtual_appointment_reminder_sms/send_virtual_appointment_reminder_sms_request_builder.rb @@ -0,0 +1,76 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../communications' +require_relative '../../online_meetings' +require_relative '../item' +require_relative './send_virtual_appointment_reminder_sms' + +module MicrosoftGraph + module Communications + module OnlineMeetings + module Item + module SendVirtualAppointmentReminderSms + ## + # Provides operations to call the sendVirtualAppointmentReminderSms method. + class SendVirtualAppointmentReminderSmsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new SendVirtualAppointmentReminderSmsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/sendVirtualAppointmentReminderSms") + end + ## + ## Send an SMS reminder to external attendees for a Teams virtual appointment. This feature requires Teams premium and attendees must have a valid United States phone number to receive SMS notifications. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Send an SMS reminder to external attendees for a Teams virtual appointment. This feature requires Teams premium and attendees must have a valid United States phone number to receive SMS notifications. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a send_virtual_appointment_reminder_sms_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SendVirtualAppointmentReminderSmsRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end +end diff --git a/lib/communications/online_meetings/item/send_virtual_appointment_sms/send_virtual_appointment_sms.rb b/lib/communications/online_meetings/item/send_virtual_appointment_sms/send_virtual_appointment_sms.rb new file mode 100644 index 0000000000..830a73138b --- /dev/null +++ b/lib/communications/online_meetings/item/send_virtual_appointment_sms/send_virtual_appointment_sms.rb @@ -0,0 +1 @@ +require_relative 'send_virtual_appointment_sms_post_request_body' diff --git a/lib/communications/online_meetings/item/send_virtual_appointment_sms/send_virtual_appointment_sms_post_request_body.rb b/lib/communications/online_meetings/item/send_virtual_appointment_sms/send_virtual_appointment_sms_post_request_body.rb new file mode 100644 index 0000000000..e8ac0c9eed --- /dev/null +++ b/lib/communications/online_meetings/item/send_virtual_appointment_sms/send_virtual_appointment_sms_post_request_body.rb @@ -0,0 +1,113 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/attendee_notification_info' +require_relative '../../../../models/virtual_appointment_message_type' +require_relative '../../../communications' +require_relative '../../online_meetings' +require_relative '../item' +require_relative './send_virtual_appointment_sms' + +module MicrosoftGraph + module Communications + module OnlineMeetings + module Item + module SendVirtualAppointmentSms + class SendVirtualAppointmentSmsPostRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The attendees property + @attendees + ## + # The messageType property + @message_type + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Gets the attendees property value. The attendees property + ## @return a attendee_notification_info + ## + def attendees + return @attendees + end + ## + ## Sets the attendees property value. The attendees property + ## @param value Value to set for the attendees property. + ## @return a void + ## + def attendees=(value) + @attendees = value + end + ## + ## Instantiates a new SendVirtualAppointmentSmsPostRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a send_virtual_appointment_sms_post_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return SendVirtualAppointmentSmsPostRequestBody.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "attendees" => lambda {|n| @attendees = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AttendeeNotificationInfo.create_from_discriminator_value(pn) }) }, + "messageType" => lambda {|n| @message_type = n.get_enum_value(MicrosoftGraph::Models::VirtualAppointmentMessageType) }, + } + end + ## + ## Gets the messageType property value. The messageType property + ## @return a virtual_appointment_message_type + ## + def message_type + return @message_type + end + ## + ## Sets the messageType property value. The messageType property + ## @param value Value to set for the messageType property. + ## @return a void + ## + def message_type=(value) + @message_type = value + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_collection_of_object_values("attendees", @attendees) + writer.write_enum_value("messageType", @message_type) + writer.write_additional_data(@additional_data) + end + end + end + end + end + end +end diff --git a/lib/communications/online_meetings/item/send_virtual_appointment_sms/send_virtual_appointment_sms_request_builder.rb b/lib/communications/online_meetings/item/send_virtual_appointment_sms/send_virtual_appointment_sms_request_builder.rb new file mode 100644 index 0000000000..acd6ab6bbf --- /dev/null +++ b/lib/communications/online_meetings/item/send_virtual_appointment_sms/send_virtual_appointment_sms_request_builder.rb @@ -0,0 +1,76 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../communications' +require_relative '../../online_meetings' +require_relative '../item' +require_relative './send_virtual_appointment_sms' + +module MicrosoftGraph + module Communications + module OnlineMeetings + module Item + module SendVirtualAppointmentSms + ## + # Provides operations to call the sendVirtualAppointmentSms method. + class SendVirtualAppointmentSmsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new SendVirtualAppointmentSmsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/sendVirtualAppointmentSms") + end + ## + ## Send an SMS notification to external attendees when a Teams virtual appointment is confirmed, rescheduled, or canceled. This feature requires Teams premium. Attendees must have a valid United States phone number to receive these SMS notifications. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Send an SMS notification to external attendees when a Teams virtual appointment is confirmed, rescheduled, or canceled. This feature requires Teams premium. Attendees must have a valid United States phone number to receive these SMS notifications. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a send_virtual_appointment_sms_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SendVirtualAppointmentSmsRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar/events/item/instances/count/count.rb b/lib/communications/online_meetings/item/transcripts/count/count.rb similarity index 100% rename from lib/groups/item/calendar/events/item/instances/count/count.rb rename to lib/communications/online_meetings/item/transcripts/count/count.rb diff --git a/lib/communications/online_meetings/item/transcripts/count/count_request_builder.rb b/lib/communications/online_meetings/item/transcripts/count/count_request_builder.rb new file mode 100644 index 0000000000..72ee48b8e3 --- /dev/null +++ b/lib/communications/online_meetings/item/transcripts/count/count_request_builder.rb @@ -0,0 +1,103 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../communications' +require_relative '../../../online_meetings' +require_relative '../../item' +require_relative '../transcripts' +require_relative './count' + +module MicrosoftGraph + module Communications + module OnlineMeetings + module Item + module Transcripts + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/transcripts/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/communications/online_meetings/item/transcripts/delta/delta.rb b/lib/communications/online_meetings/item/transcripts/delta/delta.rb new file mode 100644 index 0000000000..8a3dc08b72 --- /dev/null +++ b/lib/communications/online_meetings/item/transcripts/delta/delta.rb @@ -0,0 +1 @@ +require_relative 'delta_get_response' diff --git a/lib/communications/online_meetings/item/transcripts/delta/delta_get_response.rb b/lib/communications/online_meetings/item/transcripts/delta/delta_get_response.rb new file mode 100644 index 0000000000..901ef99be0 --- /dev/null +++ b/lib/communications/online_meetings/item/transcripts/delta/delta_get_response.rb @@ -0,0 +1,78 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/base_delta_function_response' +require_relative '../../../../../models/call_transcript' +require_relative '../../../../communications' +require_relative '../../../online_meetings' +require_relative '../../item' +require_relative '../transcripts' +require_relative './delta' + +module MicrosoftGraph + module Communications + module OnlineMeetings + module Item + module Transcripts + module Delta + class DeltaGetResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new DeltaGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a delta_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return DeltaGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::CallTranscript.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a call_transcript + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end + end +end diff --git a/lib/communications/online_meetings/item/transcripts/delta/delta_request_builder.rb b/lib/communications/online_meetings/item/transcripts/delta/delta_request_builder.rb new file mode 100644 index 0000000000..12af82031c --- /dev/null +++ b/lib/communications/online_meetings/item/transcripts/delta/delta_request_builder.rb @@ -0,0 +1,133 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../communications' +require_relative '../../../online_meetings' +require_relative '../../item' +require_relative '../transcripts' +require_relative './delta' + +module MicrosoftGraph + module Communications + module OnlineMeetings + module Item + module Transcripts + module Delta + ## + # Provides operations to call the delta method. + class DeltaRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new DeltaRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/transcripts/delta(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Invoke function delta + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of delta_get_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Communications::OnlineMeetings::Item::Transcripts::Delta::DeltaGetResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Invoke function delta + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a delta_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeltaRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Invoke function delta + class DeltaRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/communications/online_meetings/item/transcripts/item/call_transcript_item_request_builder.rb b/lib/communications/online_meetings/item/transcripts/item/call_transcript_item_request_builder.rb new file mode 100644 index 0000000000..488bf7c8fe --- /dev/null +++ b/lib/communications/online_meetings/item/transcripts/item/call_transcript_item_request_builder.rb @@ -0,0 +1,181 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/call_transcript' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../communications' +require_relative '../../../online_meetings' +require_relative '../../item' +require_relative '../transcripts' +require_relative './content/content_request_builder' +require_relative './item' +require_relative './metadata_content/metadata_content_request_builder' + +module MicrosoftGraph + module Communications + module OnlineMeetings + module Item + module Transcripts + module Item + ## + # Provides operations to manage the transcripts property of the microsoft.graph.onlineMeeting entity. + class CallTranscriptItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the media for the cloudCommunications entity. + def content() + return MicrosoftGraph::Communications::OnlineMeetings::Item::Transcripts::Item::Content::ContentRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the media for the cloudCommunications entity. + def metadata_content() + return MicrosoftGraph::Communications::OnlineMeetings::Item::Transcripts::Item::MetadataContent::MetadataContentRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new CallTranscriptItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/transcripts/{callTranscript%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property transcripts for communications + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The transcripts of an online meeting. Read-only. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of call_transcript + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallTranscript.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property transcripts in communications + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of call_transcript + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallTranscript.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property transcripts for communications + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The transcripts of an online meeting. Read-only. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property transcripts in communications + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a call_transcript_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CallTranscriptItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The transcripts of an online meeting. Read-only. + class CallTranscriptItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder.rb b/lib/communications/online_meetings/item/transcripts/item/content/content.rb similarity index 100% rename from lib/groups/item/calendar/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder.rb rename to lib/communications/online_meetings/item/transcripts/item/content/content.rb diff --git a/lib/communications/online_meetings/item/transcripts/item/content/content_request_builder.rb b/lib/communications/online_meetings/item/transcripts/item/content/content_request_builder.rb new file mode 100644 index 0000000000..77a732e567 --- /dev/null +++ b/lib/communications/online_meetings/item/transcripts/item/content/content_request_builder.rb @@ -0,0 +1,143 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/call_transcript' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../communications' +require_relative '../../../../online_meetings' +require_relative '../../../item' +require_relative '../../transcripts' +require_relative '../item' +require_relative './content' + +module MicrosoftGraph + module Communications + module OnlineMeetings + module Item + module Transcripts + module Item + module Content + ## + # Provides operations to manage the media for the cloudCommunications entity. + class ContentRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new ContentRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/transcripts/{callTranscript%2Did}/content") + end + ## + ## The content of the transcript. Read-only. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The content of the transcript. Read-only. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of binary + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, Binary, error_mapping) + end + ## + ## The content of the transcript. Read-only. + ## @param body Binary request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of call_transcript + ## + def put(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_put_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallTranscript.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The content of the transcript. Read-only. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The content of the transcript. Read-only. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') + return request_info + end + ## + ## The content of the transcript. Read-only. + ## @param body Binary request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_put_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/octet-stream', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PUT + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a content_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContentRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar/calendar_view/item/instances/item/item.rb b/lib/communications/online_meetings/item/transcripts/item/item.rb similarity index 100% rename from lib/groups/item/calendar/calendar_view/item/instances/item/item.rb rename to lib/communications/online_meetings/item/transcripts/item/item.rb diff --git a/lib/groups/item/calendar/calendar_view/item/instances/item/extensions/extensions.rb b/lib/communications/online_meetings/item/transcripts/item/metadata_content/metadata_content.rb similarity index 100% rename from lib/groups/item/calendar/calendar_view/item/instances/item/extensions/extensions.rb rename to lib/communications/online_meetings/item/transcripts/item/metadata_content/metadata_content.rb diff --git a/lib/communications/online_meetings/item/transcripts/item/metadata_content/metadata_content_request_builder.rb b/lib/communications/online_meetings/item/transcripts/item/metadata_content/metadata_content_request_builder.rb new file mode 100644 index 0000000000..051706b0ac --- /dev/null +++ b/lib/communications/online_meetings/item/transcripts/item/metadata_content/metadata_content_request_builder.rb @@ -0,0 +1,142 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../communications' +require_relative '../../../../online_meetings' +require_relative '../../../item' +require_relative '../../transcripts' +require_relative '../item' +require_relative './metadata_content' + +module MicrosoftGraph + module Communications + module OnlineMeetings + module Item + module Transcripts + module Item + module MetadataContent + ## + # Provides operations to manage the media for the cloudCommunications entity. + class MetadataContentRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MetadataContentRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/transcripts/{callTranscript%2Did}/metadataContent") + end + ## + ## The time-aligned metadata of the utterances in the transcript. Read-only. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The time-aligned metadata of the utterances in the transcript. Read-only. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of binary + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, Binary, error_mapping) + end + ## + ## The time-aligned metadata of the utterances in the transcript. Read-only. + ## @param body Binary request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of binary + ## + def put(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_put_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, Binary, error_mapping) + end + ## + ## The time-aligned metadata of the utterances in the transcript. Read-only. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The time-aligned metadata of the utterances in the transcript. Read-only. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') + return request_info + end + ## + ## The time-aligned metadata of the utterances in the transcript. Read-only. + ## @param body Binary request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_put_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/octet-stream', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PUT + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a metadata_content_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MetadataContentRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar/calendar_view/item/item.rb b/lib/communications/online_meetings/item/transcripts/transcripts.rb similarity index 100% rename from lib/groups/item/calendar/calendar_view/item/item.rb rename to lib/communications/online_meetings/item/transcripts/transcripts.rb diff --git a/lib/communications/online_meetings/item/transcripts/transcripts_request_builder.rb b/lib/communications/online_meetings/item/transcripts/transcripts_request_builder.rb new file mode 100644 index 0000000000..b9b30d007a --- /dev/null +++ b/lib/communications/online_meetings/item/transcripts/transcripts_request_builder.rb @@ -0,0 +1,191 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/call_transcript' +require_relative '../../../../models/call_transcript_collection_response' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../communications' +require_relative '../../online_meetings' +require_relative '../item' +require_relative './count/count_request_builder' +require_relative './delta/delta_request_builder' +require_relative './item/call_transcript_item_request_builder' +require_relative './transcripts' + +module MicrosoftGraph + module Communications + module OnlineMeetings + module Item + module Transcripts + ## + # Provides operations to manage the transcripts property of the microsoft.graph.onlineMeeting entity. + class TranscriptsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::Communications::OnlineMeetings::Item::Transcripts::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to call the delta method. + def delta() + return MicrosoftGraph::Communications::OnlineMeetings::Item::Transcripts::Delta::DeltaRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the transcripts property of the microsoft.graph.onlineMeeting entity. + ## @param call_transcript_id The unique identifier of callTranscript + ## @return a call_transcript_item_request_builder + ## + def by_call_transcript_id(call_transcript_id) + raise StandardError, 'call_transcript_id cannot be null' if call_transcript_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["callTranscript%2Did"] = call_transcript_id + return MicrosoftGraph::Communications::OnlineMeetings::Item::Transcripts::Item::CallTranscriptItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new TranscriptsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings/{onlineMeeting%2Did}/transcripts{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The transcripts of an online meeting. Read-only. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of call_transcript_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallTranscriptCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to transcripts for communications + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of call_transcript + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallTranscript.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The transcripts of an online meeting. Read-only. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to transcripts for communications + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a transcripts_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TranscriptsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The transcripts of an online meeting. Read-only. + class TranscriptsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/communications/online_meetings/online_meetings_request_builder.rb b/lib/communications/online_meetings/online_meetings_request_builder.rb index 6d05f7ff6f..7d0110d9b5 100644 --- a/lib/communications/online_meetings/online_meetings_request_builder.rb +++ b/lib/communications/online_meetings/online_meetings_request_builder.rb @@ -6,6 +6,8 @@ require_relative '../communications' require_relative './count/count_request_builder' require_relative './create_or_get/create_or_get_request_builder' +require_relative './i056e0011aad1cfd99d94f2d6b75f21d85f8b7cfe3c3983a69234033a5ffcd08b/e61b2d5484df5c99782598f88bad613fa3840c5ed2a29782329c8b045393beae' +require_relative './ibe4c23e921ad9fcaa5c959c34e393ba839c959ee578ec95fd69bc2d9aa0b2597/93b7daca5be018c77b93b12567ae342e4db62833cf6672535af71a36cfe6bba1' require_relative './item/online_meeting_item_request_builder' require_relative './online_meetings' @@ -27,6 +29,16 @@ def create_or_get() return MicrosoftGraph::Communications::OnlineMeetings::CreateOrGet::CreateOrGetRequestBuilder.new(@path_parameters, @request_adapter) end ## + # Provides operations to call the getAllRecordings method. + def get_all_recordingsmeeting_organizer_user_id_meeting_organizer_user_id_with_start_date_time_with_end_date_time() + return MicrosoftGraph::Communications::OnlineMeetings::Ibe4c23e921ad9fcaa5c959c34e393ba839c959ee578ec95fd69bc2d9aa0b2597::GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to call the getAllTranscripts method. + def get_all_transcriptsmeeting_organizer_user_id_meeting_organizer_user_id_with_start_date_time_with_end_date_time() + return MicrosoftGraph::Communications::OnlineMeetings::I056e0011aad1cfd99d94f2d6b75f21d85f8b7cfe3c3983a69234033a5ffcd08b::GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeRequestBuilder.new(@path_parameters, @request_adapter) + end + ## ## Provides operations to manage the onlineMeetings property of the microsoft.graph.cloudCommunications entity. ## @param online_meeting_id The unique identifier of onlineMeeting ## @return a online_meeting_item_request_builder @@ -44,10 +56,10 @@ def by_online_meeting_id(online_meeting_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/communications/onlineMeetings{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report is an online meeting artifact. For details, see Online meeting artifacts and permissions. + ## Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report (deprecated) and Teams live event recordings (deprecated) are online meeting artifacts. For more information, see Online meeting artifacts and permissions. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of online_meeting_collection_response ## @@ -56,8 +68,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::OnlineMeetingCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -72,26 +83,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::OnlineMeeting.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report is an online meeting artifact. For details, see Online meeting artifacts and permissions. + ## Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report (deprecated) and Teams live event recordings (deprecated) are online meeting artifacts. For more information, see Online meeting artifacts and permissions. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -103,20 +113,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a online_meetings_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return OnlineMeetingsRequestBuilder.new(raw_url, @request_adapter) + end ## - # Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report is an online meeting artifact. For details, see Online meeting artifacts and permissions. + # Retrieve the properties and relationships of an onlineMeeting object. For example, you can: Teams live event attendee report (deprecated) and Teams live event recordings (deprecated) are online meeting artifacts. For more information, see Online meeting artifacts and permissions. class OnlineMeetingsRequestBuilderGetQueryParameters ## diff --git a/lib/communications/presences/count/count_request_builder.rb b/lib/communications/presences/count/count_request_builder.rb index 298d243160..6729e1af55 100644 --- a/lib/communications/presences/count/count_request_builder.rb +++ b/lib/communications/presences/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/presences/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/communications/presences/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/communications/presences/item/clear_presence/clear_presence_post_request_body.rb b/lib/communications/presences/item/clear_presence/clear_presence_post_request_body.rb index aa03e2fee0..87160f1772 100644 --- a/lib/communications/presences/item/clear_presence/clear_presence_post_request_body.rb +++ b/lib/communications/presences/item/clear_presence/clear_presence_post_request_body.rb @@ -19,22 +19,22 @@ class ClearPresencePostRequestBody # The sessionId property @session_id ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new clearPresencePostRequestBody and sets the default values. + ## Instantiates a new ClearPresencePostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/communications/presences/item/clear_presence/clear_presence_request_builder.rb b/lib/communications/presences/item/clear_presence/clear_presence_request_builder.rb index a21dbed23e..26e6845703 100644 --- a/lib/communications/presences/item/clear_presence/clear_presence_request_builder.rb +++ b/lib/communications/presences/item/clear_presence/clear_presence_request_builder.rb @@ -36,8 +36,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a clear_presence_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ClearPresenceRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/presences/item/clear_user_preferred_presence/clear_user_preferred_presence_request_builder.rb b/lib/communications/presences/item/clear_user_preferred_presence/clear_user_preferred_presence_request_builder.rb index 133b0f6018..73e8552b6e 100644 --- a/lib/communications/presences/item/clear_user_preferred_presence/clear_user_preferred_presence_request_builder.rb +++ b/lib/communications/presences/item/clear_user_preferred_presence/clear_user_preferred_presence_request_builder.rb @@ -34,8 +34,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,15 +44,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a clear_user_preferred_presence_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ClearUserPreferredPresenceRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/presences/item/presence_item_request_builder.rb b/lib/communications/presences/item/presence_item_request_builder.rb index 60a1354eff..895ae5c18a 100644 --- a/lib/communications/presences/item/presence_item_request_builder.rb +++ b/lib/communications/presences/item/presence_item_request_builder.rb @@ -8,6 +8,7 @@ require_relative './clear_user_preferred_presence/clear_user_preferred_presence_request_builder' require_relative './item' require_relative './set_presence/set_presence_request_builder' +require_relative './set_status_message/set_status_message_request_builder' require_relative './set_user_preferred_presence/set_user_preferred_presence_request_builder' module MicrosoftGraph @@ -34,6 +35,11 @@ def set_presence() return MicrosoftGraph::Communications::Presences::Item::SetPresence::SetPresenceRequestBuilder.new(@path_parameters, @request_adapter) end ## + # Provides operations to call the setStatusMessage method. + def set_status_message() + return MicrosoftGraph::Communications::Presences::Item::SetStatusMessage::SetStatusMessageRequestBuilder.new(@path_parameters, @request_adapter) + end + ## # Provides operations to call the setUserPreferredPresence method. def set_user_preferred_presence() return MicrosoftGraph::Communications::Presences::Item::SetUserPreferredPresence::SetUserPreferredPresenceRequestBuilder.new(@path_parameters, @request_adapter) @@ -45,7 +51,7 @@ def set_user_preferred_presence() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/presences/{presence%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/communications/presences/{presence%2Did}{?%24expand,%24select}") end ## ## Delete navigation property presences for communications @@ -57,8 +63,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -71,8 +76,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Presence.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -87,8 +91,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Presence.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -98,13 +101,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,15 +118,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -134,17 +138,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a presence_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return PresenceItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Get a user's presence information. diff --git a/lib/communications/presences/item/set_presence/set_presence_post_request_body.rb b/lib/communications/presences/item/set_presence/set_presence_post_request_body.rb index a44d81b473..5c018ca9d9 100644 --- a/lib/communications/presences/item/set_presence/set_presence_post_request_body.rb +++ b/lib/communications/presences/item/set_presence/set_presence_post_request_body.rb @@ -43,15 +43,15 @@ def activity=(value) @activity = value end ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -73,7 +73,7 @@ def availability=(value) @availability = value end ## - ## Instantiates a new setPresencePostRequestBody and sets the default values. + ## Instantiates a new SetPresencePostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/communications/presences/item/set_presence/set_presence_request_builder.rb b/lib/communications/presences/item/set_presence/set_presence_request_builder.rb index 112700f0c1..21c5223f48 100644 --- a/lib/communications/presences/item/set_presence/set_presence_request_builder.rb +++ b/lib/communications/presences/item/set_presence/set_presence_request_builder.rb @@ -36,8 +36,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a set_presence_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SetPresenceRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/presences/item/set_status_message/set_status_message.rb b/lib/communications/presences/item/set_status_message/set_status_message.rb new file mode 100644 index 0000000000..e929ed6192 --- /dev/null +++ b/lib/communications/presences/item/set_status_message/set_status_message.rb @@ -0,0 +1 @@ +require_relative 'set_status_message_post_request_body' diff --git a/lib/communications/presences/item/set_status_message/set_status_message_post_request_body.rb b/lib/communications/presences/item/set_status_message/set_status_message_post_request_body.rb new file mode 100644 index 0000000000..a5b10f8cbe --- /dev/null +++ b/lib/communications/presences/item/set_status_message/set_status_message_post_request_body.rb @@ -0,0 +1,92 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/presence_status_message' +require_relative '../../../communications' +require_relative '../../presences' +require_relative '../item' +require_relative './set_status_message' + +module MicrosoftGraph + module Communications + module Presences + module Item + module SetStatusMessage + class SetStatusMessagePostRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The statusMessage property + @status_message + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new SetStatusMessagePostRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a set_status_message_post_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return SetStatusMessagePostRequestBody.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "statusMessage" => lambda {|n| @status_message = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::PresenceStatusMessage.create_from_discriminator_value(pn) }) }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_object_value("statusMessage", @status_message) + writer.write_additional_data(@additional_data) + end + ## + ## Gets the statusMessage property value. The statusMessage property + ## @return a presence_status_message + ## + def status_message + return @status_message + end + ## + ## Sets the statusMessage property value. The statusMessage property + ## @param value Value to set for the statusMessage property. + ## @return a void + ## + def status_message=(value) + @status_message = value + end + end + end + end + end + end +end diff --git a/lib/communications/presences/item/set_status_message/set_status_message_request_builder.rb b/lib/communications/presences/item/set_status_message/set_status_message_request_builder.rb new file mode 100644 index 0000000000..55a94b8b6a --- /dev/null +++ b/lib/communications/presences/item/set_status_message/set_status_message_request_builder.rb @@ -0,0 +1,76 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../communications' +require_relative '../../presences' +require_relative '../item' +require_relative './set_status_message' + +module MicrosoftGraph + module Communications + module Presences + module Item + module SetStatusMessage + ## + # Provides operations to call the setStatusMessage method. + class SetStatusMessageRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new SetStatusMessageRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/communications/presences/{presence%2Did}/setStatusMessage") + end + ## + ## Set a presence status message for a user. An optional expiration date and time can be supplied. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Set a presence status message for a user. An optional expiration date and time can be supplied. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a set_status_message_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SetStatusMessageRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end +end diff --git a/lib/communications/presences/item/set_user_preferred_presence/set_user_preferred_presence_post_request_body.rb b/lib/communications/presences/item/set_user_preferred_presence/set_user_preferred_presence_post_request_body.rb index 1f34e07214..7626069952 100644 --- a/lib/communications/presences/item/set_user_preferred_presence/set_user_preferred_presence_post_request_body.rb +++ b/lib/communications/presences/item/set_user_preferred_presence/set_user_preferred_presence_post_request_body.rb @@ -40,15 +40,15 @@ def activity=(value) @activity = value end ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -70,7 +70,7 @@ def availability=(value) @availability = value end ## - ## Instantiates a new setUserPreferredPresencePostRequestBody and sets the default values. + ## Instantiates a new SetUserPreferredPresencePostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/communications/presences/item/set_user_preferred_presence/set_user_preferred_presence_request_builder.rb b/lib/communications/presences/item/set_user_preferred_presence/set_user_preferred_presence_request_builder.rb index 1060063179..566dd685ca 100644 --- a/lib/communications/presences/item/set_user_preferred_presence/set_user_preferred_presence_request_builder.rb +++ b/lib/communications/presences/item/set_user_preferred_presence/set_user_preferred_presence_request_builder.rb @@ -36,8 +36,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a set_user_preferred_presence_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SetUserPreferredPresenceRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/communications/presences/presences_request_builder.rb b/lib/communications/presences/presences_request_builder.rb index 91c5b4aa9d..87763455fd 100644 --- a/lib/communications/presences/presences_request_builder.rb +++ b/lib/communications/presences/presences_request_builder.rb @@ -38,7 +38,7 @@ def by_presence_id(presence_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/communications/presences{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/communications/presences{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get a user's presence information. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::PresenceCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Presence.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a presences_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return PresencesRequestBuilder.new(raw_url, @request_adapter) + end ## # Get a user's presence information. diff --git a/lib/compliance/compliance_request_builder.rb b/lib/compliance/compliance_request_builder.rb index 3b114690c8..9547b54b89 100644 --- a/lib/compliance/compliance_request_builder.rb +++ b/lib/compliance/compliance_request_builder.rb @@ -17,7 +17,7 @@ class ComplianceRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/compliance{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/compliance{?%24expand,%24select}") end ## ## Get compliance @@ -29,8 +29,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Compliance.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -45,8 +44,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Compliance.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,15 +54,15 @@ def patch(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -76,17 +74,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a compliance_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ComplianceRequestBuilder.new(raw_url, @request_adapter) + end ## # Get compliance diff --git a/lib/connections/connections_request_builder.rb b/lib/connections/connections_request_builder.rb index 2fda212ced..2116c482c2 100644 --- a/lib/connections/connections_request_builder.rb +++ b/lib/connections/connections_request_builder.rb @@ -36,7 +36,7 @@ def by_external_connection_id(external_connection_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/connections{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/connections{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get entities from connections @@ -48,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsExternalConnectionCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -64,8 +63,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsExternalConnection.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -75,15 +73,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -95,17 +93,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a connections_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ConnectionsRequestBuilder.new(raw_url, @request_adapter) + end ## # Get entities from connections diff --git a/lib/connections/count/count_request_builder.rb b/lib/connections/count/count_request_builder.rb index 3ff0be3659..d46bfd3319 100644 --- a/lib/connections/count/count_request_builder.rb +++ b/lib/connections/count/count_request_builder.rb @@ -18,7 +18,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/connections/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/connections/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -30,8 +30,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -41,17 +40,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/connections/item/external_connection_item_request_builder.rb b/lib/connections/item/external_connection_item_request_builder.rb index 4f7fa3b035..d0bd1e8dbd 100644 --- a/lib/connections/item/external_connection_item_request_builder.rb +++ b/lib/connections/item/external_connection_item_request_builder.rb @@ -43,7 +43,7 @@ def schema() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}{?%24expand,%24select}") end ## ## Delete entity from connections @@ -55,8 +55,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -69,8 +68,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsExternalConnection.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -85,8 +83,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsExternalConnection.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -96,13 +93,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,15 +110,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -132,17 +130,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a external_connection_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ExternalConnectionItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Get entity from connections by key diff --git a/lib/connections/item/groups/count/count_request_builder.rb b/lib/connections/item/groups/count/count_request_builder.rb index 8b29d40272..23d2ec6ca0 100644 --- a/lib/connections/item/groups/count/count_request_builder.rb +++ b/lib/connections/item/groups/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/groups/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/groups/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/connections/item/groups/groups_request_builder.rb b/lib/connections/item/groups/groups_request_builder.rb index edc5d80ceb..2484a00708 100644 --- a/lib/connections/item/groups/groups_request_builder.rb +++ b/lib/connections/item/groups/groups_request_builder.rb @@ -40,10 +40,10 @@ def by_external_group_id(external_group_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/groups{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/groups{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Get an externalGroup object. + ## Get groups from connections ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of external_connectors_external_group_collection_response ## @@ -52,12 +52,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsExternalGroupCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Create a new externalGroup object. + ## Create new navigation property to groups for connections ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of external_connectors_external_group @@ -68,30 +67,29 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsExternalGroup.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Get an externalGroup object. + ## Get groups from connections ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Create a new externalGroup object. + ## Create new navigation property to groups for connections ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -99,20 +97,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a groups_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GroupsRequestBuilder.new(raw_url, @request_adapter) + end ## - # Get an externalGroup object. + # Get groups from connections class GroupsRequestBuilderGetQueryParameters ## diff --git a/lib/connections/item/groups/item/external_group_item_request_builder.rb b/lib/connections/item/groups/item/external_group_item_request_builder.rb index 178607d6f2..dce11721c2 100644 --- a/lib/connections/item/groups/item/external_group_item_request_builder.rb +++ b/lib/connections/item/groups/item/external_group_item_request_builder.rb @@ -29,10 +29,10 @@ def members() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/groups/{externalGroup%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/groups/{externalGroup%2Did}{?%24expand,%24select}") end ## - ## Delete an externalGroup object. + ## Delete navigation property groups for connections ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void ## @@ -41,12 +41,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Get an externalGroup object. + ## Get groups from connections ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of external_connectors_external_group ## @@ -55,12 +54,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsExternalGroup.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Update the properties of an externalGroup object. + ## Update the navigation property groups in connections ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of external_connectors_external_group @@ -71,46 +69,46 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsExternalGroup.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Delete an externalGroup object. + ## Delete navigation property groups for connections ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Get an externalGroup object. + ## Get groups from connections ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Update the properties of an externalGroup object. + ## Update the navigation property groups in connections ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -118,20 +116,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a external_group_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ExternalGroupItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Get an externalGroup object. + # Get groups from connections class ExternalGroupItemRequestBuilderGetQueryParameters ## diff --git a/lib/connections/item/groups/item/members/count/count_request_builder.rb b/lib/connections/item/groups/item/members/count/count_request_builder.rb index 8075554325..eb0c62d8e3 100644 --- a/lib/connections/item/groups/item/members/count/count_request_builder.rb +++ b/lib/connections/item/groups/item/members/count/count_request_builder.rb @@ -26,7 +26,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/groups/{externalGroup%2Did}/members/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/groups/{externalGroup%2Did}/members/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -38,8 +38,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -49,17 +48,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/connections/item/groups/item/members/item/identity_item_request_builder.rb b/lib/connections/item/groups/item/members/item/identity_item_request_builder.rb index 6b87b9f53f..a709d37e48 100644 --- a/lib/connections/item/groups/item/members/item/identity_item_request_builder.rb +++ b/lib/connections/item/groups/item/members/item/identity_item_request_builder.rb @@ -27,10 +27,10 @@ class IdentityItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilde ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/groups/{externalGroup%2Did}/members/{identity%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/groups/{externalGroup%2Did}/members/{identity%2Did}{?%24expand,%24select}") end ## - ## Delete an identity resource to remove the corresponding member from an externalGroup. + ## Delete navigation property members for connections ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void ## @@ -39,12 +39,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## A member added to an externalGroup. You can add Azure Active Directory users, Azure Active Directory groups, or an externalGroup as members. + ## A member added to an externalGroup. You can add Microsoft Entra users, Microsoft Entra groups, or an externalGroup as members. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of external_connectors_identity ## @@ -53,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsIdentity.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -69,42 +67,42 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsIdentity.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Delete an identity resource to remove the corresponding member from an externalGroup. + ## Delete navigation property members for connections ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## A member added to an externalGroup. You can add Azure Active Directory users, Azure Active Directory groups, or an externalGroup as members. + ## A member added to an externalGroup. You can add Microsoft Entra users, Microsoft Entra groups, or an externalGroup as members. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -116,20 +114,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a identity_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return IdentityItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # A member added to an externalGroup. You can add Azure Active Directory users, Azure Active Directory groups, or an externalGroup as members. + # A member added to an externalGroup. You can add Microsoft Entra users, Microsoft Entra groups, or an externalGroup as members. class IdentityItemRequestBuilderGetQueryParameters ## diff --git a/lib/connections/item/groups/item/members/members_request_builder.rb b/lib/connections/item/groups/item/members/members_request_builder.rb index 30135e72ee..b9c6cd4362 100644 --- a/lib/connections/item/groups/item/members/members_request_builder.rb +++ b/lib/connections/item/groups/item/members/members_request_builder.rb @@ -44,10 +44,10 @@ def by_identity_id(identity_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/groups/{externalGroup%2Did}/members{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/groups/{externalGroup%2Did}/members{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## A member added to an externalGroup. You can add Azure Active Directory users, Azure Active Directory groups, or an externalGroup as members. + ## A member added to an externalGroup. You can add Microsoft Entra users, Microsoft Entra groups, or an externalGroup as members. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of external_connectors_identity_collection_response ## @@ -56,12 +56,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsIdentityCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Create an identity resource for a new member in an externalGroup. + ## Create new navigation property to members for connections ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of external_connectors_identity @@ -72,30 +71,29 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsIdentity.create_from_discriminator_value(pn) }, error_mapping) end ## - ## A member added to an externalGroup. You can add Azure Active Directory users, Azure Active Directory groups, or an externalGroup as members. + ## A member added to an externalGroup. You can add Microsoft Entra users, Microsoft Entra groups, or an externalGroup as members. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Create an identity resource for a new member in an externalGroup. + ## Create new navigation property to members for connections ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -103,20 +101,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a members_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MembersRequestBuilder.new(raw_url, @request_adapter) + end ## - # A member added to an externalGroup. You can add Azure Active Directory users, Azure Active Directory groups, or an externalGroup as members. + # A member added to an externalGroup. You can add Microsoft Entra users, Microsoft Entra groups, or an externalGroup as members. class MembersRequestBuilderGetQueryParameters ## diff --git a/lib/connections/item/items/count/count_request_builder.rb b/lib/connections/item/items/count/count_request_builder.rb index f87da6524e..825553c028 100644 --- a/lib/connections/item/items/count/count_request_builder.rb +++ b/lib/connections/item/items/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/items/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/items/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/connections/item/items/item/activities/activities_request_builder.rb b/lib/connections/item/items/item/activities/activities_request_builder.rb index ebcd898e06..04c14e2e03 100644 --- a/lib/connections/item/items/item/activities/activities_request_builder.rb +++ b/lib/connections/item/items/item/activities/activities_request_builder.rb @@ -44,7 +44,7 @@ def by_external_activity_id(external_activity_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/items/{externalItem%2Did}/activities{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/items/{externalItem%2Did}/activities{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Returns a list of activities performed on the item. Write-only. @@ -56,8 +56,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsExternalActivityCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -72,8 +71,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsExternalActivity.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -83,15 +81,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -103,17 +101,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a activities_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ActivitiesRequestBuilder.new(raw_url, @request_adapter) + end ## # Returns a list of activities performed on the item. Write-only. diff --git a/lib/connections/item/items/item/activities/count/count_request_builder.rb b/lib/connections/item/items/item/activities/count/count_request_builder.rb index 89fa77496b..28c1711574 100644 --- a/lib/connections/item/items/item/activities/count/count_request_builder.rb +++ b/lib/connections/item/items/item/activities/count/count_request_builder.rb @@ -26,7 +26,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/items/{externalItem%2Did}/activities/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/items/{externalItem%2Did}/activities/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -38,8 +38,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -49,17 +48,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/connections/item/items/item/activities/item/external_activity_item_request_builder.rb b/lib/connections/item/items/item/activities/item/external_activity_item_request_builder.rb index f223d8660c..f2a0a7afe9 100644 --- a/lib/connections/item/items/item/activities/item/external_activity_item_request_builder.rb +++ b/lib/connections/item/items/item/activities/item/external_activity_item_request_builder.rb @@ -33,7 +33,7 @@ def performed_by() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/items/{externalItem%2Did}/activities/{externalActivity%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/items/{externalItem%2Did}/activities/{externalActivity%2Did}{?%24expand,%24select}") end ## ## Delete navigation property activities for connections @@ -45,8 +45,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -59,8 +58,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsExternalActivity.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -75,8 +73,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsExternalActivity.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -86,13 +83,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -102,15 +100,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -122,17 +120,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a external_activity_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ExternalActivityItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Returns a list of activities performed on the item. Write-only. diff --git a/lib/connections/item/items/item/activities/item/performed_by/performed_by_request_builder.rb b/lib/connections/item/items/item/activities/item/performed_by/performed_by_request_builder.rb index 62e6112190..7d62d60498 100644 --- a/lib/connections/item/items/item/activities/item/performed_by/performed_by_request_builder.rb +++ b/lib/connections/item/items/item/activities/item/performed_by/performed_by_request_builder.rb @@ -29,7 +29,7 @@ class PerformedByRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/items/{externalItem%2Did}/activities/{externalActivity%2Did}/performedBy{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/items/{externalItem%2Did}/activities/{externalActivity%2Did}/performedBy{?%24expand,%24select}") end ## ## Represents an identity used to identify who is responsible for the activity. @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsIdentity.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a performed_by_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return PerformedByRequestBuilder.new(raw_url, @request_adapter) + end ## # Represents an identity used to identify who is responsible for the activity. diff --git a/lib/connections/item/items/item/external_item_item_request_builder.rb b/lib/connections/item/items/item/external_item_item_request_builder.rb index 6f4f33a452..ba58bcd066 100644 --- a/lib/connections/item/items/item/external_item_item_request_builder.rb +++ b/lib/connections/item/items/item/external_item_item_request_builder.rb @@ -35,10 +35,10 @@ def microsoft_graph_external_connectors_add_activities() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/items/{externalItem%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/items/{externalItem%2Did}{?%24expand,%24select}") end ## - ## Delete an externalItem object. + ## Delete navigation property items for connections ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void ## @@ -47,12 +47,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Read the properties and relationships of an externalItem object. + ## Get items from connections ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of external_connectors_external_item ## @@ -61,8 +60,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsExternalItem.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,42 +75,42 @@ def put(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsExternalItem.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Delete an externalItem object. + ## Delete navigation property items for connections ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Read the properties and relationships of an externalItem object. + ## Get items from connections ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -124,20 +122,29 @@ def to_get_request_information(request_configuration=nil) def to_put_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PUT - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PUT + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a external_item_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ExternalItemItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Read the properties and relationships of an externalItem object. + # Get items from connections class ExternalItemItemRequestBuilderGetQueryParameters ## diff --git a/lib/connections/item/items/item/microsoft_graph_external_connectors_add_activities/add_activities_post_request_body.rb b/lib/connections/item/items/item/microsoft_graph_external_connectors_add_activities/add_activities_post_request_body.rb index 4f2f46ce64..759ec72a38 100644 --- a/lib/connections/item/items/item/microsoft_graph_external_connectors_add_activities/add_activities_post_request_body.rb +++ b/lib/connections/item/items/item/microsoft_graph_external_connectors_add_activities/add_activities_post_request_body.rb @@ -37,22 +37,22 @@ def activities=(value) @activities = value end ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new addActivitiesPostRequestBody and sets the default values. + ## Instantiates a new AddActivitiesPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/connections/item/items/item/microsoft_graph_external_connectors_add_activities/add_activities_post_response.rb b/lib/connections/item/items/item/microsoft_graph_external_connectors_add_activities/add_activities_post_response.rb new file mode 100644 index 0000000000..94ea47feaa --- /dev/null +++ b/lib/connections/item/items/item/microsoft_graph_external_connectors_add_activities/add_activities_post_response.rb @@ -0,0 +1,78 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/base_collection_pagination_count_response' +require_relative '../../../../../models/external_connectors_external_activity_result' +require_relative '../../../../connections' +require_relative '../../../item' +require_relative '../../items' +require_relative '../item' +require_relative './microsoft_graph_external_connectors_add_activities' + +module MicrosoftGraph + module Connections + module Item + module Items + module Item + module MicrosoftGraphExternalConnectorsAddActivities + class AddActivitiesPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new AddActivitiesPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a add_activities_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return AddActivitiesPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsExternalActivityResult.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a external_connectors_external_activity_result + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end + end +end diff --git a/lib/connections/item/items/item/microsoft_graph_external_connectors_add_activities/add_activities_response.rb b/lib/connections/item/items/item/microsoft_graph_external_connectors_add_activities/add_activities_response.rb deleted file mode 100644 index 816f34bcb6..0000000000 --- a/lib/connections/item/items/item/microsoft_graph_external_connectors_add_activities/add_activities_response.rb +++ /dev/null @@ -1,78 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../microsoft_graph' -require_relative '../../../../../models/base_collection_pagination_count_response' -require_relative '../../../../../models/external_connectors_external_activity_result' -require_relative '../../../../connections' -require_relative '../../../item' -require_relative '../../items' -require_relative '../item' -require_relative './microsoft_graph_external_connectors_add_activities' - -module MicrosoftGraph - module Connections - module Item - module Items - module Item - module MicrosoftGraphExternalConnectorsAddActivities - class AddActivitiesResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new addActivitiesResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a add_activities_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return AddActivitiesResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsExternalActivityResult.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a external_connectors_external_activity_result - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end - end -end diff --git a/lib/connections/item/items/item/microsoft_graph_external_connectors_add_activities/microsoft_graph_external_connectors_add_activities.rb b/lib/connections/item/items/item/microsoft_graph_external_connectors_add_activities/microsoft_graph_external_connectors_add_activities.rb index dac5da197a..9899615c26 100644 --- a/lib/connections/item/items/item/microsoft_graph_external_connectors_add_activities/microsoft_graph_external_connectors_add_activities.rb +++ b/lib/connections/item/items/item/microsoft_graph_external_connectors_add_activities/microsoft_graph_external_connectors_add_activities.rb @@ -1,2 +1,2 @@ require_relative 'add_activities_post_request_body' -require_relative 'add_activities_response' +require_relative 'add_activities_post_response' diff --git a/lib/connections/item/items/item/microsoft_graph_external_connectors_add_activities/microsoft_graph_external_connectors_add_activities_request_builder.rb b/lib/connections/item/items/item/microsoft_graph_external_connectors_add_activities/microsoft_graph_external_connectors_add_activities_request_builder.rb index ab5fcce076..e2ab5bbb6c 100644 --- a/lib/connections/item/items/item/microsoft_graph_external_connectors_add_activities/microsoft_graph_external_connectors_add_activities_request_builder.rb +++ b/lib/connections/item/items/item/microsoft_graph_external_connectors_add_activities/microsoft_graph_external_connectors_add_activities_request_builder.rb @@ -30,7 +30,7 @@ def initialize(path_parameters, request_adapter) ## Invoke action addActivities ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of add_activities_response + ## @return a Fiber of add_activities_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -38,9 +38,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Connections::Item::Items::Item::MicrosoftGraphExternalConnectorsAddActivities::AddActivitiesResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Connections::Item::Items::Item::MicrosoftGraphExternalConnectorsAddActivities::AddActivitiesPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Invoke action addActivities @@ -51,17 +50,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a microsoft_graph_external_connectors_add_activities_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MicrosoftGraphExternalConnectorsAddActivitiesRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/connections/item/items/items_request_builder.rb b/lib/connections/item/items/items_request_builder.rb index 14c2ffd74d..1a3fe159ba 100644 --- a/lib/connections/item/items/items_request_builder.rb +++ b/lib/connections/item/items/items_request_builder.rb @@ -40,10 +40,10 @@ def by_external_item_id(external_item_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/items{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/items{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Read the properties and relationships of an externalItem object. + ## Get items from connections ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of external_connectors_external_item_collection_response ## @@ -52,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsExternalItemCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -68,26 +67,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsExternalItem.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Read the properties and relationships of an externalItem object. + ## Get items from connections ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -99,20 +97,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a items_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ItemsRequestBuilder.new(raw_url, @request_adapter) + end ## - # Read the properties and relationships of an externalItem object. + # Get items from connections class ItemsRequestBuilderGetQueryParameters ## diff --git a/lib/connections/item/operations/count/count_request_builder.rb b/lib/connections/item/operations/count/count_request_builder.rb index a70cfd473e..1a576ec4eb 100644 --- a/lib/connections/item/operations/count/count_request_builder.rb +++ b/lib/connections/item/operations/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/operations/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/operations/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/connections/item/operations/item/connection_operation_item_request_builder.rb b/lib/connections/item/operations/item/connection_operation_item_request_builder.rb index 77ad2e9981..bd1ae21987 100644 --- a/lib/connections/item/operations/item/connection_operation_item_request_builder.rb +++ b/lib/connections/item/operations/item/connection_operation_item_request_builder.rb @@ -23,7 +23,7 @@ class ConnectionOperationItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRe ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/operations/{connectionOperation%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/operations/{connectionOperation%2Did}{?%24expand,%24select}") end ## ## Delete navigation property operations for connections @@ -35,12 +35,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Read the properties and relationships of a connectionOperation object. + ## Get operations from connections ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of external_connectors_connection_operation ## @@ -49,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsConnectionOperation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -65,8 +63,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsConnectionOperation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,31 +73,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Read the properties and relationships of a connectionOperation object. + ## Get operations from connections ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,20 +110,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a connection_operation_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ConnectionOperationItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Read the properties and relationships of a connectionOperation object. + # Get operations from connections class ConnectionOperationItemRequestBuilderGetQueryParameters ## diff --git a/lib/connections/item/operations/operations_request_builder.rb b/lib/connections/item/operations/operations_request_builder.rb index 0f55110b2c..7c598b6245 100644 --- a/lib/connections/item/operations/operations_request_builder.rb +++ b/lib/connections/item/operations/operations_request_builder.rb @@ -40,10 +40,10 @@ def by_connection_operation_id(connection_operation_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/operations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/operations{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Read the properties and relationships of a connectionOperation object. + ## Get operations from connections ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of external_connectors_connection_operation_collection_response ## @@ -52,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsConnectionOperationCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -68,26 +67,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsConnectionOperation.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Read the properties and relationships of a connectionOperation object. + ## Get operations from connections ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -99,20 +97,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a operations_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return OperationsRequestBuilder.new(raw_url, @request_adapter) + end ## - # Read the properties and relationships of a connectionOperation object. + # Get operations from connections class OperationsRequestBuilderGetQueryParameters ## diff --git a/lib/connections/item/schema/schema_request_builder.rb b/lib/connections/item/schema/schema_request_builder.rb index 69c0c3b053..5fd71b1f09 100644 --- a/lib/connections/item/schema/schema_request_builder.rb +++ b/lib/connections/item/schema/schema_request_builder.rb @@ -21,24 +21,10 @@ class SchemaRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/schema{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/connections/{externalConnection%2Did}/schema{?%24expand,%24select}") end ## - ## Delete navigation property schema for connections - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of void - ## - def delete(request_configuration=nil) - request_info = self.to_delete_request_information( - request_configuration - ) - error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, nil, error_mapping) - end - ## - ## Read the properties and relationships of a schema object. + ## Get schema from connections ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of external_connectors_schema ## @@ -47,8 +33,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsSchema.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,42 +48,25 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsSchema.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Delete navigation property schema for connections + ## Get schema from connections ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## - def to_delete_request_information(request_configuration=nil) + def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end - return request_info - end - ## - ## Read the properties and relationships of a schema object. - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a request_information - ## - def to_get_request_information(request_configuration=nil) - request_info = MicrosoftKiotaAbstractions::RequestInformation.new() request_info.url_template = @url_template request_info.path_parameters = @path_parameters request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') - unless request_configuration.nil? - request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) - request_info.add_request_options(request_configuration.options) - end + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,20 +78,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a schema_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SchemaRequestBuilder.new(raw_url, @request_adapter) + end ## - # Read the properties and relationships of a schema object. + # Get schema from connections class SchemaRequestBuilderGetQueryParameters ## diff --git a/lib/contacts/contacts_request_builder.rb b/lib/contacts/contacts_request_builder.rb index f99a687968..fe02777e21 100644 --- a/lib/contacts/contacts_request_builder.rb +++ b/lib/contacts/contacts_request_builder.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../microsoft_graph' -require_relative '../models/org_contact' require_relative '../models/org_contact_collection_response' require_relative '../models/o_data_errors_o_data_error' require_relative './contacts' @@ -60,7 +59,7 @@ def by_org_contact_id(org_contact_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/contacts{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24top}") end ## ## Get the list of organizational contacts for this organization. @@ -72,63 +71,35 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::OrgContactCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Add new entity to contacts - ## @param body The request body - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of org_contact - ## - def post(body, request_configuration=nil) - raise StandardError, 'body cannot be null' if body.nil? - request_info = self.to_post_request_information( - body, request_configuration - ) - error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::OrgContact.create_from_discriminator_value(pn) }, error_mapping) - end - ## ## Get the list of organizational contacts for this organization. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Add new entity to contacts - ## @param body The request body - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a request_information + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a contacts_request_builder ## - def to_post_request_information(body, request_configuration=nil) - raise StandardError, 'body cannot be null' if body.nil? - request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') - unless request_configuration.nil? - request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) - return request_info + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContactsRequestBuilder.new(raw_url, @request_adapter) end ## @@ -154,9 +125,6 @@ class ContactsRequestBuilderGetQueryParameters # Select properties to be returned attr_accessor :select ## - # Skip the first n items - attr_accessor :skip - ## # Show only the first n items attr_accessor :top ## @@ -179,8 +147,6 @@ def get_query_parameter(original_name) return "%24search" when "select" return "%24select" - when "skip" - return "%24skip" when "top" return "%24top" else diff --git a/lib/contacts/count/count_request_builder.rb b/lib/contacts/count/count_request_builder.rb index f4bffafd0a..bdf0f8ed1d 100644 --- a/lib/contacts/count/count_request_builder.rb +++ b/lib/contacts/count/count_request_builder.rb @@ -18,7 +18,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -30,8 +30,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -41,17 +40,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/contacts/delta/delta.rb b/lib/contacts/delta/delta.rb index 0c348d20cb..8a3dc08b72 100644 --- a/lib/contacts/delta/delta.rb +++ b/lib/contacts/delta/delta.rb @@ -1 +1 @@ -require_relative 'delta_response' +require_relative 'delta_get_response' diff --git a/lib/contacts/delta/delta_get_response.rb b/lib/contacts/delta/delta_get_response.rb new file mode 100644 index 0000000000..8d289ef401 --- /dev/null +++ b/lib/contacts/delta/delta_get_response.rb @@ -0,0 +1,69 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/base_delta_function_response' +require_relative '../../models/org_contact' +require_relative '../contacts' +require_relative './delta' + +module MicrosoftGraph + module Contacts + module Delta + class DeltaGetResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new DeltaGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a delta_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return DeltaGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::OrgContact.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a org_contact + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/contacts/delta/delta_request_builder.rb b/lib/contacts/delta/delta_request_builder.rb index ec1b651935..c520f8222a 100644 --- a/lib/contacts/delta/delta_request_builder.rb +++ b/lib/contacts/delta/delta_request_builder.rb @@ -18,49 +18,60 @@ class DeltaRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/delta(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Invoke function delta + ## Get newly created, updated, or deleted organizational contacts without having to perform a full read of the entire collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of delta_response + ## @return a Fiber of delta_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contacts::Delta::DeltaResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contacts::Delta::DeltaGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Invoke function delta + ## Get newly created, updated, or deleted organizational contacts without having to perform a full read of the entire collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a delta_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeltaRequestBuilder.new(raw_url, @request_adapter) + end ## - # Invoke function delta + # Get newly created, updated, or deleted organizational contacts without having to perform a full read of the entire collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. class DeltaRequestBuilderGetQueryParameters ## # Include count of items attr_accessor :count ## + # Expand related entities + attr_accessor :expand + ## # Filter items by property values attr_accessor :filter ## @@ -88,6 +99,8 @@ def get_query_parameter(original_name) case original_name when "count" return "%24count" + when "expand" + return "%24expand" when "filter" return "%24filter" when "orderby" diff --git a/lib/contacts/delta/delta_response.rb b/lib/contacts/delta/delta_response.rb deleted file mode 100644 index 87640cc3a1..0000000000 --- a/lib/contacts/delta/delta_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../microsoft_graph' -require_relative '../../models/base_delta_function_response' -require_relative '../../models/org_contact' -require_relative '../contacts' -require_relative './delta' - -module MicrosoftGraph - module Contacts - module Delta - class DeltaResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new deltaResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a delta_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return DeltaResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::OrgContact.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a org_contact - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end -end diff --git a/lib/contacts/get_available_extension_properties/get_available_extension_properties.rb b/lib/contacts/get_available_extension_properties/get_available_extension_properties.rb index b6fee576bf..ce1b642cad 100644 --- a/lib/contacts/get_available_extension_properties/get_available_extension_properties.rb +++ b/lib/contacts/get_available_extension_properties/get_available_extension_properties.rb @@ -1,2 +1,2 @@ require_relative 'get_available_extension_properties_post_request_body' -require_relative 'get_available_extension_properties_response' +require_relative 'get_available_extension_properties_post_response' diff --git a/lib/contacts/get_available_extension_properties/get_available_extension_properties_post_request_body.rb b/lib/contacts/get_available_extension_properties/get_available_extension_properties_post_request_body.rb index b5c93c352a..50ed7cf4cd 100644 --- a/lib/contacts/get_available_extension_properties/get_available_extension_properties_post_request_body.rb +++ b/lib/contacts/get_available_extension_properties/get_available_extension_properties_post_request_body.rb @@ -15,22 +15,22 @@ class GetAvailableExtensionPropertiesPostRequestBody # The isSyncedFromOnPremises property @is_synced_from_on_premises ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getAvailableExtensionPropertiesPostRequestBody and sets the default values. + ## Instantiates a new GetAvailableExtensionPropertiesPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/contacts/get_available_extension_properties/get_available_extension_properties_post_response.rb b/lib/contacts/get_available_extension_properties/get_available_extension_properties_post_response.rb new file mode 100644 index 0000000000..8c5ef48779 --- /dev/null +++ b/lib/contacts/get_available_extension_properties/get_available_extension_properties_post_response.rb @@ -0,0 +1,69 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/base_collection_pagination_count_response' +require_relative '../../models/extension_property' +require_relative '../contacts' +require_relative './get_available_extension_properties' + +module MicrosoftGraph + module Contacts + module GetAvailableExtensionProperties + class GetAvailableExtensionPropertiesPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetAvailableExtensionPropertiesPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_available_extension_properties_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetAvailableExtensionPropertiesPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ExtensionProperty.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a extension_property + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/contacts/get_available_extension_properties/get_available_extension_properties_request_builder.rb b/lib/contacts/get_available_extension_properties/get_available_extension_properties_request_builder.rb index f6c112444e..35f5d30bbd 100644 --- a/lib/contacts/get_available_extension_properties/get_available_extension_properties_request_builder.rb +++ b/lib/contacts/get_available_extension_properties/get_available_extension_properties_request_builder.rb @@ -21,10 +21,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/contacts/getAvailableExtensionProperties") end ## - ## Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + ## Return all directory extension definitions that are registered in a directory, including through multitenant apps. The following entities support extension properties: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_available_extension_properties_response + ## @return a Fiber of get_available_extension_properties_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -32,12 +32,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contacts::GetAvailableExtensionProperties::GetAvailableExtensionPropertiesResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contacts::GetAvailableExtensionProperties::GetAvailableExtensionPropertiesPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + ## Return all directory extension definitions that are registered in a directory, including through multitenant apps. The following entities support extension properties: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -45,17 +44,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_available_extension_properties_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetAvailableExtensionPropertiesRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/contacts/get_available_extension_properties/get_available_extension_properties_response.rb b/lib/contacts/get_available_extension_properties/get_available_extension_properties_response.rb deleted file mode 100644 index 74005afe33..0000000000 --- a/lib/contacts/get_available_extension_properties/get_available_extension_properties_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../microsoft_graph' -require_relative '../../models/base_collection_pagination_count_response' -require_relative '../../models/extension_property' -require_relative '../contacts' -require_relative './get_available_extension_properties' - -module MicrosoftGraph - module Contacts - module GetAvailableExtensionProperties - class GetAvailableExtensionPropertiesResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getAvailableExtensionPropertiesResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_available_extension_properties_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetAvailableExtensionPropertiesResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ExtensionProperty.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a extension_property - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end -end diff --git a/lib/contacts/get_by_ids/get_by_ids.rb b/lib/contacts/get_by_ids/get_by_ids.rb index e4b0824834..131a179969 100644 --- a/lib/contacts/get_by_ids/get_by_ids.rb +++ b/lib/contacts/get_by_ids/get_by_ids.rb @@ -1,2 +1,2 @@ require_relative 'get_by_ids_post_request_body' -require_relative 'get_by_ids_response' +require_relative 'get_by_ids_post_response' diff --git a/lib/contacts/get_by_ids/get_by_ids_post_request_body.rb b/lib/contacts/get_by_ids/get_by_ids_post_request_body.rb index 015477085a..bd4f0b0ea1 100644 --- a/lib/contacts/get_by_ids/get_by_ids_post_request_body.rb +++ b/lib/contacts/get_by_ids/get_by_ids_post_request_body.rb @@ -18,22 +18,22 @@ class GetByIdsPostRequestBody # The types property @types ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getByIdsPostRequestBody and sets the default values. + ## Instantiates a new GetByIdsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/contacts/get_by_ids/get_by_ids_post_response.rb b/lib/contacts/get_by_ids/get_by_ids_post_response.rb new file mode 100644 index 0000000000..2749b5cdc7 --- /dev/null +++ b/lib/contacts/get_by_ids/get_by_ids_post_response.rb @@ -0,0 +1,69 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/base_collection_pagination_count_response' +require_relative '../../models/directory_object' +require_relative '../contacts' +require_relative './get_by_ids' + +module MicrosoftGraph + module Contacts + module GetByIds + class GetByIdsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetByIdsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_by_ids_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetByIdsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a directory_object + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/contacts/get_by_ids/get_by_ids_request_builder.rb b/lib/contacts/get_by_ids/get_by_ids_request_builder.rb index e97a37c861..1fce53d426 100644 --- a/lib/contacts/get_by_ids/get_by_ids_request_builder.rb +++ b/lib/contacts/get_by_ids/get_by_ids_request_builder.rb @@ -24,7 +24,7 @@ def initialize(path_parameters, request_adapter) ## Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_by_ids_response + ## @return a Fiber of get_by_ids_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -32,9 +32,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contacts::GetByIds::GetByIdsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contacts::GetByIds::GetByIdsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: @@ -45,17 +44,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_by_ids_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetByIdsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/contacts/get_by_ids/get_by_ids_response.rb b/lib/contacts/get_by_ids/get_by_ids_response.rb deleted file mode 100644 index bf6bd1b93b..0000000000 --- a/lib/contacts/get_by_ids/get_by_ids_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../microsoft_graph' -require_relative '../../models/base_collection_pagination_count_response' -require_relative '../../models/directory_object' -require_relative '../contacts' -require_relative './get_by_ids' - -module MicrosoftGraph - module Contacts - module GetByIds - class GetByIdsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getByIdsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_by_ids_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetByIdsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a directory_object - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end -end diff --git a/lib/contacts/item/check_member_groups/check_member_groups.rb b/lib/contacts/item/check_member_groups/check_member_groups.rb index 938b908522..98148024fe 100644 --- a/lib/contacts/item/check_member_groups/check_member_groups.rb +++ b/lib/contacts/item/check_member_groups/check_member_groups.rb @@ -1,2 +1,2 @@ require_relative 'check_member_groups_post_request_body' -require_relative 'check_member_groups_response' +require_relative 'check_member_groups_post_response' diff --git a/lib/contacts/item/check_member_groups/check_member_groups_post_request_body.rb b/lib/contacts/item/check_member_groups/check_member_groups_post_request_body.rb index 240c453c37..9dec1e1a8c 100644 --- a/lib/contacts/item/check_member_groups/check_member_groups_post_request_body.rb +++ b/lib/contacts/item/check_member_groups/check_member_groups_post_request_body.rb @@ -17,22 +17,22 @@ class CheckMemberGroupsPostRequestBody # The groupIds property @group_ids ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new checkMemberGroupsPostRequestBody and sets the default values. + ## Instantiates a new CheckMemberGroupsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/contacts/item/check_member_groups/check_member_groups_post_response.rb b/lib/contacts/item/check_member_groups/check_member_groups_post_response.rb new file mode 100644 index 0000000000..ee17a8b0f8 --- /dev/null +++ b/lib/contacts/item/check_member_groups/check_member_groups_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../contacts' +require_relative '../item' +require_relative './check_member_groups' + +module MicrosoftGraph + module Contacts + module Item + module CheckMemberGroups + class CheckMemberGroupsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new CheckMemberGroupsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a check_member_groups_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CheckMemberGroupsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/contacts/item/check_member_groups/check_member_groups_request_builder.rb b/lib/contacts/item/check_member_groups/check_member_groups_request_builder.rb index c17bfc33d6..c301a6688c 100644 --- a/lib/contacts/item/check_member_groups/check_member_groups_request_builder.rb +++ b/lib/contacts/item/check_member_groups/check_member_groups_request_builder.rb @@ -23,10 +23,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/checkMemberGroups") end ## - ## Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + ## Check for membership in a specified list of group IDs, and return from that list the IDs of groups where a specified object is a member. The specified object can be of one of the following types:- user- group- service principal- organizational contact- device- directory object This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of check_member_groups_response + ## @return a Fiber of check_member_groups_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,12 +34,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contacts::Item::CheckMemberGroups::CheckMemberGroupsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contacts::Item::CheckMemberGroups::CheckMemberGroupsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + ## Check for membership in a specified list of group IDs, and return from that list the IDs of groups where a specified object is a member. The specified object can be of one of the following types:- user- group- service principal- organizational contact- device- directory object This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a check_member_groups_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CheckMemberGroupsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/contacts/item/check_member_groups/check_member_groups_response.rb b/lib/contacts/item/check_member_groups/check_member_groups_response.rb deleted file mode 100644 index d643a43e81..0000000000 --- a/lib/contacts/item/check_member_groups/check_member_groups_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../contacts' -require_relative '../item' -require_relative './check_member_groups' - -module MicrosoftGraph - module Contacts - module Item - module CheckMemberGroups - class CheckMemberGroupsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new checkMemberGroupsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a check_member_groups_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return CheckMemberGroupsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/contacts/item/check_member_objects/check_member_objects.rb b/lib/contacts/item/check_member_objects/check_member_objects.rb index 67fbf971e7..1826285d49 100644 --- a/lib/contacts/item/check_member_objects/check_member_objects.rb +++ b/lib/contacts/item/check_member_objects/check_member_objects.rb @@ -1,2 +1,2 @@ require_relative 'check_member_objects_post_request_body' -require_relative 'check_member_objects_response' +require_relative 'check_member_objects_post_response' diff --git a/lib/contacts/item/check_member_objects/check_member_objects_post_request_body.rb b/lib/contacts/item/check_member_objects/check_member_objects_post_request_body.rb index ca7ff224d2..ddf4fb9be9 100644 --- a/lib/contacts/item/check_member_objects/check_member_objects_post_request_body.rb +++ b/lib/contacts/item/check_member_objects/check_member_objects_post_request_body.rb @@ -17,22 +17,22 @@ class CheckMemberObjectsPostRequestBody # The ids property @ids ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new checkMemberObjectsPostRequestBody and sets the default values. + ## Instantiates a new CheckMemberObjectsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/contacts/item/check_member_objects/check_member_objects_post_response.rb b/lib/contacts/item/check_member_objects/check_member_objects_post_response.rb new file mode 100644 index 0000000000..6f33f2b803 --- /dev/null +++ b/lib/contacts/item/check_member_objects/check_member_objects_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../contacts' +require_relative '../item' +require_relative './check_member_objects' + +module MicrosoftGraph + module Contacts + module Item + module CheckMemberObjects + class CheckMemberObjectsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new CheckMemberObjectsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a check_member_objects_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CheckMemberObjectsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/contacts/item/check_member_objects/check_member_objects_request_builder.rb b/lib/contacts/item/check_member_objects/check_member_objects_request_builder.rb index b10ba25b9a..49e06f9e1d 100644 --- a/lib/contacts/item/check_member_objects/check_member_objects_request_builder.rb +++ b/lib/contacts/item/check_member_objects/check_member_objects_request_builder.rb @@ -26,7 +26,7 @@ def initialize(path_parameters, request_adapter) ## Invoke action checkMemberObjects ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of check_member_objects_response + ## @return a Fiber of check_member_objects_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,9 +34,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contacts::Item::CheckMemberObjects::CheckMemberObjectsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contacts::Item::CheckMemberObjects::CheckMemberObjectsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Invoke action checkMemberObjects @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a check_member_objects_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CheckMemberObjectsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/contacts/item/check_member_objects/check_member_objects_response.rb b/lib/contacts/item/check_member_objects/check_member_objects_response.rb deleted file mode 100644 index b605d02c75..0000000000 --- a/lib/contacts/item/check_member_objects/check_member_objects_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../contacts' -require_relative '../item' -require_relative './check_member_objects' - -module MicrosoftGraph - module Contacts - module Item - module CheckMemberObjects - class CheckMemberObjectsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new checkMemberObjectsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a check_member_objects_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return CheckMemberObjectsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/contacts/item/direct_reports/count/count_request_builder.rb b/lib/contacts/item/direct_reports/count/count_request_builder.rb index 422249f331..2b49c1149d 100644 --- a/lib/contacts/item/direct_reports/count/count_request_builder.rb +++ b/lib/contacts/item/direct_reports/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/directReports/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/directReports/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/contacts/item/direct_reports/direct_reports_request_builder.rb b/lib/contacts/item/direct_reports/direct_reports_request_builder.rb index aab9d4535b..451e474df1 100644 --- a/lib/contacts/item/direct_reports/direct_reports_request_builder.rb +++ b/lib/contacts/item/direct_reports/direct_reports_request_builder.rb @@ -51,10 +51,10 @@ def by_directory_object_id(directory_object_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/directReports{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/directReports{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## The contact's direct reports. (The users and contacts that have their manager property set to this contact.) Read-only. Nullable. Supports $expand. + ## Get the direct reports for this organizational contact. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_object_collection_response ## @@ -63,31 +63,39 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObjectCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## The contact's direct reports. (The users and contacts that have their manager property set to this contact.) Read-only. Nullable. Supports $expand. + ## Get the direct reports for this organizational contact. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a direct_reports_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DirectReportsRequestBuilder.new(raw_url, @request_adapter) + end ## - # The contact's direct reports. (The users and contacts that have their manager property set to this contact.) Read-only. Nullable. Supports $expand. + # Get the direct reports for this organizational contact. class DirectReportsRequestBuilderGetQueryParameters ## diff --git a/lib/contacts/item/direct_reports/graph_org_contact/count/count_request_builder.rb b/lib/contacts/item/direct_reports/graph_org_contact/count/count_request_builder.rb index dfca953005..7eb38994df 100644 --- a/lib/contacts/item/direct_reports/graph_org_contact/count/count_request_builder.rb +++ b/lib/contacts/item/direct_reports/graph_org_contact/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/directReports/graph.orgContact/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/directReports/graph.orgContact/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/contacts/item/direct_reports/graph_org_contact/graph_org_contact_request_builder.rb b/lib/contacts/item/direct_reports/graph_org_contact/graph_org_contact_request_builder.rb index 4ff72fae60..341830fa46 100644 --- a/lib/contacts/item/direct_reports/graph_org_contact/graph_org_contact_request_builder.rb +++ b/lib/contacts/item/direct_reports/graph_org_contact/graph_org_contact_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/directReports/graph.orgContact{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/directReports/graph.orgContact{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.orgContact in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::OrgContactCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_org_contact_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphOrgContactRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.orgContact in the microsoft.graph.directoryObject collection diff --git a/lib/contacts/item/direct_reports/graph_user/count/count_request_builder.rb b/lib/contacts/item/direct_reports/graph_user/count/count_request_builder.rb index 402c4f9622..57bca2b5be 100644 --- a/lib/contacts/item/direct_reports/graph_user/count/count_request_builder.rb +++ b/lib/contacts/item/direct_reports/graph_user/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/directReports/graph.user/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/directReports/graph.user/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/contacts/item/direct_reports/graph_user/graph_user_request_builder.rb b/lib/contacts/item/direct_reports/graph_user/graph_user_request_builder.rb index 11f83ddc19..1527c81b4f 100644 --- a/lib/contacts/item/direct_reports/graph_user/graph_user_request_builder.rb +++ b/lib/contacts/item/direct_reports/graph_user/graph_user_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/directReports/graph.user{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/directReports/graph.user{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.user in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_user_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphUserRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.user in the microsoft.graph.directoryObject collection diff --git a/lib/contacts/item/direct_reports/item/directory_object_item_request_builder.rb b/lib/contacts/item/direct_reports/item/directory_object_item_request_builder.rb index 1b1b9869a5..333a334a20 100644 --- a/lib/contacts/item/direct_reports/item/directory_object_item_request_builder.rb +++ b/lib/contacts/item/direct_reports/item/directory_object_item_request_builder.rb @@ -35,7 +35,7 @@ def graph_user() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/directReports/{directoryObject%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/directReports/{directoryObject%2Did}{?%24expand,%24select}") end ## ## The contact's direct reports. (The users and contacts that have their manager property set to this contact.) Read-only. Nullable. Supports $expand. @@ -47,8 +47,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -58,17 +57,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a directory_object_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DirectoryObjectItemRequestBuilder.new(raw_url, @request_adapter) + end ## # The contact's direct reports. (The users and contacts that have their manager property set to this contact.) Read-only. Nullable. Supports $expand. diff --git a/lib/contacts/item/direct_reports/item/graph_org_contact/graph_org_contact_request_builder.rb b/lib/contacts/item/direct_reports/item/graph_org_contact/graph_org_contact_request_builder.rb index f32273c2d0..eba4134f69 100644 --- a/lib/contacts/item/direct_reports/item/graph_org_contact/graph_org_contact_request_builder.rb +++ b/lib/contacts/item/direct_reports/item/graph_org_contact/graph_org_contact_request_builder.rb @@ -25,7 +25,7 @@ class GraphOrgContactRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBui ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/directReports/{directoryObject%2Did}/graph.orgContact{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/directReports/{directoryObject%2Did}/graph.orgContact{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.orgContact @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::OrgContact.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_org_contact_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphOrgContactRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.orgContact diff --git a/lib/contacts/item/direct_reports/item/graph_user/graph_user_request_builder.rb b/lib/contacts/item/direct_reports/item/graph_user/graph_user_request_builder.rb index 9103a1c297..9e7eaebb34 100644 --- a/lib/contacts/item/direct_reports/item/graph_user/graph_user_request_builder.rb +++ b/lib/contacts/item/direct_reports/item/graph_user/graph_user_request_builder.rb @@ -25,7 +25,7 @@ class GraphUserRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/directReports/{directoryObject%2Did}/graph.user{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/directReports/{directoryObject%2Did}/graph.user{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.user @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::User.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_user_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphUserRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.user diff --git a/lib/contacts/item/get_member_groups/get_member_groups.rb b/lib/contacts/item/get_member_groups/get_member_groups.rb index 0a25b012ea..9190b99738 100644 --- a/lib/contacts/item/get_member_groups/get_member_groups.rb +++ b/lib/contacts/item/get_member_groups/get_member_groups.rb @@ -1,2 +1,2 @@ require_relative 'get_member_groups_post_request_body' -require_relative 'get_member_groups_response' +require_relative 'get_member_groups_post_response' diff --git a/lib/contacts/item/get_member_groups/get_member_groups_post_request_body.rb b/lib/contacts/item/get_member_groups/get_member_groups_post_request_body.rb index fe121b7eb2..65ca576cc4 100644 --- a/lib/contacts/item/get_member_groups/get_member_groups_post_request_body.rb +++ b/lib/contacts/item/get_member_groups/get_member_groups_post_request_body.rb @@ -17,22 +17,22 @@ class GetMemberGroupsPostRequestBody # The securityEnabledOnly property @security_enabled_only ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getMemberGroupsPostRequestBody and sets the default values. + ## Instantiates a new GetMemberGroupsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/contacts/item/get_member_groups/get_member_groups_post_response.rb b/lib/contacts/item/get_member_groups/get_member_groups_post_response.rb new file mode 100644 index 0000000000..25bfa51a5a --- /dev/null +++ b/lib/contacts/item/get_member_groups/get_member_groups_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../contacts' +require_relative '../item' +require_relative './get_member_groups' + +module MicrosoftGraph + module Contacts + module Item + module GetMemberGroups + class GetMemberGroupsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetMemberGroupsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_member_groups_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetMemberGroupsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/contacts/item/get_member_groups/get_member_groups_request_builder.rb b/lib/contacts/item/get_member_groups/get_member_groups_request_builder.rb index 8756ffaf46..c53a765ccc 100644 --- a/lib/contacts/item/get_member_groups/get_member_groups_request_builder.rb +++ b/lib/contacts/item/get_member_groups/get_member_groups_request_builder.rb @@ -23,10 +23,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/getMemberGroups") end ## - ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. + ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the DirectoryResultSizeLimitExceeded error code. If you get the DirectoryResultSizeLimitExceeded error code, use the List group transitive memberOf API instead. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_member_groups_response + ## @return a Fiber of get_member_groups_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,12 +34,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contacts::Item::GetMemberGroups::GetMemberGroupsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contacts::Item::GetMemberGroups::GetMemberGroupsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. + ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the DirectoryResultSizeLimitExceeded error code. If you get the DirectoryResultSizeLimitExceeded error code, use the List group transitive memberOf API instead. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_member_groups_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetMemberGroupsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/contacts/item/get_member_groups/get_member_groups_response.rb b/lib/contacts/item/get_member_groups/get_member_groups_response.rb deleted file mode 100644 index 878074ec2a..0000000000 --- a/lib/contacts/item/get_member_groups/get_member_groups_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../contacts' -require_relative '../item' -require_relative './get_member_groups' - -module MicrosoftGraph - module Contacts - module Item - module GetMemberGroups - class GetMemberGroupsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getMemberGroupsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_member_groups_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetMemberGroupsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/contacts/item/get_member_objects/get_member_objects.rb b/lib/contacts/item/get_member_objects/get_member_objects.rb index 40edad6b9e..f7a486b0f9 100644 --- a/lib/contacts/item/get_member_objects/get_member_objects.rb +++ b/lib/contacts/item/get_member_objects/get_member_objects.rb @@ -1,2 +1,2 @@ require_relative 'get_member_objects_post_request_body' -require_relative 'get_member_objects_response' +require_relative 'get_member_objects_post_response' diff --git a/lib/contacts/item/get_member_objects/get_member_objects_post_request_body.rb b/lib/contacts/item/get_member_objects/get_member_objects_post_request_body.rb index 6e9fc8147f..a666393915 100644 --- a/lib/contacts/item/get_member_objects/get_member_objects_post_request_body.rb +++ b/lib/contacts/item/get_member_objects/get_member_objects_post_request_body.rb @@ -17,22 +17,22 @@ class GetMemberObjectsPostRequestBody # The securityEnabledOnly property @security_enabled_only ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getMemberObjectsPostRequestBody and sets the default values. + ## Instantiates a new GetMemberObjectsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/contacts/item/get_member_objects/get_member_objects_post_response.rb b/lib/contacts/item/get_member_objects/get_member_objects_post_response.rb new file mode 100644 index 0000000000..5b6145797c --- /dev/null +++ b/lib/contacts/item/get_member_objects/get_member_objects_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../contacts' +require_relative '../item' +require_relative './get_member_objects' + +module MicrosoftGraph + module Contacts + module Item + module GetMemberObjects + class GetMemberObjectsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetMemberObjectsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_member_objects_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetMemberObjectsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/contacts/item/get_member_objects/get_member_objects_request_builder.rb b/lib/contacts/item/get_member_objects/get_member_objects_request_builder.rb index ff4e3a5d7f..9077b505be 100644 --- a/lib/contacts/item/get_member_objects/get_member_objects_request_builder.rb +++ b/lib/contacts/item/get_member_objects/get_member_objects_request_builder.rb @@ -23,10 +23,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/getMemberObjects") end ## - ## Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + ## Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:- user- group- service principal- organizational contact- device- directory object This function is transitive. Only users and role-enabled groups can be members of directory roles. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_member_objects_response + ## @return a Fiber of get_member_objects_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,12 +34,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contacts::Item::GetMemberObjects::GetMemberObjectsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contacts::Item::GetMemberObjects::GetMemberObjectsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + ## Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:- user- group- service principal- organizational contact- device- directory object This function is transitive. Only users and role-enabled groups can be members of directory roles. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_member_objects_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetMemberObjectsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/contacts/item/get_member_objects/get_member_objects_response.rb b/lib/contacts/item/get_member_objects/get_member_objects_response.rb deleted file mode 100644 index 576d2d8b39..0000000000 --- a/lib/contacts/item/get_member_objects/get_member_objects_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../contacts' -require_relative '../item' -require_relative './get_member_objects' - -module MicrosoftGraph - module Contacts - module Item - module GetMemberObjects - class GetMemberObjectsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getMemberObjectsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_member_objects_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetMemberObjectsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/contacts/item/manager/manager_request_builder.rb b/lib/contacts/item/manager/manager_request_builder.rb index f00609f8f8..13c4c129b3 100644 --- a/lib/contacts/item/manager/manager_request_builder.rb +++ b/lib/contacts/item/manager/manager_request_builder.rb @@ -21,7 +21,7 @@ class ManagerRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/manager{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/manager{?%24expand,%24select}") end ## ## Get this organizational contact's manager. @@ -33,8 +33,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -44,17 +43,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a manager_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagerRequestBuilder.new(raw_url, @request_adapter) + end ## # Get this organizational contact's manager. diff --git a/lib/contacts/item/member_of/count/count_request_builder.rb b/lib/contacts/item/member_of/count/count_request_builder.rb index 4fa72d8da8..0d89d485d5 100644 --- a/lib/contacts/item/member_of/count/count_request_builder.rb +++ b/lib/contacts/item/member_of/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/memberOf/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/memberOf/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/contacts/item/member_of/graph_administrative_unit/count/count_request_builder.rb b/lib/contacts/item/member_of/graph_administrative_unit/count/count_request_builder.rb index c8d3811758..53d48ef82c 100644 --- a/lib/contacts/item/member_of/graph_administrative_unit/count/count_request_builder.rb +++ b/lib/contacts/item/member_of/graph_administrative_unit/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/memberOf/graph.administrativeUnit/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/memberOf/graph.administrativeUnit/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/contacts/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.rb b/lib/contacts/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.rb index d0d500cfeb..b0116a2f5f 100644 --- a/lib/contacts/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.rb +++ b/lib/contacts/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/memberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/memberOf/graph.administrativeUnit{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AdministrativeUnitCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_administrative_unit_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphAdministrativeUnitRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection diff --git a/lib/contacts/item/member_of/graph_group/count/count_request_builder.rb b/lib/contacts/item/member_of/graph_group/count/count_request_builder.rb index 999f3860f5..2961b584db 100644 --- a/lib/contacts/item/member_of/graph_group/count/count_request_builder.rb +++ b/lib/contacts/item/member_of/graph_group/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/memberOf/graph.group/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/memberOf/graph.group/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/contacts/item/member_of/graph_group/graph_group_request_builder.rb b/lib/contacts/item/member_of/graph_group/graph_group_request_builder.rb index 8a8b16de91..e440861d2a 100644 --- a/lib/contacts/item/member_of/graph_group/graph_group_request_builder.rb +++ b/lib/contacts/item/member_of/graph_group/graph_group_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/memberOf/graph.group{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/memberOf/graph.group{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::GroupCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_group_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphGroupRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection diff --git a/lib/contacts/item/member_of/item/directory_object_item_request_builder.rb b/lib/contacts/item/member_of/item/directory_object_item_request_builder.rb index 572f8dd8c5..a3fb0f6cf0 100644 --- a/lib/contacts/item/member_of/item/directory_object_item_request_builder.rb +++ b/lib/contacts/item/member_of/item/directory_object_item_request_builder.rb @@ -35,7 +35,7 @@ def graph_group() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/memberOf/{directoryObject%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/memberOf/{directoryObject%2Did}{?%24expand,%24select}") end ## ## Groups that this contact is a member of. Read-only. Nullable. Supports $expand. @@ -47,8 +47,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -58,17 +57,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a directory_object_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DirectoryObjectItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Groups that this contact is a member of. Read-only. Nullable. Supports $expand. diff --git a/lib/contacts/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.rb b/lib/contacts/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.rb index e88fa5e4f0..0b63dd89ee 100644 --- a/lib/contacts/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.rb +++ b/lib/contacts/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.rb @@ -25,7 +25,7 @@ class GraphAdministrativeUnitRequestBuilder < MicrosoftKiotaAbstractions::BaseRe ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/memberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/memberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AdministrativeUnit.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_administrative_unit_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphAdministrativeUnitRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit diff --git a/lib/contacts/item/member_of/item/graph_group/graph_group_request_builder.rb b/lib/contacts/item/member_of/item/graph_group/graph_group_request_builder.rb index 6a4aa1fe21..9b9aefb757 100644 --- a/lib/contacts/item/member_of/item/graph_group/graph_group_request_builder.rb +++ b/lib/contacts/item/member_of/item/graph_group/graph_group_request_builder.rb @@ -25,7 +25,7 @@ class GraphGroupRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/memberOf/{directoryObject%2Did}/graph.group{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/memberOf/{directoryObject%2Did}/graph.group{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.group @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Group.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_group_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphGroupRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.group diff --git a/lib/contacts/item/member_of/member_of_request_builder.rb b/lib/contacts/item/member_of/member_of_request_builder.rb index 373a52322f..25a1fe93d6 100644 --- a/lib/contacts/item/member_of/member_of_request_builder.rb +++ b/lib/contacts/item/member_of/member_of_request_builder.rb @@ -51,10 +51,10 @@ def by_directory_object_id(directory_object_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/memberOf{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/memberOf{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Groups that this contact is a member of. Read-only. Nullable. Supports $expand. + ## List the groups that this organizational contact is a member of. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_object_collection_response ## @@ -63,31 +63,39 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObjectCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Groups that this contact is a member of. Read-only. Nullable. Supports $expand. + ## List the groups that this organizational contact is a member of. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a member_of_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MemberOfRequestBuilder.new(raw_url, @request_adapter) + end ## - # Groups that this contact is a member of. Read-only. Nullable. Supports $expand. + # List the groups that this organizational contact is a member of. class MemberOfRequestBuilderGetQueryParameters ## diff --git a/lib/contacts/item/org_contact_item_request_builder.rb b/lib/contacts/item/org_contact_item_request_builder.rb index 6e3fc14f63..4606f97a2d 100644 --- a/lib/contacts/item/org_contact_item_request_builder.rb +++ b/lib/contacts/item/org_contact_item_request_builder.rb @@ -12,6 +12,8 @@ require_relative './manager/manager_request_builder' require_relative './member_of/member_of_request_builder' require_relative './restore/restore_request_builder' +require_relative './retry_service_provisioning/retry_service_provisioning_request_builder' +require_relative './service_provisioning_errors/service_provisioning_errors_request_builder' require_relative './transitive_member_of/transitive_member_of_request_builder' module MicrosoftGraph @@ -62,6 +64,16 @@ def restore() return MicrosoftGraph::Contacts::Item::Restore::RestoreRequestBuilder.new(@path_parameters, @request_adapter) end ## + # Provides operations to call the retryServiceProvisioning method. + def retry_service_provisioning() + return MicrosoftGraph::Contacts::Item::RetryServiceProvisioning::RetryServiceProvisioningRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # The serviceProvisioningErrors property + def service_provisioning_errors() + return MicrosoftGraph::Contacts::Item::ServiceProvisioningErrors::ServiceProvisioningErrorsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## # Provides operations to manage the transitiveMemberOf property of the microsoft.graph.orgContact entity. def transitive_member_of() return MicrosoftGraph::Contacts::Item::TransitiveMemberOf::TransitiveMemberOfRequestBuilder.new(@path_parameters, @request_adapter) @@ -73,21 +85,7 @@ def transitive_member_of() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}{?%24select,%24expand}") - end - ## - ## Delete entity from contacts - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of void - ## - def delete(request_configuration=nil) - request_info = self.to_delete_request_information( - request_configuration - ) - error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, nil, error_mapping) + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}{?%24expand,%24select}") end ## ## Get the properties and relationships of an organizational contact. @@ -99,79 +97,35 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::OrgContact.create_from_discriminator_value(pn) }, error_mapping) - end - ## - ## Update entity in contacts - ## @param body The request body - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of org_contact - ## - def patch(body, request_configuration=nil) - raise StandardError, 'body cannot be null' if body.nil? - request_info = self.to_patch_request_information( - body, request_configuration - ) - error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::OrgContact.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Delete entity from contacts - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a request_information - ## - def to_delete_request_information(request_configuration=nil) - request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE - unless request_configuration.nil? - request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - end - return request_info - end - ## ## Get the properties and relationships of an organizational contact. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Update entity in contacts - ## @param body The request body - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a request_information + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a org_contact_item_request_builder ## - def to_patch_request_information(body, request_configuration=nil) - raise StandardError, 'body cannot be null' if body.nil? - request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') - unless request_configuration.nil? - request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) - return request_info + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return OrgContactItemRequestBuilder.new(raw_url, @request_adapter) end ## diff --git a/lib/contacts/item/restore/restore_request_builder.rb b/lib/contacts/item/restore/restore_request_builder.rb index 2deb3d20b9..f7d9bc0da3 100644 --- a/lib/contacts/item/restore/restore_request_builder.rb +++ b/lib/contacts/item/restore/restore_request_builder.rb @@ -24,7 +24,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/restore") end ## - ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. Restore a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_object ## @@ -33,27 +33,35 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. Restore a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a restore_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RestoreRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/groups/item/calendar/events/item/instances/item/attachments/attachments.rb b/lib/contacts/item/retry_service_provisioning/retry_service_provisioning.rb similarity index 100% rename from lib/groups/item/calendar/events/item/instances/item/attachments/attachments.rb rename to lib/contacts/item/retry_service_provisioning/retry_service_provisioning.rb diff --git a/lib/contacts/item/retry_service_provisioning/retry_service_provisioning_request_builder.rb b/lib/contacts/item/retry_service_provisioning/retry_service_provisioning_request_builder.rb new file mode 100644 index 0000000000..8baaabf7dd --- /dev/null +++ b/lib/contacts/item/retry_service_provisioning/retry_service_provisioning_request_builder.rb @@ -0,0 +1,68 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../contacts' +require_relative '../item' +require_relative './retry_service_provisioning' + +module MicrosoftGraph + module Contacts + module Item + module RetryServiceProvisioning + ## + # Provides operations to call the retryServiceProvisioning method. + class RetryServiceProvisioningRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new RetryServiceProvisioningRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/retryServiceProvisioning") + end + ## + ## Invoke action retryServiceProvisioning + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(request_configuration=nil) + request_info = self.to_post_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Invoke action retryServiceProvisioning + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a retry_service_provisioning_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RetryServiceProvisioningRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end +end diff --git a/lib/groups/item/calendar/events/item/instances/item/attachments/count/count.rb b/lib/contacts/item/service_provisioning_errors/count/count.rb similarity index 100% rename from lib/groups/item/calendar/events/item/instances/item/attachments/count/count.rb rename to lib/contacts/item/service_provisioning_errors/count/count.rb diff --git a/lib/contacts/item/service_provisioning_errors/count/count_request_builder.rb b/lib/contacts/item/service_provisioning_errors/count/count_request_builder.rb new file mode 100644 index 0000000000..ee5a701c02 --- /dev/null +++ b/lib/contacts/item/service_provisioning_errors/count/count_request_builder.rb @@ -0,0 +1,100 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../contacts' +require_relative '../../item' +require_relative '../service_provisioning_errors' +require_relative './count' + +module MicrosoftGraph + module Contacts + module Item + module ServiceProvisioningErrors + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/serviceProvisioningErrors/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar/events/item/instances/item/attachments/item/item.rb b/lib/contacts/item/service_provisioning_errors/service_provisioning_errors.rb similarity index 100% rename from lib/groups/item/calendar/events/item/instances/item/attachments/item/item.rb rename to lib/contacts/item/service_provisioning_errors/service_provisioning_errors.rb diff --git a/lib/contacts/item/service_provisioning_errors/service_provisioning_errors_request_builder.rb b/lib/contacts/item/service_provisioning_errors/service_provisioning_errors_request_builder.rb new file mode 100644 index 0000000000..4b7d13db21 --- /dev/null +++ b/lib/contacts/item/service_provisioning_errors/service_provisioning_errors_request_builder.rb @@ -0,0 +1,134 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../../models/service_provisioning_error_collection_response' +require_relative '../../contacts' +require_relative '../item' +require_relative './count/count_request_builder' +require_relative './service_provisioning_errors' + +module MicrosoftGraph + module Contacts + module Item + module ServiceProvisioningErrors + ## + # Builds and executes requests for operations under \contacts\{orgContact-id}\serviceProvisioningErrors + class ServiceProvisioningErrorsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::Contacts::Item::ServiceProvisioningErrors::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/serviceProvisioningErrors{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from an organizational contact object . Supports $filter (eq, not, for isResolved and serviceInstance). + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of service_provisioning_error_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceProvisioningErrorCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from an organizational contact object . Supports $filter (eq, not, for isResolved and serviceInstance). + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a service_provisioning_errors_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ServiceProvisioningErrorsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from an organizational contact object . Supports $filter (eq, not, for isResolved and serviceInstance). + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/contacts/item/transitive_member_of/count/count_request_builder.rb b/lib/contacts/item/transitive_member_of/count/count_request_builder.rb index c9c3423957..5d0f50d535 100644 --- a/lib/contacts/item/transitive_member_of/count/count_request_builder.rb +++ b/lib/contacts/item/transitive_member_of/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/transitiveMemberOf/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/transitiveMemberOf/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/contacts/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.rb b/lib/contacts/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.rb index 70f4afed86..8944157171 100644 --- a/lib/contacts/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.rb +++ b/lib/contacts/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/transitiveMemberOf/graph.administrativeUnit/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/transitiveMemberOf/graph.administrativeUnit/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/contacts/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.rb b/lib/contacts/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.rb index eb1d1e213c..aeaf5a62c8 100644 --- a/lib/contacts/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.rb +++ b/lib/contacts/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/transitiveMemberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/transitiveMemberOf/graph.administrativeUnit{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AdministrativeUnitCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_administrative_unit_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphAdministrativeUnitRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection diff --git a/lib/contacts/item/transitive_member_of/graph_group/count/count_request_builder.rb b/lib/contacts/item/transitive_member_of/graph_group/count/count_request_builder.rb index 5589661514..451179e3e7 100644 --- a/lib/contacts/item/transitive_member_of/graph_group/count/count_request_builder.rb +++ b/lib/contacts/item/transitive_member_of/graph_group/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/transitiveMemberOf/graph.group/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/transitiveMemberOf/graph.group/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/contacts/item/transitive_member_of/graph_group/graph_group_request_builder.rb b/lib/contacts/item/transitive_member_of/graph_group/graph_group_request_builder.rb index ee21aebe0d..1a295ac87e 100644 --- a/lib/contacts/item/transitive_member_of/graph_group/graph_group_request_builder.rb +++ b/lib/contacts/item/transitive_member_of/graph_group/graph_group_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/transitiveMemberOf/graph.group{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/transitiveMemberOf/graph.group{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::GroupCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_group_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphGroupRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection diff --git a/lib/contacts/item/transitive_member_of/item/directory_object_item_request_builder.rb b/lib/contacts/item/transitive_member_of/item/directory_object_item_request_builder.rb index e01fe5131b..8bff30038d 100644 --- a/lib/contacts/item/transitive_member_of/item/directory_object_item_request_builder.rb +++ b/lib/contacts/item/transitive_member_of/item/directory_object_item_request_builder.rb @@ -35,7 +35,7 @@ def graph_group() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/transitiveMemberOf/{directoryObject%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/transitiveMemberOf/{directoryObject%2Did}{?%24expand,%24select}") end ## ## Groups that this contact is a member of, including groups that the contact is nested under. Read-only. Nullable. @@ -47,8 +47,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -58,17 +57,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a directory_object_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DirectoryObjectItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Groups that this contact is a member of, including groups that the contact is nested under. Read-only. Nullable. diff --git a/lib/contacts/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.rb b/lib/contacts/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.rb index 8b7deb9817..f533c75b79 100644 --- a/lib/contacts/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.rb +++ b/lib/contacts/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.rb @@ -25,7 +25,7 @@ class GraphAdministrativeUnitRequestBuilder < MicrosoftKiotaAbstractions::BaseRe ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/transitiveMemberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/transitiveMemberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AdministrativeUnit.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_administrative_unit_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphAdministrativeUnitRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit diff --git a/lib/contacts/item/transitive_member_of/item/graph_group/graph_group_request_builder.rb b/lib/contacts/item/transitive_member_of/item/graph_group/graph_group_request_builder.rb index 1b0c24b20c..62fd003f3d 100644 --- a/lib/contacts/item/transitive_member_of/item/graph_group/graph_group_request_builder.rb +++ b/lib/contacts/item/transitive_member_of/item/graph_group/graph_group_request_builder.rb @@ -25,7 +25,7 @@ class GraphGroupRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/transitiveMemberOf/{directoryObject%2Did}/graph.group{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/transitiveMemberOf/{directoryObject%2Did}/graph.group{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.group @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Group.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_group_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphGroupRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.group diff --git a/lib/contacts/item/transitive_member_of/transitive_member_of_request_builder.rb b/lib/contacts/item/transitive_member_of/transitive_member_of_request_builder.rb index 73c6f00d76..f76b8eaf13 100644 --- a/lib/contacts/item/transitive_member_of/transitive_member_of_request_builder.rb +++ b/lib/contacts/item/transitive_member_of/transitive_member_of_request_builder.rb @@ -51,10 +51,10 @@ def by_directory_object_id(directory_object_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/transitiveMemberOf{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/contacts/{orgContact%2Did}/transitiveMemberOf{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Groups that this contact is a member of, including groups that the contact is nested under. Read-only. Nullable. + ## Get groups that this organizational contact is a member of. The API request is transitive, and returns all groups the organizational contact is a nested member of. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_object_collection_response ## @@ -63,31 +63,39 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObjectCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Groups that this contact is a member of, including groups that the contact is nested under. Read-only. Nullable. + ## Get groups that this organizational contact is a member of. The API request is transitive, and returns all groups the organizational contact is a nested member of. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a transitive_member_of_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TransitiveMemberOfRequestBuilder.new(raw_url, @request_adapter) + end ## - # Groups that this contact is a member of, including groups that the contact is nested under. Read-only. Nullable. + # Get groups that this organizational contact is a member of. The API request is transitive, and returns all groups the organizational contact is a nested member of. class TransitiveMemberOfRequestBuilderGetQueryParameters ## diff --git a/lib/contacts/validate_properties/validate_properties_post_request_body.rb b/lib/contacts/validate_properties/validate_properties_post_request_body.rb index a6b8b42aa0..8ee59b0493 100644 --- a/lib/contacts/validate_properties/validate_properties_post_request_body.rb +++ b/lib/contacts/validate_properties/validate_properties_post_request_body.rb @@ -24,22 +24,22 @@ class ValidatePropertiesPostRequestBody # The onBehalfOfUserId property @on_behalf_of_user_id ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new validatePropertiesPostRequestBody and sets the default values. + ## Instantiates a new ValidatePropertiesPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/contacts/validate_properties/validate_properties_request_builder.rb b/lib/contacts/validate_properties/validate_properties_request_builder.rb index 3229b977fc..ad9cce3f4f 100644 --- a/lib/contacts/validate_properties/validate_properties_request_builder.rb +++ b/lib/contacts/validate_properties/validate_properties_request_builder.rb @@ -21,7 +21,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/contacts/validateProperties") end ## - ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you're only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void @@ -32,12 +32,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you're only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -45,16 +44,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a validate_properties_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ValidatePropertiesRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/contracts/contracts_request_builder.rb b/lib/contracts/contracts_request_builder.rb index dbd09a22c8..bc1d7e5848 100644 --- a/lib/contracts/contracts_request_builder.rb +++ b/lib/contracts/contracts_request_builder.rb @@ -60,7 +60,7 @@ def by_contract_id(contract_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contracts{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/contracts{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Retrieve a list of contract objects associated to a partner tenant. @@ -72,8 +72,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ContractCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -88,8 +87,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Contract.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -99,15 +97,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -119,17 +117,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a contracts_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContractsRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve a list of contract objects associated to a partner tenant. diff --git a/lib/contracts/count/count_request_builder.rb b/lib/contracts/count/count_request_builder.rb index aa765e688c..904cac8fcb 100644 --- a/lib/contracts/count/count_request_builder.rb +++ b/lib/contracts/count/count_request_builder.rb @@ -18,7 +18,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contracts/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/contracts/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -30,8 +30,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -41,17 +40,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/contracts/delta/delta.rb b/lib/contracts/delta/delta.rb index 0c348d20cb..8a3dc08b72 100644 --- a/lib/contracts/delta/delta.rb +++ b/lib/contracts/delta/delta.rb @@ -1 +1 @@ -require_relative 'delta_response' +require_relative 'delta_get_response' diff --git a/lib/contracts/delta/delta_get_response.rb b/lib/contracts/delta/delta_get_response.rb new file mode 100644 index 0000000000..8ee70760b8 --- /dev/null +++ b/lib/contracts/delta/delta_get_response.rb @@ -0,0 +1,69 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/base_delta_function_response' +require_relative '../../models/directory_object' +require_relative '../contracts' +require_relative './delta' + +module MicrosoftGraph + module Contracts + module Delta + class DeltaGetResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new DeltaGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a delta_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return DeltaGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a directory_object + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/contracts/delta/delta_request_builder.rb b/lib/contracts/delta/delta_request_builder.rb index 98a43daac3..ff7b27613f 100644 --- a/lib/contracts/delta/delta_request_builder.rb +++ b/lib/contracts/delta/delta_request_builder.rb @@ -18,49 +18,60 @@ class DeltaRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contracts/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/contracts/delta(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Invoke function delta + ## Get newly created, updated, or deleted directory objects without performing a full read of the entire directoryObject collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of delta_response + ## @return a Fiber of delta_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contracts::Delta::DeltaResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contracts::Delta::DeltaGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Invoke function delta + ## Get newly created, updated, or deleted directory objects without performing a full read of the entire directoryObject collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a delta_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeltaRequestBuilder.new(raw_url, @request_adapter) + end ## - # Invoke function delta + # Get newly created, updated, or deleted directory objects without performing a full read of the entire directoryObject collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. class DeltaRequestBuilderGetQueryParameters ## # Include count of items attr_accessor :count ## + # Expand related entities + attr_accessor :expand + ## # Filter items by property values attr_accessor :filter ## @@ -88,6 +99,8 @@ def get_query_parameter(original_name) case original_name when "count" return "%24count" + when "expand" + return "%24expand" when "filter" return "%24filter" when "orderby" diff --git a/lib/contracts/delta/delta_response.rb b/lib/contracts/delta/delta_response.rb deleted file mode 100644 index 90ab6b4544..0000000000 --- a/lib/contracts/delta/delta_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../microsoft_graph' -require_relative '../../models/base_delta_function_response' -require_relative '../../models/directory_object' -require_relative '../contracts' -require_relative './delta' - -module MicrosoftGraph - module Contracts - module Delta - class DeltaResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new deltaResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a delta_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return DeltaResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a directory_object - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end -end diff --git a/lib/contracts/get_available_extension_properties/get_available_extension_properties.rb b/lib/contracts/get_available_extension_properties/get_available_extension_properties.rb index b6fee576bf..ce1b642cad 100644 --- a/lib/contracts/get_available_extension_properties/get_available_extension_properties.rb +++ b/lib/contracts/get_available_extension_properties/get_available_extension_properties.rb @@ -1,2 +1,2 @@ require_relative 'get_available_extension_properties_post_request_body' -require_relative 'get_available_extension_properties_response' +require_relative 'get_available_extension_properties_post_response' diff --git a/lib/contracts/get_available_extension_properties/get_available_extension_properties_post_request_body.rb b/lib/contracts/get_available_extension_properties/get_available_extension_properties_post_request_body.rb index 38fa7c8d3c..dcd930b776 100644 --- a/lib/contracts/get_available_extension_properties/get_available_extension_properties_post_request_body.rb +++ b/lib/contracts/get_available_extension_properties/get_available_extension_properties_post_request_body.rb @@ -15,22 +15,22 @@ class GetAvailableExtensionPropertiesPostRequestBody # The isSyncedFromOnPremises property @is_synced_from_on_premises ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getAvailableExtensionPropertiesPostRequestBody and sets the default values. + ## Instantiates a new GetAvailableExtensionPropertiesPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/contracts/get_available_extension_properties/get_available_extension_properties_post_response.rb b/lib/contracts/get_available_extension_properties/get_available_extension_properties_post_response.rb new file mode 100644 index 0000000000..4a092e317a --- /dev/null +++ b/lib/contracts/get_available_extension_properties/get_available_extension_properties_post_response.rb @@ -0,0 +1,69 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/base_collection_pagination_count_response' +require_relative '../../models/extension_property' +require_relative '../contracts' +require_relative './get_available_extension_properties' + +module MicrosoftGraph + module Contracts + module GetAvailableExtensionProperties + class GetAvailableExtensionPropertiesPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetAvailableExtensionPropertiesPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_available_extension_properties_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetAvailableExtensionPropertiesPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ExtensionProperty.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a extension_property + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/contracts/get_available_extension_properties/get_available_extension_properties_request_builder.rb b/lib/contracts/get_available_extension_properties/get_available_extension_properties_request_builder.rb index 6fdb7a7693..c4f642c5d9 100644 --- a/lib/contracts/get_available_extension_properties/get_available_extension_properties_request_builder.rb +++ b/lib/contracts/get_available_extension_properties/get_available_extension_properties_request_builder.rb @@ -21,10 +21,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/contracts/getAvailableExtensionProperties") end ## - ## Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + ## Return all directory extension definitions that are registered in a directory, including through multitenant apps. The following entities support extension properties: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_available_extension_properties_response + ## @return a Fiber of get_available_extension_properties_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -32,12 +32,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contracts::GetAvailableExtensionProperties::GetAvailableExtensionPropertiesResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contracts::GetAvailableExtensionProperties::GetAvailableExtensionPropertiesPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + ## Return all directory extension definitions that are registered in a directory, including through multitenant apps. The following entities support extension properties: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -45,17 +44,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_available_extension_properties_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetAvailableExtensionPropertiesRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/contracts/get_available_extension_properties/get_available_extension_properties_response.rb b/lib/contracts/get_available_extension_properties/get_available_extension_properties_response.rb deleted file mode 100644 index 377501193e..0000000000 --- a/lib/contracts/get_available_extension_properties/get_available_extension_properties_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../microsoft_graph' -require_relative '../../models/base_collection_pagination_count_response' -require_relative '../../models/extension_property' -require_relative '../contracts' -require_relative './get_available_extension_properties' - -module MicrosoftGraph - module Contracts - module GetAvailableExtensionProperties - class GetAvailableExtensionPropertiesResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getAvailableExtensionPropertiesResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_available_extension_properties_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetAvailableExtensionPropertiesResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ExtensionProperty.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a extension_property - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end -end diff --git a/lib/contracts/get_by_ids/get_by_ids.rb b/lib/contracts/get_by_ids/get_by_ids.rb index e4b0824834..131a179969 100644 --- a/lib/contracts/get_by_ids/get_by_ids.rb +++ b/lib/contracts/get_by_ids/get_by_ids.rb @@ -1,2 +1,2 @@ require_relative 'get_by_ids_post_request_body' -require_relative 'get_by_ids_response' +require_relative 'get_by_ids_post_response' diff --git a/lib/contracts/get_by_ids/get_by_ids_post_request_body.rb b/lib/contracts/get_by_ids/get_by_ids_post_request_body.rb index a8f5809e3b..a6abfcf013 100644 --- a/lib/contracts/get_by_ids/get_by_ids_post_request_body.rb +++ b/lib/contracts/get_by_ids/get_by_ids_post_request_body.rb @@ -18,22 +18,22 @@ class GetByIdsPostRequestBody # The types property @types ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getByIdsPostRequestBody and sets the default values. + ## Instantiates a new GetByIdsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/contracts/get_by_ids/get_by_ids_post_response.rb b/lib/contracts/get_by_ids/get_by_ids_post_response.rb new file mode 100644 index 0000000000..074a847709 --- /dev/null +++ b/lib/contracts/get_by_ids/get_by_ids_post_response.rb @@ -0,0 +1,69 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/base_collection_pagination_count_response' +require_relative '../../models/directory_object' +require_relative '../contracts' +require_relative './get_by_ids' + +module MicrosoftGraph + module Contracts + module GetByIds + class GetByIdsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetByIdsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_by_ids_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetByIdsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a directory_object + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/contracts/get_by_ids/get_by_ids_request_builder.rb b/lib/contracts/get_by_ids/get_by_ids_request_builder.rb index 91c8dcb193..6ea5dcf7aa 100644 --- a/lib/contracts/get_by_ids/get_by_ids_request_builder.rb +++ b/lib/contracts/get_by_ids/get_by_ids_request_builder.rb @@ -24,7 +24,7 @@ def initialize(path_parameters, request_adapter) ## Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_by_ids_response + ## @return a Fiber of get_by_ids_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -32,9 +32,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contracts::GetByIds::GetByIdsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contracts::GetByIds::GetByIdsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: @@ -45,17 +44,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_by_ids_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetByIdsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/contracts/get_by_ids/get_by_ids_response.rb b/lib/contracts/get_by_ids/get_by_ids_response.rb deleted file mode 100644 index b92281d14c..0000000000 --- a/lib/contracts/get_by_ids/get_by_ids_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../microsoft_graph' -require_relative '../../models/base_collection_pagination_count_response' -require_relative '../../models/directory_object' -require_relative '../contracts' -require_relative './get_by_ids' - -module MicrosoftGraph - module Contracts - module GetByIds - class GetByIdsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getByIdsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_by_ids_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetByIdsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a directory_object - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end -end diff --git a/lib/contracts/item/check_member_groups/check_member_groups.rb b/lib/contracts/item/check_member_groups/check_member_groups.rb index 938b908522..98148024fe 100644 --- a/lib/contracts/item/check_member_groups/check_member_groups.rb +++ b/lib/contracts/item/check_member_groups/check_member_groups.rb @@ -1,2 +1,2 @@ require_relative 'check_member_groups_post_request_body' -require_relative 'check_member_groups_response' +require_relative 'check_member_groups_post_response' diff --git a/lib/contracts/item/check_member_groups/check_member_groups_post_request_body.rb b/lib/contracts/item/check_member_groups/check_member_groups_post_request_body.rb index 2f0d61da14..9d13787ca1 100644 --- a/lib/contracts/item/check_member_groups/check_member_groups_post_request_body.rb +++ b/lib/contracts/item/check_member_groups/check_member_groups_post_request_body.rb @@ -17,22 +17,22 @@ class CheckMemberGroupsPostRequestBody # The groupIds property @group_ids ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new checkMemberGroupsPostRequestBody and sets the default values. + ## Instantiates a new CheckMemberGroupsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/contracts/item/check_member_groups/check_member_groups_post_response.rb b/lib/contracts/item/check_member_groups/check_member_groups_post_response.rb new file mode 100644 index 0000000000..3f524ab4ee --- /dev/null +++ b/lib/contracts/item/check_member_groups/check_member_groups_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../contracts' +require_relative '../item' +require_relative './check_member_groups' + +module MicrosoftGraph + module Contracts + module Item + module CheckMemberGroups + class CheckMemberGroupsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new CheckMemberGroupsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a check_member_groups_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CheckMemberGroupsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/contracts/item/check_member_groups/check_member_groups_request_builder.rb b/lib/contracts/item/check_member_groups/check_member_groups_request_builder.rb index 8b2e42d13c..0432967372 100644 --- a/lib/contracts/item/check_member_groups/check_member_groups_request_builder.rb +++ b/lib/contracts/item/check_member_groups/check_member_groups_request_builder.rb @@ -23,10 +23,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/contracts/{contract%2Did}/checkMemberGroups") end ## - ## Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + ## Check for membership in a specified list of group IDs, and return from that list the IDs of groups where a specified object is a member. The specified object can be of one of the following types:- user- group- service principal- organizational contact- device- directory object This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of check_member_groups_response + ## @return a Fiber of check_member_groups_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,12 +34,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contracts::Item::CheckMemberGroups::CheckMemberGroupsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contracts::Item::CheckMemberGroups::CheckMemberGroupsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + ## Check for membership in a specified list of group IDs, and return from that list the IDs of groups where a specified object is a member. The specified object can be of one of the following types:- user- group- service principal- organizational contact- device- directory object This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a check_member_groups_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CheckMemberGroupsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/contracts/item/check_member_groups/check_member_groups_response.rb b/lib/contracts/item/check_member_groups/check_member_groups_response.rb deleted file mode 100644 index ae9cbecde8..0000000000 --- a/lib/contracts/item/check_member_groups/check_member_groups_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../contracts' -require_relative '../item' -require_relative './check_member_groups' - -module MicrosoftGraph - module Contracts - module Item - module CheckMemberGroups - class CheckMemberGroupsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new checkMemberGroupsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a check_member_groups_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return CheckMemberGroupsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/contracts/item/check_member_objects/check_member_objects.rb b/lib/contracts/item/check_member_objects/check_member_objects.rb index 67fbf971e7..1826285d49 100644 --- a/lib/contracts/item/check_member_objects/check_member_objects.rb +++ b/lib/contracts/item/check_member_objects/check_member_objects.rb @@ -1,2 +1,2 @@ require_relative 'check_member_objects_post_request_body' -require_relative 'check_member_objects_response' +require_relative 'check_member_objects_post_response' diff --git a/lib/contracts/item/check_member_objects/check_member_objects_post_request_body.rb b/lib/contracts/item/check_member_objects/check_member_objects_post_request_body.rb index e783848bea..fe9c400266 100644 --- a/lib/contracts/item/check_member_objects/check_member_objects_post_request_body.rb +++ b/lib/contracts/item/check_member_objects/check_member_objects_post_request_body.rb @@ -17,22 +17,22 @@ class CheckMemberObjectsPostRequestBody # The ids property @ids ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new checkMemberObjectsPostRequestBody and sets the default values. + ## Instantiates a new CheckMemberObjectsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/contracts/item/check_member_objects/check_member_objects_post_response.rb b/lib/contracts/item/check_member_objects/check_member_objects_post_response.rb new file mode 100644 index 0000000000..f0642d91a9 --- /dev/null +++ b/lib/contracts/item/check_member_objects/check_member_objects_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../contracts' +require_relative '../item' +require_relative './check_member_objects' + +module MicrosoftGraph + module Contracts + module Item + module CheckMemberObjects + class CheckMemberObjectsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new CheckMemberObjectsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a check_member_objects_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CheckMemberObjectsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/contracts/item/check_member_objects/check_member_objects_request_builder.rb b/lib/contracts/item/check_member_objects/check_member_objects_request_builder.rb index 9763ab5ea5..10efd5401f 100644 --- a/lib/contracts/item/check_member_objects/check_member_objects_request_builder.rb +++ b/lib/contracts/item/check_member_objects/check_member_objects_request_builder.rb @@ -26,7 +26,7 @@ def initialize(path_parameters, request_adapter) ## Invoke action checkMemberObjects ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of check_member_objects_response + ## @return a Fiber of check_member_objects_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,9 +34,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contracts::Item::CheckMemberObjects::CheckMemberObjectsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contracts::Item::CheckMemberObjects::CheckMemberObjectsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Invoke action checkMemberObjects @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a check_member_objects_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CheckMemberObjectsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/contracts/item/check_member_objects/check_member_objects_response.rb b/lib/contracts/item/check_member_objects/check_member_objects_response.rb deleted file mode 100644 index 251422950f..0000000000 --- a/lib/contracts/item/check_member_objects/check_member_objects_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../contracts' -require_relative '../item' -require_relative './check_member_objects' - -module MicrosoftGraph - module Contracts - module Item - module CheckMemberObjects - class CheckMemberObjectsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new checkMemberObjectsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a check_member_objects_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return CheckMemberObjectsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/contracts/item/contract_item_request_builder.rb b/lib/contracts/item/contract_item_request_builder.rb index fa4fbc1078..34c2e354bd 100644 --- a/lib/contracts/item/contract_item_request_builder.rb +++ b/lib/contracts/item/contract_item_request_builder.rb @@ -49,7 +49,7 @@ def restore() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/contracts/{contract%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/contracts/{contract%2Did}{?%24expand,%24select}") end ## ## Delete entity from contracts @@ -61,8 +61,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -75,8 +74,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Contract.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -91,8 +89,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Contract.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -102,13 +99,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -118,15 +116,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -138,17 +136,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a contract_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContractItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve the properties and relationships of contract object. diff --git a/lib/contracts/item/get_member_groups/get_member_groups.rb b/lib/contracts/item/get_member_groups/get_member_groups.rb index 0a25b012ea..9190b99738 100644 --- a/lib/contracts/item/get_member_groups/get_member_groups.rb +++ b/lib/contracts/item/get_member_groups/get_member_groups.rb @@ -1,2 +1,2 @@ require_relative 'get_member_groups_post_request_body' -require_relative 'get_member_groups_response' +require_relative 'get_member_groups_post_response' diff --git a/lib/contracts/item/get_member_groups/get_member_groups_post_request_body.rb b/lib/contracts/item/get_member_groups/get_member_groups_post_request_body.rb index 6c917cd622..fea096ef7a 100644 --- a/lib/contracts/item/get_member_groups/get_member_groups_post_request_body.rb +++ b/lib/contracts/item/get_member_groups/get_member_groups_post_request_body.rb @@ -17,22 +17,22 @@ class GetMemberGroupsPostRequestBody # The securityEnabledOnly property @security_enabled_only ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getMemberGroupsPostRequestBody and sets the default values. + ## Instantiates a new GetMemberGroupsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/contracts/item/get_member_groups/get_member_groups_post_response.rb b/lib/contracts/item/get_member_groups/get_member_groups_post_response.rb new file mode 100644 index 0000000000..1507dd6702 --- /dev/null +++ b/lib/contracts/item/get_member_groups/get_member_groups_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../contracts' +require_relative '../item' +require_relative './get_member_groups' + +module MicrosoftGraph + module Contracts + module Item + module GetMemberGroups + class GetMemberGroupsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetMemberGroupsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_member_groups_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetMemberGroupsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/contracts/item/get_member_groups/get_member_groups_request_builder.rb b/lib/contracts/item/get_member_groups/get_member_groups_request_builder.rb index c352f838c0..05fe8c0a4a 100644 --- a/lib/contracts/item/get_member_groups/get_member_groups_request_builder.rb +++ b/lib/contracts/item/get_member_groups/get_member_groups_request_builder.rb @@ -23,10 +23,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/contracts/{contract%2Did}/getMemberGroups") end ## - ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. + ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the DirectoryResultSizeLimitExceeded error code. If you get the DirectoryResultSizeLimitExceeded error code, use the List group transitive memberOf API instead. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_member_groups_response + ## @return a Fiber of get_member_groups_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,12 +34,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contracts::Item::GetMemberGroups::GetMemberGroupsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contracts::Item::GetMemberGroups::GetMemberGroupsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. + ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the DirectoryResultSizeLimitExceeded error code. If you get the DirectoryResultSizeLimitExceeded error code, use the List group transitive memberOf API instead. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_member_groups_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetMemberGroupsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/contracts/item/get_member_groups/get_member_groups_response.rb b/lib/contracts/item/get_member_groups/get_member_groups_response.rb deleted file mode 100644 index 58f8463311..0000000000 --- a/lib/contracts/item/get_member_groups/get_member_groups_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../contracts' -require_relative '../item' -require_relative './get_member_groups' - -module MicrosoftGraph - module Contracts - module Item - module GetMemberGroups - class GetMemberGroupsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getMemberGroupsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_member_groups_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetMemberGroupsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/contracts/item/get_member_objects/get_member_objects.rb b/lib/contracts/item/get_member_objects/get_member_objects.rb index 40edad6b9e..f7a486b0f9 100644 --- a/lib/contracts/item/get_member_objects/get_member_objects.rb +++ b/lib/contracts/item/get_member_objects/get_member_objects.rb @@ -1,2 +1,2 @@ require_relative 'get_member_objects_post_request_body' -require_relative 'get_member_objects_response' +require_relative 'get_member_objects_post_response' diff --git a/lib/contracts/item/get_member_objects/get_member_objects_post_request_body.rb b/lib/contracts/item/get_member_objects/get_member_objects_post_request_body.rb index 7173756029..2eef9f3347 100644 --- a/lib/contracts/item/get_member_objects/get_member_objects_post_request_body.rb +++ b/lib/contracts/item/get_member_objects/get_member_objects_post_request_body.rb @@ -17,22 +17,22 @@ class GetMemberObjectsPostRequestBody # The securityEnabledOnly property @security_enabled_only ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getMemberObjectsPostRequestBody and sets the default values. + ## Instantiates a new GetMemberObjectsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/contracts/item/get_member_objects/get_member_objects_post_response.rb b/lib/contracts/item/get_member_objects/get_member_objects_post_response.rb new file mode 100644 index 0000000000..5dc688ad87 --- /dev/null +++ b/lib/contracts/item/get_member_objects/get_member_objects_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../contracts' +require_relative '../item' +require_relative './get_member_objects' + +module MicrosoftGraph + module Contracts + module Item + module GetMemberObjects + class GetMemberObjectsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetMemberObjectsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_member_objects_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetMemberObjectsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/contracts/item/get_member_objects/get_member_objects_request_builder.rb b/lib/contracts/item/get_member_objects/get_member_objects_request_builder.rb index a4c4881d05..ae19f5f83e 100644 --- a/lib/contracts/item/get_member_objects/get_member_objects_request_builder.rb +++ b/lib/contracts/item/get_member_objects/get_member_objects_request_builder.rb @@ -23,10 +23,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/contracts/{contract%2Did}/getMemberObjects") end ## - ## Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + ## Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:- user- group- service principal- organizational contact- device- directory object This function is transitive. Only users and role-enabled groups can be members of directory roles. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_member_objects_response + ## @return a Fiber of get_member_objects_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,12 +34,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contracts::Item::GetMemberObjects::GetMemberObjectsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Contracts::Item::GetMemberObjects::GetMemberObjectsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + ## Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:- user- group- service principal- organizational contact- device- directory object This function is transitive. Only users and role-enabled groups can be members of directory roles. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_member_objects_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetMemberObjectsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/contracts/item/get_member_objects/get_member_objects_response.rb b/lib/contracts/item/get_member_objects/get_member_objects_response.rb deleted file mode 100644 index 318e5e23b1..0000000000 --- a/lib/contracts/item/get_member_objects/get_member_objects_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../contracts' -require_relative '../item' -require_relative './get_member_objects' - -module MicrosoftGraph - module Contracts - module Item - module GetMemberObjects - class GetMemberObjectsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getMemberObjectsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_member_objects_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetMemberObjectsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/contracts/item/restore/restore_request_builder.rb b/lib/contracts/item/restore/restore_request_builder.rb index e5f6839230..20606f3923 100644 --- a/lib/contracts/item/restore/restore_request_builder.rb +++ b/lib/contracts/item/restore/restore_request_builder.rb @@ -24,7 +24,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/contracts/{contract%2Did}/restore") end ## - ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. Restore a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_object ## @@ -33,27 +33,35 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. Restore a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a restore_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RestoreRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/contracts/validate_properties/validate_properties_post_request_body.rb b/lib/contracts/validate_properties/validate_properties_post_request_body.rb index 71cd60521d..998c838966 100644 --- a/lib/contracts/validate_properties/validate_properties_post_request_body.rb +++ b/lib/contracts/validate_properties/validate_properties_post_request_body.rb @@ -24,22 +24,22 @@ class ValidatePropertiesPostRequestBody # The onBehalfOfUserId property @on_behalf_of_user_id ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new validatePropertiesPostRequestBody and sets the default values. + ## Instantiates a new ValidatePropertiesPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/contracts/validate_properties/validate_properties_request_builder.rb b/lib/contracts/validate_properties/validate_properties_request_builder.rb index b7f89db76c..58821b4c5d 100644 --- a/lib/contracts/validate_properties/validate_properties_request_builder.rb +++ b/lib/contracts/validate_properties/validate_properties_request_builder.rb @@ -21,7 +21,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/contracts/validateProperties") end ## - ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you're only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void @@ -32,12 +32,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you're only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -45,16 +44,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a validate_properties_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ValidatePropertiesRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/data_policy_operations/count/count_request_builder.rb b/lib/data_policy_operations/count/count_request_builder.rb index 085ec6de77..b47cc27aa2 100644 --- a/lib/data_policy_operations/count/count_request_builder.rb +++ b/lib/data_policy_operations/count/count_request_builder.rb @@ -18,7 +18,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/dataPolicyOperations/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/dataPolicyOperations/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -30,8 +30,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -41,17 +40,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/data_policy_operations/data_policy_operations_request_builder.rb b/lib/data_policy_operations/data_policy_operations_request_builder.rb index 40447e48e7..8b0d77610a 100644 --- a/lib/data_policy_operations/data_policy_operations_request_builder.rb +++ b/lib/data_policy_operations/data_policy_operations_request_builder.rb @@ -36,7 +36,7 @@ def by_data_policy_operation_id(data_policy_operation_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/dataPolicyOperations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/dataPolicyOperations{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Retrieve the properties of a dataPolicyOperation object. @@ -48,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DataPolicyOperationCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -64,8 +63,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DataPolicyOperation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -75,15 +73,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -95,17 +93,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a data_policy_operations_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DataPolicyOperationsRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve the properties of a dataPolicyOperation object. diff --git a/lib/data_policy_operations/item/data_policy_operation_item_request_builder.rb b/lib/data_policy_operations/item/data_policy_operation_item_request_builder.rb index 4420f1fa08..2fd85e00f1 100644 --- a/lib/data_policy_operations/item/data_policy_operation_item_request_builder.rb +++ b/lib/data_policy_operations/item/data_policy_operation_item_request_builder.rb @@ -19,7 +19,7 @@ class DataPolicyOperationItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRe ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/dataPolicyOperations/{dataPolicyOperation%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/dataPolicyOperations/{dataPolicyOperation%2Did}{?%24expand,%24select}") end ## ## Delete entity from dataPolicyOperations @@ -31,8 +31,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,8 +44,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DataPolicyOperation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -61,8 +59,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DataPolicyOperation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -72,13 +69,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -88,15 +86,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -108,17 +106,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a data_policy_operation_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DataPolicyOperationItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve the properties of a dataPolicyOperation object. diff --git a/lib/device_app_management/android_managed_app_protections/android_managed_app_protections_request_builder.rb b/lib/device_app_management/android_managed_app_protections/android_managed_app_protections_request_builder.rb index ba9b903a1b..514267804d 100644 --- a/lib/device_app_management/android_managed_app_protections/android_managed_app_protections_request_builder.rb +++ b/lib/device_app_management/android_managed_app_protections/android_managed_app_protections_request_builder.rb @@ -38,7 +38,7 @@ def by_android_managed_app_protection_id(android_managed_app_protection_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the androidManagedAppProtection objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AndroidManagedAppProtectionCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AndroidManagedAppProtection.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a android_managed_app_protections_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AndroidManagedAppProtectionsRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the androidManagedAppProtection objects. diff --git a/lib/device_app_management/android_managed_app_protections/count/count_request_builder.rb b/lib/device_app_management/android_managed_app_protections/count/count_request_builder.rb index ebea766a2e..bc1bf35e5f 100644 --- a/lib/device_app_management/android_managed_app_protections/count/count_request_builder.rb +++ b/lib/device_app_management/android_managed_app_protections/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/android_managed_app_protections/item/android_managed_app_protection_item_request_builder.rb b/lib/device_app_management/android_managed_app_protections/item/android_managed_app_protection_item_request_builder.rb index a5c296d8fe..c8b0796e3e 100644 --- a/lib/device_app_management/android_managed_app_protections/item/android_managed_app_protection_item_request_builder.rb +++ b/lib/device_app_management/android_managed_app_protections/item/android_managed_app_protection_item_request_builder.rb @@ -39,7 +39,7 @@ def deployment_summary() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections/{androidManagedAppProtection%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections/{androidManagedAppProtection%2Did}{?%24expand,%24select}") end ## ## Deletes a androidManagedAppProtection. @@ -51,8 +51,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -65,8 +64,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AndroidManagedAppProtection.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,8 +79,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AndroidManagedAppProtection.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -92,13 +89,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -108,15 +106,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -128,17 +126,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a android_managed_app_protection_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AndroidManagedAppProtectionItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the androidManagedAppProtection object. diff --git a/lib/device_app_management/android_managed_app_protections/item/apps/apps_request_builder.rb b/lib/device_app_management/android_managed_app_protections/item/apps/apps_request_builder.rb index 8e7dd8a69a..0b61295de9 100644 --- a/lib/device_app_management/android_managed_app_protections/item/apps/apps_request_builder.rb +++ b/lib/device_app_management/android_managed_app_protections/item/apps/apps_request_builder.rb @@ -42,7 +42,7 @@ def by_managed_mobile_app_id(managed_mobile_app_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections/{androidManagedAppProtection%2Did}/apps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections/{androidManagedAppProtection%2Did}/apps{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List of apps to which the policy is deployed. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedMobileAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedMobileApp.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AppsRequestBuilder.new(raw_url, @request_adapter) + end ## # List of apps to which the policy is deployed. diff --git a/lib/device_app_management/android_managed_app_protections/item/apps/count/count_request_builder.rb b/lib/device_app_management/android_managed_app_protections/item/apps/count/count_request_builder.rb index ad6032ed4e..5d791b2ea9 100644 --- a/lib/device_app_management/android_managed_app_protections/item/apps/count/count_request_builder.rb +++ b/lib/device_app_management/android_managed_app_protections/item/apps/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections/{androidManagedAppProtection%2Did}/apps/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections/{androidManagedAppProtection%2Did}/apps/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/android_managed_app_protections/item/apps/item/managed_mobile_app_item_request_builder.rb b/lib/device_app_management/android_managed_app_protections/item/apps/item/managed_mobile_app_item_request_builder.rb index f9cb33cb2b..b91c75c583 100644 --- a/lib/device_app_management/android_managed_app_protections/item/apps/item/managed_mobile_app_item_request_builder.rb +++ b/lib/device_app_management/android_managed_app_protections/item/apps/item/managed_mobile_app_item_request_builder.rb @@ -25,7 +25,7 @@ class ManagedMobileAppItemRequestBuilder < MicrosoftKiotaAbstractions::BaseReque ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections/{androidManagedAppProtection%2Did}/apps/{managedMobileApp%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections/{androidManagedAppProtection%2Did}/apps/{managedMobileApp%2Did}{?%24expand,%24select}") end ## ## Delete navigation property apps for deviceAppManagement @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedMobileApp.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedMobileApp.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a managed_mobile_app_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagedMobileAppItemRequestBuilder.new(raw_url, @request_adapter) + end ## # List of apps to which the policy is deployed. diff --git a/lib/device_app_management/android_managed_app_protections/item/assignments/assignments_request_builder.rb b/lib/device_app_management/android_managed_app_protections/item/assignments/assignments_request_builder.rb index 21a826c1f3..fd329e9466 100644 --- a/lib/device_app_management/android_managed_app_protections/item/assignments/assignments_request_builder.rb +++ b/lib/device_app_management/android_managed_app_protections/item/assignments/assignments_request_builder.rb @@ -42,7 +42,7 @@ def by_targeted_managed_app_policy_assignment_id(targeted_managed_app_policy_ass ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections/{androidManagedAppProtection%2Did}/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections/{androidManagedAppProtection%2Did}/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Navigation property to list of inclusion and exclusion groups to which the policy is deployed. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TargetedManagedAppPolicyAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TargetedManagedAppPolicyAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end ## # Navigation property to list of inclusion and exclusion groups to which the policy is deployed. diff --git a/lib/device_app_management/android_managed_app_protections/item/assignments/count/count_request_builder.rb b/lib/device_app_management/android_managed_app_protections/item/assignments/count/count_request_builder.rb index 22cac2d879..cdaa570ab7 100644 --- a/lib/device_app_management/android_managed_app_protections/item/assignments/count/count_request_builder.rb +++ b/lib/device_app_management/android_managed_app_protections/item/assignments/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections/{androidManagedAppProtection%2Did}/assignments/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections/{androidManagedAppProtection%2Did}/assignments/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/android_managed_app_protections/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.rb b/lib/device_app_management/android_managed_app_protections/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.rb index 0ba1094d32..6e1a1f53dc 100644 --- a/lib/device_app_management/android_managed_app_protections/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.rb +++ b/lib/device_app_management/android_managed_app_protections/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.rb @@ -25,7 +25,7 @@ class TargetedManagedAppPolicyAssignmentItemRequestBuilder < MicrosoftKiotaAbstr ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections/{androidManagedAppProtection%2Did}/assignments/{targetedManagedAppPolicyAssignment%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections/{androidManagedAppProtection%2Did}/assignments/{targetedManagedAppPolicyAssignment%2Did}{?%24expand,%24select}") end ## ## Delete navigation property assignments for deviceAppManagement @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TargetedManagedAppPolicyAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TargetedManagedAppPolicyAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a targeted_managed_app_policy_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TargetedManagedAppPolicyAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Navigation property to list of inclusion and exclusion groups to which the policy is deployed. diff --git a/lib/device_app_management/android_managed_app_protections/item/deployment_summary/deployment_summary_request_builder.rb b/lib/device_app_management/android_managed_app_protections/item/deployment_summary/deployment_summary_request_builder.rb index cca13a3843..3cb8a95b22 100644 --- a/lib/device_app_management/android_managed_app_protections/item/deployment_summary/deployment_summary_request_builder.rb +++ b/lib/device_app_management/android_managed_app_protections/item/deployment_summary/deployment_summary_request_builder.rb @@ -23,7 +23,7 @@ class DeploymentSummaryRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestB ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections/{androidManagedAppProtection%2Did}/deploymentSummary{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/androidManagedAppProtections/{androidManagedAppProtection%2Did}/deploymentSummary{?%24expand,%24select}") end ## ## Delete navigation property deploymentSummary for deviceAppManagement @@ -35,8 +35,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppPolicyDeploymentSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -65,8 +63,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppPolicyDeploymentSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,13 +73,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -92,15 +90,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,17 +110,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a deployment_summary_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeploymentSummaryRequestBuilder.new(raw_url, @request_adapter) + end ## # Navigation property to deployment summary of the configuration. diff --git a/lib/device_app_management/default_managed_app_protections/count/count_request_builder.rb b/lib/device_app_management/default_managed_app_protections/count/count_request_builder.rb index 9c8d62c72d..70fbaec903 100644 --- a/lib/device_app_management/default_managed_app_protections/count/count_request_builder.rb +++ b/lib/device_app_management/default_managed_app_protections/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/defaultManagedAppProtections/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/defaultManagedAppProtections/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/default_managed_app_protections/default_managed_app_protections_request_builder.rb b/lib/device_app_management/default_managed_app_protections/default_managed_app_protections_request_builder.rb index c98cc57a75..2dc2c62c6d 100644 --- a/lib/device_app_management/default_managed_app_protections/default_managed_app_protections_request_builder.rb +++ b/lib/device_app_management/default_managed_app_protections/default_managed_app_protections_request_builder.rb @@ -38,7 +38,7 @@ def by_default_managed_app_protection_id(default_managed_app_protection_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/defaultManagedAppProtections{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/defaultManagedAppProtections{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the defaultManagedAppProtection objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DefaultManagedAppProtectionCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DefaultManagedAppProtection.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a default_managed_app_protections_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DefaultManagedAppProtectionsRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the defaultManagedAppProtection objects. diff --git a/lib/device_app_management/default_managed_app_protections/item/apps/apps_request_builder.rb b/lib/device_app_management/default_managed_app_protections/item/apps/apps_request_builder.rb index e45be274f7..5e83fb46da 100644 --- a/lib/device_app_management/default_managed_app_protections/item/apps/apps_request_builder.rb +++ b/lib/device_app_management/default_managed_app_protections/item/apps/apps_request_builder.rb @@ -42,7 +42,7 @@ def by_managed_mobile_app_id(managed_mobile_app_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/defaultManagedAppProtections/{defaultManagedAppProtection%2Did}/apps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/defaultManagedAppProtections/{defaultManagedAppProtection%2Did}/apps{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List of apps to which the policy is deployed. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedMobileAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedMobileApp.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AppsRequestBuilder.new(raw_url, @request_adapter) + end ## # List of apps to which the policy is deployed. diff --git a/lib/device_app_management/default_managed_app_protections/item/apps/count/count_request_builder.rb b/lib/device_app_management/default_managed_app_protections/item/apps/count/count_request_builder.rb index 9ca91f1c8d..fd1fa5d012 100644 --- a/lib/device_app_management/default_managed_app_protections/item/apps/count/count_request_builder.rb +++ b/lib/device_app_management/default_managed_app_protections/item/apps/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/defaultManagedAppProtections/{defaultManagedAppProtection%2Did}/apps/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/defaultManagedAppProtections/{defaultManagedAppProtection%2Did}/apps/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/default_managed_app_protections/item/apps/item/managed_mobile_app_item_request_builder.rb b/lib/device_app_management/default_managed_app_protections/item/apps/item/managed_mobile_app_item_request_builder.rb index 88875d608f..a41efe054d 100644 --- a/lib/device_app_management/default_managed_app_protections/item/apps/item/managed_mobile_app_item_request_builder.rb +++ b/lib/device_app_management/default_managed_app_protections/item/apps/item/managed_mobile_app_item_request_builder.rb @@ -25,7 +25,7 @@ class ManagedMobileAppItemRequestBuilder < MicrosoftKiotaAbstractions::BaseReque ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/defaultManagedAppProtections/{defaultManagedAppProtection%2Did}/apps/{managedMobileApp%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/defaultManagedAppProtections/{defaultManagedAppProtection%2Did}/apps/{managedMobileApp%2Did}{?%24expand,%24select}") end ## ## Delete navigation property apps for deviceAppManagement @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedMobileApp.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedMobileApp.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a managed_mobile_app_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagedMobileAppItemRequestBuilder.new(raw_url, @request_adapter) + end ## # List of apps to which the policy is deployed. diff --git a/lib/device_app_management/default_managed_app_protections/item/default_managed_app_protection_item_request_builder.rb b/lib/device_app_management/default_managed_app_protections/item/default_managed_app_protection_item_request_builder.rb index f8eea4c663..df4ce29b11 100644 --- a/lib/device_app_management/default_managed_app_protections/item/default_managed_app_protection_item_request_builder.rb +++ b/lib/device_app_management/default_managed_app_protections/item/default_managed_app_protection_item_request_builder.rb @@ -33,7 +33,7 @@ def deployment_summary() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/defaultManagedAppProtections/{defaultManagedAppProtection%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/defaultManagedAppProtections/{defaultManagedAppProtection%2Did}{?%24expand,%24select}") end ## ## Deletes a defaultManagedAppProtection. @@ -45,8 +45,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -59,8 +58,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DefaultManagedAppProtection.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -75,8 +73,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DefaultManagedAppProtection.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -86,13 +83,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -102,15 +100,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -122,17 +120,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a default_managed_app_protection_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DefaultManagedAppProtectionItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the defaultManagedAppProtection object. diff --git a/lib/device_app_management/default_managed_app_protections/item/deployment_summary/deployment_summary_request_builder.rb b/lib/device_app_management/default_managed_app_protections/item/deployment_summary/deployment_summary_request_builder.rb index 489cb6d155..bf4db8c511 100644 --- a/lib/device_app_management/default_managed_app_protections/item/deployment_summary/deployment_summary_request_builder.rb +++ b/lib/device_app_management/default_managed_app_protections/item/deployment_summary/deployment_summary_request_builder.rb @@ -23,7 +23,7 @@ class DeploymentSummaryRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestB ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/defaultManagedAppProtections/{defaultManagedAppProtection%2Did}/deploymentSummary{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/defaultManagedAppProtections/{defaultManagedAppProtection%2Did}/deploymentSummary{?%24expand,%24select}") end ## ## Delete navigation property deploymentSummary for deviceAppManagement @@ -35,8 +35,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppPolicyDeploymentSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -65,8 +63,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppPolicyDeploymentSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,13 +73,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -92,15 +90,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,17 +110,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a deployment_summary_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeploymentSummaryRequestBuilder.new(raw_url, @request_adapter) + end ## # Navigation property to deployment summary of the configuration. diff --git a/lib/device_app_management/device_app_management_request_builder.rb b/lib/device_app_management/device_app_management_request_builder.rb index 8410db0b53..d3accb42a0 100644 --- a/lib/device_app_management/device_app_management_request_builder.rb +++ b/lib/device_app_management/device_app_management_request_builder.rb @@ -107,7 +107,7 @@ def windows_information_protection_policies() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement{?%24expand,%24select}") end ## ## Read properties and relationships of the deviceAppManagement object. @@ -119,8 +119,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceAppManagement.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -135,8 +134,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceAppManagement.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -146,15 +144,15 @@ def patch(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -166,17 +164,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_app_management_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceAppManagementRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the deviceAppManagement object. diff --git a/lib/device_app_management/ios_managed_app_protections/count/count_request_builder.rb b/lib/device_app_management/ios_managed_app_protections/count/count_request_builder.rb index bed3968770..fa8ddf4dae 100644 --- a/lib/device_app_management/ios_managed_app_protections/count/count_request_builder.rb +++ b/lib/device_app_management/ios_managed_app_protections/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/ios_managed_app_protections/ios_managed_app_protections_request_builder.rb b/lib/device_app_management/ios_managed_app_protections/ios_managed_app_protections_request_builder.rb index 63bddd0d2b..bce29126a7 100644 --- a/lib/device_app_management/ios_managed_app_protections/ios_managed_app_protections_request_builder.rb +++ b/lib/device_app_management/ios_managed_app_protections/ios_managed_app_protections_request_builder.rb @@ -38,7 +38,7 @@ def by_ios_managed_app_protection_id(ios_managed_app_protection_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the iosManagedAppProtection objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::IosManagedAppProtectionCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::IosManagedAppProtection.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ios_managed_app_protections_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return IosManagedAppProtectionsRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the iosManagedAppProtection objects. diff --git a/lib/device_app_management/ios_managed_app_protections/item/apps/apps_request_builder.rb b/lib/device_app_management/ios_managed_app_protections/item/apps/apps_request_builder.rb index 7c2907566f..d889223f88 100644 --- a/lib/device_app_management/ios_managed_app_protections/item/apps/apps_request_builder.rb +++ b/lib/device_app_management/ios_managed_app_protections/item/apps/apps_request_builder.rb @@ -42,7 +42,7 @@ def by_managed_mobile_app_id(managed_mobile_app_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections/{iosManagedAppProtection%2Did}/apps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections/{iosManagedAppProtection%2Did}/apps{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the managedMobileApp objects. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedMobileAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedMobileApp.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AppsRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the managedMobileApp objects. diff --git a/lib/device_app_management/ios_managed_app_protections/item/apps/count/count_request_builder.rb b/lib/device_app_management/ios_managed_app_protections/item/apps/count/count_request_builder.rb index 8c5903735d..3046340801 100644 --- a/lib/device_app_management/ios_managed_app_protections/item/apps/count/count_request_builder.rb +++ b/lib/device_app_management/ios_managed_app_protections/item/apps/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections/{iosManagedAppProtection%2Did}/apps/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections/{iosManagedAppProtection%2Did}/apps/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/ios_managed_app_protections/item/apps/item/managed_mobile_app_item_request_builder.rb b/lib/device_app_management/ios_managed_app_protections/item/apps/item/managed_mobile_app_item_request_builder.rb index 84ec0002a4..e5c9250505 100644 --- a/lib/device_app_management/ios_managed_app_protections/item/apps/item/managed_mobile_app_item_request_builder.rb +++ b/lib/device_app_management/ios_managed_app_protections/item/apps/item/managed_mobile_app_item_request_builder.rb @@ -25,7 +25,7 @@ class ManagedMobileAppItemRequestBuilder < MicrosoftKiotaAbstractions::BaseReque ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections/{iosManagedAppProtection%2Did}/apps/{managedMobileApp%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections/{iosManagedAppProtection%2Did}/apps/{managedMobileApp%2Did}{?%24expand,%24select}") end ## ## Deletes a managedMobileApp. @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedMobileApp.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedMobileApp.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a managed_mobile_app_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagedMobileAppItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the managedMobileApp object. diff --git a/lib/device_app_management/ios_managed_app_protections/item/assignments/assignments_request_builder.rb b/lib/device_app_management/ios_managed_app_protections/item/assignments/assignments_request_builder.rb index 4b01f52dc0..7b57062fdd 100644 --- a/lib/device_app_management/ios_managed_app_protections/item/assignments/assignments_request_builder.rb +++ b/lib/device_app_management/ios_managed_app_protections/item/assignments/assignments_request_builder.rb @@ -42,10 +42,10 @@ def by_targeted_managed_app_policy_assignment_id(targeted_managed_app_policy_ass ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections/{iosManagedAppProtection%2Did}/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections/{iosManagedAppProtection%2Did}/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Navigation property to list of inclusion and exclusion groups to which the policy is deployed. + ## List properties and relationships of the targetedManagedAppPolicyAssignment objects. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of targeted_managed_app_policy_assignment_collection_response ## @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TargetedManagedAppPolicyAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,26 +69,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TargetedManagedAppPolicyAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Navigation property to list of inclusion and exclusion groups to which the policy is deployed. + ## List properties and relationships of the targetedManagedAppPolicyAssignment objects. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,20 +99,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end ## - # Navigation property to list of inclusion and exclusion groups to which the policy is deployed. + # List properties and relationships of the targetedManagedAppPolicyAssignment objects. class AssignmentsRequestBuilderGetQueryParameters ## diff --git a/lib/device_app_management/ios_managed_app_protections/item/assignments/count/count_request_builder.rb b/lib/device_app_management/ios_managed_app_protections/item/assignments/count/count_request_builder.rb index 43151bdb9c..da7cb87e22 100644 --- a/lib/device_app_management/ios_managed_app_protections/item/assignments/count/count_request_builder.rb +++ b/lib/device_app_management/ios_managed_app_protections/item/assignments/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections/{iosManagedAppProtection%2Did}/assignments/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections/{iosManagedAppProtection%2Did}/assignments/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/ios_managed_app_protections/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.rb b/lib/device_app_management/ios_managed_app_protections/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.rb index ccc0b1048d..4491809c01 100644 --- a/lib/device_app_management/ios_managed_app_protections/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.rb +++ b/lib/device_app_management/ios_managed_app_protections/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.rb @@ -25,10 +25,10 @@ class TargetedManagedAppPolicyAssignmentItemRequestBuilder < MicrosoftKiotaAbstr ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections/{iosManagedAppProtection%2Did}/assignments/{targetedManagedAppPolicyAssignment%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections/{iosManagedAppProtection%2Did}/assignments/{targetedManagedAppPolicyAssignment%2Did}{?%24expand,%24select}") end ## - ## Delete navigation property assignments for deviceAppManagement + ## Deletes a targetedManagedAppPolicyAssignment. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void ## @@ -37,12 +37,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Navigation property to list of inclusion and exclusion groups to which the policy is deployed. + ## Read properties and relationships of the targetedManagedAppPolicyAssignment object. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of targeted_managed_app_policy_assignment ## @@ -51,12 +50,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TargetedManagedAppPolicyAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Update the navigation property assignments in deviceAppManagement + ## Update the properties of a targetedManagedAppPolicyAssignment object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of targeted_managed_app_policy_assignment @@ -67,46 +65,46 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TargetedManagedAppPolicyAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Delete navigation property assignments for deviceAppManagement + ## Deletes a targetedManagedAppPolicyAssignment. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Navigation property to list of inclusion and exclusion groups to which the policy is deployed. + ## Read properties and relationships of the targetedManagedAppPolicyAssignment object. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Update the navigation property assignments in deviceAppManagement + ## Update the properties of a targetedManagedAppPolicyAssignment object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -114,20 +112,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a targeted_managed_app_policy_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TargetedManagedAppPolicyAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Navigation property to list of inclusion and exclusion groups to which the policy is deployed. + # Read properties and relationships of the targetedManagedAppPolicyAssignment object. class TargetedManagedAppPolicyAssignmentItemRequestBuilderGetQueryParameters ## diff --git a/lib/device_app_management/ios_managed_app_protections/item/deployment_summary/deployment_summary_request_builder.rb b/lib/device_app_management/ios_managed_app_protections/item/deployment_summary/deployment_summary_request_builder.rb index d962123cb0..c9ee8c51ce 100644 --- a/lib/device_app_management/ios_managed_app_protections/item/deployment_summary/deployment_summary_request_builder.rb +++ b/lib/device_app_management/ios_managed_app_protections/item/deployment_summary/deployment_summary_request_builder.rb @@ -23,7 +23,7 @@ class DeploymentSummaryRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestB ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections/{iosManagedAppProtection%2Did}/deploymentSummary{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections/{iosManagedAppProtection%2Did}/deploymentSummary{?%24expand,%24select}") end ## ## Delete navigation property deploymentSummary for deviceAppManagement @@ -35,8 +35,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppPolicyDeploymentSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -65,8 +63,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppPolicyDeploymentSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,13 +73,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -92,15 +90,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,17 +110,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a deployment_summary_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeploymentSummaryRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the managedAppPolicyDeploymentSummary object. diff --git a/lib/device_app_management/ios_managed_app_protections/item/ios_managed_app_protection_item_request_builder.rb b/lib/device_app_management/ios_managed_app_protections/item/ios_managed_app_protection_item_request_builder.rb index 93249f66bb..abd06ac03c 100644 --- a/lib/device_app_management/ios_managed_app_protections/item/ios_managed_app_protection_item_request_builder.rb +++ b/lib/device_app_management/ios_managed_app_protections/item/ios_managed_app_protection_item_request_builder.rb @@ -39,7 +39,7 @@ def deployment_summary() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections/{iosManagedAppProtection%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/iosManagedAppProtections/{iosManagedAppProtection%2Did}{?%24expand,%24select}") end ## ## Deletes a iosManagedAppProtection. @@ -51,8 +51,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -65,8 +64,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::IosManagedAppProtection.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,8 +79,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::IosManagedAppProtection.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -92,13 +89,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -108,15 +106,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -128,17 +126,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ios_managed_app_protection_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return IosManagedAppProtectionItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the iosManagedAppProtection object. diff --git a/lib/device_app_management/managed_app_policies/count/count_request_builder.rb b/lib/device_app_management/managed_app_policies/count/count_request_builder.rb index a244890488..9c168ba8e8 100644 --- a/lib/device_app_management/managed_app_policies/count/count_request_builder.rb +++ b/lib/device_app_management/managed_app_policies/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppPolicies/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppPolicies/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/managed_app_policies/item/managed_app_policy_item_request_builder.rb b/lib/device_app_management/managed_app_policies/item/managed_app_policy_item_request_builder.rb index c4fe072d26..041a705e9f 100644 --- a/lib/device_app_management/managed_app_policies/item/managed_app_policy_item_request_builder.rb +++ b/lib/device_app_management/managed_app_policies/item/managed_app_policy_item_request_builder.rb @@ -27,7 +27,7 @@ def target_apps() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppPolicies/{managedAppPolicy%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppPolicies/{managedAppPolicy%2Did}{?%24expand,%24select}") end ## ## Delete navigation property managedAppPolicies for deviceAppManagement @@ -39,12 +39,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Read properties and relationships of the managedAppPolicy object. + ## Read properties and relationships of the managedAppConfiguration object. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of managed_app_policy ## @@ -53,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppPolicy.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -69,8 +67,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppPolicy.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -80,31 +77,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Read properties and relationships of the managedAppPolicy object. + ## Read properties and relationships of the managedAppConfiguration object. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -116,20 +114,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a managed_app_policy_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagedAppPolicyItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Read properties and relationships of the managedAppPolicy object. + # Read properties and relationships of the managedAppConfiguration object. class ManagedAppPolicyItemRequestBuilderGetQueryParameters ## diff --git a/lib/device_app_management/managed_app_policies/item/target_apps/target_apps_post_request_body.rb b/lib/device_app_management/managed_app_policies/item/target_apps/target_apps_post_request_body.rb index 94881ca4de..cddb17812b 100644 --- a/lib/device_app_management/managed_app_policies/item/target_apps/target_apps_post_request_body.rb +++ b/lib/device_app_management/managed_app_policies/item/target_apps/target_apps_post_request_body.rb @@ -20,15 +20,15 @@ class TargetAppsPostRequestBody # The apps property @apps ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -50,7 +50,7 @@ def apps=(value) @apps = value end ## - ## Instantiates a new targetAppsPostRequestBody and sets the default values. + ## Instantiates a new TargetAppsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_app_management/managed_app_policies/item/target_apps/target_apps_request_builder.rb b/lib/device_app_management/managed_app_policies/item/target_apps/target_apps_request_builder.rb index 567d81f605..0b6805d721 100644 --- a/lib/device_app_management/managed_app_policies/item/target_apps/target_apps_request_builder.rb +++ b/lib/device_app_management/managed_app_policies/item/target_apps/target_apps_request_builder.rb @@ -36,8 +36,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a target_apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TargetAppsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_app_management/managed_app_policies/managed_app_policies_request_builder.rb b/lib/device_app_management/managed_app_policies/managed_app_policies_request_builder.rb index c6b98a386d..20d66378ea 100644 --- a/lib/device_app_management/managed_app_policies/managed_app_policies_request_builder.rb +++ b/lib/device_app_management/managed_app_policies/managed_app_policies_request_builder.rb @@ -38,10 +38,10 @@ def by_managed_app_policy_id(managed_app_policy_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppPolicies{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppPolicies{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## List properties and relationships of the windowsInformationProtection objects. + ## List properties and relationships of the managedAppConfiguration objects. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of managed_app_policy_collection_response ## @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppPolicyCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,26 +65,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppPolicy.create_from_discriminator_value(pn) }, error_mapping) end ## - ## List properties and relationships of the windowsInformationProtection objects. + ## List properties and relationships of the managedAppConfiguration objects. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,20 +95,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a managed_app_policies_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagedAppPoliciesRequestBuilder.new(raw_url, @request_adapter) + end ## - # List properties and relationships of the windowsInformationProtection objects. + # List properties and relationships of the managedAppConfiguration objects. class ManagedAppPoliciesRequestBuilderGetQueryParameters ## diff --git a/lib/device_app_management/managed_app_registrations/count/count_request_builder.rb b/lib/device_app_management/managed_app_registrations/count/count_request_builder.rb index 8daedaa16d..dc41f17621 100644 --- a/lib/device_app_management/managed_app_registrations/count/count_request_builder.rb +++ b/lib/device_app_management/managed_app_registrations/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration.rb b/lib/device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration.rb index b374e4812b..d5c6d95ae7 100644 --- a/lib/device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration.rb +++ b/lib/device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration.rb @@ -1 +1 @@ -require_relative 'get_user_ids_with_flagged_app_registration_response' +require_relative 'get_user_ids_with_flagged_app_registration_get_response' diff --git a/lib/device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration_get_response.rb b/lib/device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration_get_response.rb new file mode 100644 index 0000000000..a6be5c4587 --- /dev/null +++ b/lib/device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration_get_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../device_app_management' +require_relative '../managed_app_registrations' +require_relative './get_user_ids_with_flagged_app_registration' + +module MicrosoftGraph + module DeviceAppManagement + module ManagedAppRegistrations + module GetUserIdsWithFlaggedAppRegistration + class GetUserIdsWithFlaggedAppRegistrationGetResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetUserIdsWithFlaggedAppRegistrationGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_user_ids_with_flagged_app_registration_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetUserIdsWithFlaggedAppRegistrationGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration_request_builder.rb b/lib/device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration_request_builder.rb index dfc16f79a9..43c49412cb 100644 --- a/lib/device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration_request_builder.rb +++ b/lib/device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration_request_builder.rb @@ -20,43 +20,51 @@ class GetUserIdsWithFlaggedAppRegistrationRequestBuilder < MicrosoftKiotaAbstrac ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations/getUserIdsWithFlaggedAppRegistration(){?%24top,%24skip,%24search,%24filter,%24count}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations/getUserIdsWithFlaggedAppRegistration(){?%24count,%24filter,%24search,%24skip,%24top}") end ## - ## Invoke function getUserIdsWithFlaggedAppRegistration + ## Not yet documented ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_user_ids_with_flagged_app_registration_response + ## @return a Fiber of get_user_ids_with_flagged_app_registration_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceAppManagement::ManagedAppRegistrations::GetUserIdsWithFlaggedAppRegistration::GetUserIdsWithFlaggedAppRegistrationResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceAppManagement::ManagedAppRegistrations::GetUserIdsWithFlaggedAppRegistration::GetUserIdsWithFlaggedAppRegistrationGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Invoke function getUserIdsWithFlaggedAppRegistration + ## Not yet documented ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_user_ids_with_flagged_app_registration_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetUserIdsWithFlaggedAppRegistrationRequestBuilder.new(raw_url, @request_adapter) + end ## - # Invoke function getUserIdsWithFlaggedAppRegistration + # Not yet documented class GetUserIdsWithFlaggedAppRegistrationRequestBuilderGetQueryParameters ## diff --git a/lib/device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration_response.rb b/lib/device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration_response.rb deleted file mode 100644 index d1193eaeea..0000000000 --- a/lib/device_app_management/managed_app_registrations/get_user_ids_with_flagged_app_registration/get_user_ids_with_flagged_app_registration_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../device_app_management' -require_relative '../managed_app_registrations' -require_relative './get_user_ids_with_flagged_app_registration' - -module MicrosoftGraph - module DeviceAppManagement - module ManagedAppRegistrations - module GetUserIdsWithFlaggedAppRegistration - class GetUserIdsWithFlaggedAppRegistrationResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getUserIdsWithFlaggedAppRegistrationResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_user_ids_with_flagged_app_registration_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetUserIdsWithFlaggedAppRegistrationResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/device_app_management/managed_app_registrations/item/applied_policies/applied_policies_request_builder.rb b/lib/device_app_management/managed_app_registrations/item/applied_policies/applied_policies_request_builder.rb index c83e76e60f..55752a3054 100644 --- a/lib/device_app_management/managed_app_registrations/item/applied_policies/applied_policies_request_builder.rb +++ b/lib/device_app_management/managed_app_registrations/item/applied_policies/applied_policies_request_builder.rb @@ -42,7 +42,7 @@ def by_managed_app_policy_id(managed_app_policy_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations/{managedAppRegistration%2Did}/appliedPolicies{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations/{managedAppRegistration%2Did}/appliedPolicies{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Zero or more policys already applied on the registered app when it last synchronized with managment service. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppPolicyCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppPolicy.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a applied_policies_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AppliedPoliciesRequestBuilder.new(raw_url, @request_adapter) + end ## # Zero or more policys already applied on the registered app when it last synchronized with managment service. diff --git a/lib/device_app_management/managed_app_registrations/item/applied_policies/count/count_request_builder.rb b/lib/device_app_management/managed_app_registrations/item/applied_policies/count/count_request_builder.rb index d82f0c1a31..eb6d58a99d 100644 --- a/lib/device_app_management/managed_app_registrations/item/applied_policies/count/count_request_builder.rb +++ b/lib/device_app_management/managed_app_registrations/item/applied_policies/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations/{managedAppRegistration%2Did}/appliedPolicies/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations/{managedAppRegistration%2Did}/appliedPolicies/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/managed_app_registrations/item/applied_policies/item/managed_app_policy_item_request_builder.rb b/lib/device_app_management/managed_app_registrations/item/applied_policies/item/managed_app_policy_item_request_builder.rb index d79b8cae91..0db41374dd 100644 --- a/lib/device_app_management/managed_app_registrations/item/applied_policies/item/managed_app_policy_item_request_builder.rb +++ b/lib/device_app_management/managed_app_registrations/item/applied_policies/item/managed_app_policy_item_request_builder.rb @@ -31,7 +31,7 @@ def target_apps() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations/{managedAppRegistration%2Did}/appliedPolicies/{managedAppPolicy%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations/{managedAppRegistration%2Did}/appliedPolicies/{managedAppPolicy%2Did}{?%24expand,%24select}") end ## ## Delete navigation property appliedPolicies for deviceAppManagement @@ -43,8 +43,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -57,8 +56,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppPolicy.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -73,8 +71,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppPolicy.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -84,13 +81,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -100,15 +98,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -120,17 +118,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a managed_app_policy_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagedAppPolicyItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Zero or more policys already applied on the registered app when it last synchronized with managment service. diff --git a/lib/device_app_management/managed_app_registrations/item/applied_policies/item/target_apps/target_apps_post_request_body.rb b/lib/device_app_management/managed_app_registrations/item/applied_policies/item/target_apps/target_apps_post_request_body.rb index 70733c46dd..3805d5b72c 100644 --- a/lib/device_app_management/managed_app_registrations/item/applied_policies/item/target_apps/target_apps_post_request_body.rb +++ b/lib/device_app_management/managed_app_registrations/item/applied_policies/item/target_apps/target_apps_post_request_body.rb @@ -24,15 +24,15 @@ class TargetAppsPostRequestBody # The apps property @apps ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -54,7 +54,7 @@ def apps=(value) @apps = value end ## - ## Instantiates a new targetAppsPostRequestBody and sets the default values. + ## Instantiates a new TargetAppsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_app_management/managed_app_registrations/item/applied_policies/item/target_apps/target_apps_request_builder.rb b/lib/device_app_management/managed_app_registrations/item/applied_policies/item/target_apps/target_apps_request_builder.rb index d6a5c7d4fd..5e10a07335 100644 --- a/lib/device_app_management/managed_app_registrations/item/applied_policies/item/target_apps/target_apps_request_builder.rb +++ b/lib/device_app_management/managed_app_registrations/item/applied_policies/item/target_apps/target_apps_request_builder.rb @@ -40,8 +40,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -53,16 +52,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a target_apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TargetAppsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_app_management/managed_app_registrations/item/intended_policies/count/count_request_builder.rb b/lib/device_app_management/managed_app_registrations/item/intended_policies/count/count_request_builder.rb index a2f72e97b7..9518c3b219 100644 --- a/lib/device_app_management/managed_app_registrations/item/intended_policies/count/count_request_builder.rb +++ b/lib/device_app_management/managed_app_registrations/item/intended_policies/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations/{managedAppRegistration%2Did}/intendedPolicies/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations/{managedAppRegistration%2Did}/intendedPolicies/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/managed_app_registrations/item/intended_policies/intended_policies_request_builder.rb b/lib/device_app_management/managed_app_registrations/item/intended_policies/intended_policies_request_builder.rb index 120a8ebac5..89eebc411e 100644 --- a/lib/device_app_management/managed_app_registrations/item/intended_policies/intended_policies_request_builder.rb +++ b/lib/device_app_management/managed_app_registrations/item/intended_policies/intended_policies_request_builder.rb @@ -42,7 +42,7 @@ def by_managed_app_policy_id(managed_app_policy_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations/{managedAppRegistration%2Did}/intendedPolicies{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations/{managedAppRegistration%2Did}/intendedPolicies{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Zero or more policies admin intended for the app as of now. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppPolicyCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppPolicy.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a intended_policies_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return IntendedPoliciesRequestBuilder.new(raw_url, @request_adapter) + end ## # Zero or more policies admin intended for the app as of now. diff --git a/lib/device_app_management/managed_app_registrations/item/intended_policies/item/managed_app_policy_item_request_builder.rb b/lib/device_app_management/managed_app_registrations/item/intended_policies/item/managed_app_policy_item_request_builder.rb index 3da5224ee9..148eafb9a6 100644 --- a/lib/device_app_management/managed_app_registrations/item/intended_policies/item/managed_app_policy_item_request_builder.rb +++ b/lib/device_app_management/managed_app_registrations/item/intended_policies/item/managed_app_policy_item_request_builder.rb @@ -31,7 +31,7 @@ def target_apps() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations/{managedAppRegistration%2Did}/intendedPolicies/{managedAppPolicy%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations/{managedAppRegistration%2Did}/intendedPolicies/{managedAppPolicy%2Did}{?%24expand,%24select}") end ## ## Delete navigation property intendedPolicies for deviceAppManagement @@ -43,8 +43,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -57,8 +56,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppPolicy.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -73,8 +71,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppPolicy.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -84,13 +81,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -100,15 +98,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -120,17 +118,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a managed_app_policy_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagedAppPolicyItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Zero or more policies admin intended for the app as of now. diff --git a/lib/device_app_management/managed_app_registrations/item/intended_policies/item/target_apps/target_apps_post_request_body.rb b/lib/device_app_management/managed_app_registrations/item/intended_policies/item/target_apps/target_apps_post_request_body.rb index 0f34a84896..2ba8ac9db2 100644 --- a/lib/device_app_management/managed_app_registrations/item/intended_policies/item/target_apps/target_apps_post_request_body.rb +++ b/lib/device_app_management/managed_app_registrations/item/intended_policies/item/target_apps/target_apps_post_request_body.rb @@ -24,15 +24,15 @@ class TargetAppsPostRequestBody # The apps property @apps ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -54,7 +54,7 @@ def apps=(value) @apps = value end ## - ## Instantiates a new targetAppsPostRequestBody and sets the default values. + ## Instantiates a new TargetAppsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_app_management/managed_app_registrations/item/intended_policies/item/target_apps/target_apps_request_builder.rb b/lib/device_app_management/managed_app_registrations/item/intended_policies/item/target_apps/target_apps_request_builder.rb index 117e48b946..7254153813 100644 --- a/lib/device_app_management/managed_app_registrations/item/intended_policies/item/target_apps/target_apps_request_builder.rb +++ b/lib/device_app_management/managed_app_registrations/item/intended_policies/item/target_apps/target_apps_request_builder.rb @@ -40,8 +40,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -53,16 +52,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a target_apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TargetAppsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_app_management/managed_app_registrations/item/managed_app_registration_item_request_builder.rb b/lib/device_app_management/managed_app_registrations/item/managed_app_registration_item_request_builder.rb index 57725b0254..f50ab6606e 100644 --- a/lib/device_app_management/managed_app_registrations/item/managed_app_registration_item_request_builder.rb +++ b/lib/device_app_management/managed_app_registrations/item/managed_app_registration_item_request_builder.rb @@ -39,7 +39,7 @@ def operations() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations/{managedAppRegistration%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations/{managedAppRegistration%2Did}{?%24expand,%24select}") end ## ## Delete navigation property managedAppRegistrations for deviceAppManagement @@ -51,12 +51,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Read properties and relationships of the managedAppRegistration object. + ## Read properties and relationships of the androidManagedAppRegistration object. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of managed_app_registration ## @@ -65,8 +64,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppRegistration.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,8 +79,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppRegistration.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -92,31 +89,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Read properties and relationships of the managedAppRegistration object. + ## Read properties and relationships of the androidManagedAppRegistration object. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -128,20 +126,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a managed_app_registration_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagedAppRegistrationItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Read properties and relationships of the managedAppRegistration object. + # Read properties and relationships of the androidManagedAppRegistration object. class ManagedAppRegistrationItemRequestBuilderGetQueryParameters ## diff --git a/lib/device_app_management/managed_app_registrations/item/operations/count/count_request_builder.rb b/lib/device_app_management/managed_app_registrations/item/operations/count/count_request_builder.rb index 6d7abf29a3..f570f8b67f 100644 --- a/lib/device_app_management/managed_app_registrations/item/operations/count/count_request_builder.rb +++ b/lib/device_app_management/managed_app_registrations/item/operations/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations/{managedAppRegistration%2Did}/operations/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations/{managedAppRegistration%2Did}/operations/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/managed_app_registrations/item/operations/item/managed_app_operation_item_request_builder.rb b/lib/device_app_management/managed_app_registrations/item/operations/item/managed_app_operation_item_request_builder.rb index 8113509287..112700f874 100644 --- a/lib/device_app_management/managed_app_registrations/item/operations/item/managed_app_operation_item_request_builder.rb +++ b/lib/device_app_management/managed_app_registrations/item/operations/item/managed_app_operation_item_request_builder.rb @@ -25,7 +25,7 @@ class ManagedAppOperationItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRe ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations/{managedAppRegistration%2Did}/operations/{managedAppOperation%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations/{managedAppRegistration%2Did}/operations/{managedAppOperation%2Did}{?%24expand,%24select}") end ## ## Deletes a managedAppOperation. @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppOperation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppOperation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a managed_app_operation_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagedAppOperationItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the managedAppOperation object. diff --git a/lib/device_app_management/managed_app_registrations/item/operations/operations_request_builder.rb b/lib/device_app_management/managed_app_registrations/item/operations/operations_request_builder.rb index d85ea61e2e..1f7d4729ec 100644 --- a/lib/device_app_management/managed_app_registrations/item/operations/operations_request_builder.rb +++ b/lib/device_app_management/managed_app_registrations/item/operations/operations_request_builder.rb @@ -42,7 +42,7 @@ def by_managed_app_operation_id(managed_app_operation_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations/{managedAppRegistration%2Did}/operations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations/{managedAppRegistration%2Did}/operations{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the managedAppOperation objects. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppOperationCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppOperation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a operations_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return OperationsRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the managedAppOperation objects. diff --git a/lib/device_app_management/managed_app_registrations/managed_app_registrations_request_builder.rb b/lib/device_app_management/managed_app_registrations/managed_app_registrations_request_builder.rb index 43ff8f0a0d..c251210b84 100644 --- a/lib/device_app_management/managed_app_registrations/managed_app_registrations_request_builder.rb +++ b/lib/device_app_management/managed_app_registrations/managed_app_registrations_request_builder.rb @@ -44,10 +44,10 @@ def by_managed_app_registration_id(managed_app_registration_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppRegistrations{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## List properties and relationships of the managedAppRegistration objects. + ## List properties and relationships of the androidManagedAppRegistration objects. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of managed_app_registration_collection_response ## @@ -56,8 +56,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppRegistrationCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -72,26 +71,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppRegistration.create_from_discriminator_value(pn) }, error_mapping) end ## - ## List properties and relationships of the managedAppRegistration objects. + ## List properties and relationships of the androidManagedAppRegistration objects. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -103,20 +101,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a managed_app_registrations_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagedAppRegistrationsRequestBuilder.new(raw_url, @request_adapter) + end ## - # List properties and relationships of the managedAppRegistration objects. + # List properties and relationships of the androidManagedAppRegistration objects. class ManagedAppRegistrationsRequestBuilderGetQueryParameters ## diff --git a/lib/device_app_management/managed_app_statuses/count/count_request_builder.rb b/lib/device_app_management/managed_app_statuses/count/count_request_builder.rb index 2794b8efc2..67299a1e90 100644 --- a/lib/device_app_management/managed_app_statuses/count/count_request_builder.rb +++ b/lib/device_app_management/managed_app_statuses/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppStatuses/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppStatuses/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/managed_app_statuses/item/managed_app_status_item_request_builder.rb b/lib/device_app_management/managed_app_statuses/item/managed_app_status_item_request_builder.rb index 94c6ee7f53..ce3042d184 100644 --- a/lib/device_app_management/managed_app_statuses/item/managed_app_status_item_request_builder.rb +++ b/lib/device_app_management/managed_app_statuses/item/managed_app_status_item_request_builder.rb @@ -21,7 +21,7 @@ class ManagedAppStatusItemRequestBuilder < MicrosoftKiotaAbstractions::BaseReque ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppStatuses/{managedAppStatus%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppStatuses/{managedAppStatus%2Did}{?%24expand,%24select}") end ## ## Delete navigation property managedAppStatuses for deviceAppManagement @@ -33,12 +33,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Read properties and relationships of the managedAppStatus object. + ## Read properties and relationships of the managedAppStatusRaw object. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of managed_app_status ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,31 +71,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Read properties and relationships of the managedAppStatus object. + ## Read properties and relationships of the managedAppStatusRaw object. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,20 +108,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a managed_app_status_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagedAppStatusItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Read properties and relationships of the managedAppStatus object. + # Read properties and relationships of the managedAppStatusRaw object. class ManagedAppStatusItemRequestBuilderGetQueryParameters ## diff --git a/lib/device_app_management/managed_app_statuses/managed_app_statuses_request_builder.rb b/lib/device_app_management/managed_app_statuses/managed_app_statuses_request_builder.rb index e23418da7f..9e3516ca70 100644 --- a/lib/device_app_management/managed_app_statuses/managed_app_statuses_request_builder.rb +++ b/lib/device_app_management/managed_app_statuses/managed_app_statuses_request_builder.rb @@ -38,7 +38,7 @@ def by_managed_app_status_id(managed_app_status_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppStatuses{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedAppStatuses{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the managedAppStatusRaw objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppStatusCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a managed_app_statuses_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagedAppStatusesRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the managedAppStatusRaw objects. diff --git a/lib/device_app_management/managed_e_books/count/count_request_builder.rb b/lib/device_app_management/managed_e_books/count/count_request_builder.rb index f87c5c2941..726dd95164 100644 --- a/lib/device_app_management/managed_e_books/count/count_request_builder.rb +++ b/lib/device_app_management/managed_e_books/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/managed_e_books/item/assign/assign_post_request_body.rb b/lib/device_app_management/managed_e_books/item/assign/assign_post_request_body.rb index 8ed66bf1c5..c94fc1a3dd 100644 --- a/lib/device_app_management/managed_e_books/item/assign/assign_post_request_body.rb +++ b/lib/device_app_management/managed_e_books/item/assign/assign_post_request_body.rb @@ -20,22 +20,22 @@ class AssignPostRequestBody # The managedEBookAssignments property @managed_e_book_assignments ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new assignPostRequestBody and sets the default values. + ## Instantiates a new AssignPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_app_management/managed_e_books/item/assign/assign_request_builder.rb b/lib/device_app_management/managed_e_books/item/assign/assign_request_builder.rb index 7a0b8881f3..af75ce2d84 100644 --- a/lib/device_app_management/managed_e_books/item/assign/assign_request_builder.rb +++ b/lib/device_app_management/managed_e_books/item/assign/assign_request_builder.rb @@ -36,8 +36,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assign_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_app_management/managed_e_books/item/assignments/assignments_request_builder.rb b/lib/device_app_management/managed_e_books/item/assignments/assignments_request_builder.rb index 02f4397c78..aaf3c9c00c 100644 --- a/lib/device_app_management/managed_e_books/item/assignments/assignments_request_builder.rb +++ b/lib/device_app_management/managed_e_books/item/assignments/assignments_request_builder.rb @@ -42,10 +42,10 @@ def by_managed_e_book_assignment_id(managed_e_book_assignment_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## List properties and relationships of the iosVppEBookAssignment objects. + ## List properties and relationships of the managedEBookAssignment objects. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of managed_e_book_assignment_collection_response ## @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedEBookAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,26 +69,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedEBookAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## - ## List properties and relationships of the iosVppEBookAssignment objects. + ## List properties and relationships of the managedEBookAssignment objects. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,20 +99,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end ## - # List properties and relationships of the iosVppEBookAssignment objects. + # List properties and relationships of the managedEBookAssignment objects. class AssignmentsRequestBuilderGetQueryParameters ## diff --git a/lib/device_app_management/managed_e_books/item/assignments/count/count_request_builder.rb b/lib/device_app_management/managed_e_books/item/assignments/count/count_request_builder.rb index 7b47fdf189..8d6275da92 100644 --- a/lib/device_app_management/managed_e_books/item/assignments/count/count_request_builder.rb +++ b/lib/device_app_management/managed_e_books/item/assignments/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/assignments/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/assignments/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/managed_e_books/item/assignments/item/managed_e_book_assignment_item_request_builder.rb b/lib/device_app_management/managed_e_books/item/assignments/item/managed_e_book_assignment_item_request_builder.rb index d1bdf44415..07318f1ffb 100644 --- a/lib/device_app_management/managed_e_books/item/assignments/item/managed_e_book_assignment_item_request_builder.rb +++ b/lib/device_app_management/managed_e_books/item/assignments/item/managed_e_book_assignment_item_request_builder.rb @@ -25,10 +25,10 @@ class ManagedEBookAssignmentItemRequestBuilder < MicrosoftKiotaAbstractions::Bas ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/assignments/{managedEBookAssignment%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/assignments/{managedEBookAssignment%2Did}{?%24expand,%24select}") end ## - ## Deletes a iosVppEBookAssignment. + ## Deletes a managedEBookAssignment. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void ## @@ -37,12 +37,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Read properties and relationships of the iosVppEBookAssignment object. + ## Read properties and relationships of the managedEBookAssignment object. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of managed_e_book_assignment ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedEBookAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,42 +65,42 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedEBookAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Deletes a iosVppEBookAssignment. + ## Deletes a managedEBookAssignment. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Read properties and relationships of the iosVppEBookAssignment object. + ## Read properties and relationships of the managedEBookAssignment object. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,20 +112,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a managed_e_book_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagedEBookAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Read properties and relationships of the iosVppEBookAssignment object. + # Read properties and relationships of the managedEBookAssignment object. class ManagedEBookAssignmentItemRequestBuilderGetQueryParameters ## diff --git a/lib/device_app_management/managed_e_books/item/device_states/count/count_request_builder.rb b/lib/device_app_management/managed_e_books/item/device_states/count/count_request_builder.rb index bfa83c7ae7..1500541be1 100644 --- a/lib/device_app_management/managed_e_books/item/device_states/count/count_request_builder.rb +++ b/lib/device_app_management/managed_e_books/item/device_states/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/deviceStates/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/deviceStates/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/managed_e_books/item/device_states/device_states_request_builder.rb b/lib/device_app_management/managed_e_books/item/device_states/device_states_request_builder.rb index 815960d7d0..a88798785a 100644 --- a/lib/device_app_management/managed_e_books/item/device_states/device_states_request_builder.rb +++ b/lib/device_app_management/managed_e_books/item/device_states/device_states_request_builder.rb @@ -42,7 +42,7 @@ def by_device_install_state_id(device_install_state_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/deviceStates{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/deviceStates{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the deviceInstallState objects. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceInstallStateCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceInstallState.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_states_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceStatesRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the deviceInstallState objects. diff --git a/lib/device_app_management/managed_e_books/item/device_states/item/device_install_state_item_request_builder.rb b/lib/device_app_management/managed_e_books/item/device_states/item/device_install_state_item_request_builder.rb index 38b443f282..48362c6b35 100644 --- a/lib/device_app_management/managed_e_books/item/device_states/item/device_install_state_item_request_builder.rb +++ b/lib/device_app_management/managed_e_books/item/device_states/item/device_install_state_item_request_builder.rb @@ -25,7 +25,7 @@ class DeviceInstallStateItemRequestBuilder < MicrosoftKiotaAbstractions::BaseReq ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/deviceStates/{deviceInstallState%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/deviceStates/{deviceInstallState%2Did}{?%24expand,%24select}") end ## ## Deletes a deviceInstallState. @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceInstallState.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceInstallState.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_install_state_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceInstallStateItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the deviceInstallState object. diff --git a/lib/device_app_management/managed_e_books/item/install_summary/install_summary_request_builder.rb b/lib/device_app_management/managed_e_books/item/install_summary/install_summary_request_builder.rb index 1462eb1d2c..86f5761c25 100644 --- a/lib/device_app_management/managed_e_books/item/install_summary/install_summary_request_builder.rb +++ b/lib/device_app_management/managed_e_books/item/install_summary/install_summary_request_builder.rb @@ -23,7 +23,7 @@ class InstallSummaryRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuil ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/installSummary{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/installSummary{?%24expand,%24select}") end ## ## Delete navigation property installSummary for deviceAppManagement @@ -35,8 +35,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::EBookInstallSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -65,8 +63,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::EBookInstallSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,13 +73,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -92,15 +90,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,17 +110,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a install_summary_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return InstallSummaryRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the eBookInstallSummary object. diff --git a/lib/device_app_management/managed_e_books/item/managed_e_book_item_request_builder.rb b/lib/device_app_management/managed_e_books/item/managed_e_book_item_request_builder.rb index acd1365314..504637a868 100644 --- a/lib/device_app_management/managed_e_books/item/managed_e_book_item_request_builder.rb +++ b/lib/device_app_management/managed_e_books/item/managed_e_book_item_request_builder.rb @@ -51,7 +51,7 @@ def user_state_summary() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}{?%24expand,%24select}") end ## ## Deletes a iosVppEBook. @@ -63,12 +63,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Read properties and relationships of the iosVppEBook object. + ## Read properties and relationships of the managedEBook object. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of managed_e_book ## @@ -77,8 +76,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedEBook.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -93,8 +91,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedEBook.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -104,31 +101,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Read properties and relationships of the iosVppEBook object. + ## Read properties and relationships of the managedEBook object. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -140,20 +138,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a managed_e_book_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagedEBookItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Read properties and relationships of the iosVppEBook object. + # Read properties and relationships of the managedEBook object. class ManagedEBookItemRequestBuilderGetQueryParameters ## diff --git a/lib/device_app_management/managed_e_books/item/user_state_summary/count/count_request_builder.rb b/lib/device_app_management/managed_e_books/item/user_state_summary/count/count_request_builder.rb index e29145c1cd..c402d1acbe 100644 --- a/lib/device_app_management/managed_e_books/item/user_state_summary/count/count_request_builder.rb +++ b/lib/device_app_management/managed_e_books/item/user_state_summary/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/userStateSummary/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/userStateSummary/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/managed_e_books/item/user_state_summary/item/device_states/count/count_request_builder.rb b/lib/device_app_management/managed_e_books/item/user_state_summary/item/device_states/count/count_request_builder.rb index 68e9264124..5451570c95 100644 --- a/lib/device_app_management/managed_e_books/item/user_state_summary/item/device_states/count/count_request_builder.rb +++ b/lib/device_app_management/managed_e_books/item/user_state_summary/item/device_states/count/count_request_builder.rb @@ -28,7 +28,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/userStateSummary/{userInstallStateSummary%2Did}/deviceStates/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/userStateSummary/{userInstallStateSummary%2Did}/deviceStates/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -40,8 +40,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -51,17 +50,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/managed_e_books/item/user_state_summary/item/device_states/device_states_request_builder.rb b/lib/device_app_management/managed_e_books/item/user_state_summary/item/device_states/device_states_request_builder.rb index 4d69285f16..e82202db43 100644 --- a/lib/device_app_management/managed_e_books/item/user_state_summary/item/device_states/device_states_request_builder.rb +++ b/lib/device_app_management/managed_e_books/item/user_state_summary/item/device_states/device_states_request_builder.rb @@ -46,7 +46,7 @@ def by_device_install_state_id(device_install_state_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/userStateSummary/{userInstallStateSummary%2Did}/deviceStates{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/userStateSummary/{userInstallStateSummary%2Did}/deviceStates{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## The install state of the eBook. @@ -58,8 +58,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceInstallStateCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,8 +73,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceInstallState.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -85,15 +83,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -105,17 +103,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_states_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceStatesRequestBuilder.new(raw_url, @request_adapter) + end ## # The install state of the eBook. diff --git a/lib/device_app_management/managed_e_books/item/user_state_summary/item/device_states/item/device_install_state_item_request_builder.rb b/lib/device_app_management/managed_e_books/item/user_state_summary/item/device_states/item/device_install_state_item_request_builder.rb index 86ee3ebf1c..03ae3af89c 100644 --- a/lib/device_app_management/managed_e_books/item/user_state_summary/item/device_states/item/device_install_state_item_request_builder.rb +++ b/lib/device_app_management/managed_e_books/item/user_state_summary/item/device_states/item/device_install_state_item_request_builder.rb @@ -29,7 +29,7 @@ class DeviceInstallStateItemRequestBuilder < MicrosoftKiotaAbstractions::BaseReq ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/userStateSummary/{userInstallStateSummary%2Did}/deviceStates/{deviceInstallState%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/userStateSummary/{userInstallStateSummary%2Did}/deviceStates/{deviceInstallState%2Did}{?%24expand,%24select}") end ## ## Delete navigation property deviceStates for deviceAppManagement @@ -41,8 +41,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -55,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceInstallState.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -71,8 +69,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceInstallState.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -82,13 +79,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -98,15 +96,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -118,17 +116,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_install_state_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceInstallStateItemRequestBuilder.new(raw_url, @request_adapter) + end ## # The install state of the eBook. diff --git a/lib/device_app_management/managed_e_books/item/user_state_summary/item/user_install_state_summary_item_request_builder.rb b/lib/device_app_management/managed_e_books/item/user_state_summary/item/user_install_state_summary_item_request_builder.rb index b8adf243e6..8dc7034d1e 100644 --- a/lib/device_app_management/managed_e_books/item/user_state_summary/item/user_install_state_summary_item_request_builder.rb +++ b/lib/device_app_management/managed_e_books/item/user_state_summary/item/user_install_state_summary_item_request_builder.rb @@ -31,7 +31,7 @@ def device_states() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/userStateSummary/{userInstallStateSummary%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/userStateSummary/{userInstallStateSummary%2Did}{?%24expand,%24select}") end ## ## Deletes a userInstallStateSummary. @@ -43,8 +43,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -57,8 +56,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserInstallStateSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -73,8 +71,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserInstallStateSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -84,13 +81,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -100,15 +98,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -120,17 +118,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_install_state_summary_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserInstallStateSummaryItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the userInstallStateSummary object. diff --git a/lib/device_app_management/managed_e_books/item/user_state_summary/user_state_summary_request_builder.rb b/lib/device_app_management/managed_e_books/item/user_state_summary/user_state_summary_request_builder.rb index 2bc9ba4408..797e9f225a 100644 --- a/lib/device_app_management/managed_e_books/item/user_state_summary/user_state_summary_request_builder.rb +++ b/lib/device_app_management/managed_e_books/item/user_state_summary/user_state_summary_request_builder.rb @@ -42,7 +42,7 @@ def by_user_install_state_summary_id(user_install_state_summary_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/userStateSummary{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks/{managedEBook%2Did}/userStateSummary{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the userInstallStateSummary objects. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserInstallStateSummaryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserInstallStateSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_state_summary_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserStateSummaryRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the userInstallStateSummary objects. diff --git a/lib/device_app_management/managed_e_books/managed_e_books_request_builder.rb b/lib/device_app_management/managed_e_books/managed_e_books_request_builder.rb index fcd9ff3b71..810102f794 100644 --- a/lib/device_app_management/managed_e_books/managed_e_books_request_builder.rb +++ b/lib/device_app_management/managed_e_books/managed_e_books_request_builder.rb @@ -38,7 +38,7 @@ def by_managed_e_book_id(managed_e_book_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/managedEBooks{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the iosVppEBook objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedEBookCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedEBook.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a managed_e_books_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagedEBooksRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the iosVppEBook objects. diff --git a/lib/device_app_management/mdm_windows_information_protection_policies/count/count_request_builder.rb b/lib/device_app_management/mdm_windows_information_protection_policies/count/count_request_builder.rb index 97fc11ddf2..b0d5814915 100644 --- a/lib/device_app_management/mdm_windows_information_protection_policies/count/count_request_builder.rb +++ b/lib/device_app_management/mdm_windows_information_protection_policies/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/mdm_windows_information_protection_policies/item/assignments/assignments_request_builder.rb b/lib/device_app_management/mdm_windows_information_protection_policies/item/assignments/assignments_request_builder.rb index c91b77597c..49ca0f5d46 100644 --- a/lib/device_app_management/mdm_windows_information_protection_policies/item/assignments/assignments_request_builder.rb +++ b/lib/device_app_management/mdm_windows_information_protection_policies/item/assignments/assignments_request_builder.rb @@ -42,7 +42,7 @@ def by_targeted_managed_app_policy_assignment_id(targeted_managed_app_policy_ass ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Navigation property to list of security groups targeted for policy. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TargetedManagedAppPolicyAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TargetedManagedAppPolicyAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end ## # Navigation property to list of security groups targeted for policy. diff --git a/lib/device_app_management/mdm_windows_information_protection_policies/item/assignments/count/count_request_builder.rb b/lib/device_app_management/mdm_windows_information_protection_policies/item/assignments/count/count_request_builder.rb index 83b1bef22f..bd6fc1b254 100644 --- a/lib/device_app_management/mdm_windows_information_protection_policies/item/assignments/count/count_request_builder.rb +++ b/lib/device_app_management/mdm_windows_information_protection_policies/item/assignments/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/assignments/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/assignments/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/mdm_windows_information_protection_policies/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.rb b/lib/device_app_management/mdm_windows_information_protection_policies/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.rb index 934644eaa9..2ecbabe00c 100644 --- a/lib/device_app_management/mdm_windows_information_protection_policies/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.rb +++ b/lib/device_app_management/mdm_windows_information_protection_policies/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.rb @@ -25,7 +25,7 @@ class TargetedManagedAppPolicyAssignmentItemRequestBuilder < MicrosoftKiotaAbstr ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/assignments/{targetedManagedAppPolicyAssignment%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/assignments/{targetedManagedAppPolicyAssignment%2Did}{?%24expand,%24select}") end ## ## Delete navigation property assignments for deviceAppManagement @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TargetedManagedAppPolicyAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TargetedManagedAppPolicyAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a targeted_managed_app_policy_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TargetedManagedAppPolicyAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Navigation property to list of security groups targeted for policy. diff --git a/lib/device_app_management/mdm_windows_information_protection_policies/item/exempt_app_locker_files/count/count_request_builder.rb b/lib/device_app_management/mdm_windows_information_protection_policies/item/exempt_app_locker_files/count/count_request_builder.rb index 53d9f1af13..be43801450 100644 --- a/lib/device_app_management/mdm_windows_information_protection_policies/item/exempt_app_locker_files/count/count_request_builder.rb +++ b/lib/device_app_management/mdm_windows_information_protection_policies/item/exempt_app_locker_files/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/exemptAppLockerFiles/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/exemptAppLockerFiles/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/mdm_windows_information_protection_policies/item/exempt_app_locker_files/exempt_app_locker_files_request_builder.rb b/lib/device_app_management/mdm_windows_information_protection_policies/item/exempt_app_locker_files/exempt_app_locker_files_request_builder.rb index 54f1b7359e..fdebe722ee 100644 --- a/lib/device_app_management/mdm_windows_information_protection_policies/item/exempt_app_locker_files/exempt_app_locker_files_request_builder.rb +++ b/lib/device_app_management/mdm_windows_information_protection_policies/item/exempt_app_locker_files/exempt_app_locker_files_request_builder.rb @@ -42,7 +42,7 @@ def by_windows_information_protection_app_locker_file_id(windows_information_pro ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/exemptAppLockerFiles{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/exemptAppLockerFiles{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Another way to input exempt apps through xml files @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionAppLockerFileCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionAppLockerFile.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a exempt_app_locker_files_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ExemptAppLockerFilesRequestBuilder.new(raw_url, @request_adapter) + end ## # Another way to input exempt apps through xml files diff --git a/lib/device_app_management/mdm_windows_information_protection_policies/item/exempt_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.rb b/lib/device_app_management/mdm_windows_information_protection_policies/item/exempt_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.rb index 518e4188d9..48b1442f77 100644 --- a/lib/device_app_management/mdm_windows_information_protection_policies/item/exempt_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.rb +++ b/lib/device_app_management/mdm_windows_information_protection_policies/item/exempt_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.rb @@ -25,7 +25,7 @@ class WindowsInformationProtectionAppLockerFileItemRequestBuilder < MicrosoftKio ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/exemptAppLockerFiles/{windowsInformationProtectionAppLockerFile%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/exemptAppLockerFiles/{windowsInformationProtectionAppLockerFile%2Did}{?%24expand,%24select}") end ## ## Delete navigation property exemptAppLockerFiles for deviceAppManagement @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionAppLockerFile.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionAppLockerFile.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a windows_information_protection_app_locker_file_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return WindowsInformationProtectionAppLockerFileItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Another way to input exempt apps through xml files diff --git a/lib/device_app_management/mdm_windows_information_protection_policies/item/mdm_windows_information_protection_policy_item_request_builder.rb b/lib/device_app_management/mdm_windows_information_protection_policies/item/mdm_windows_information_protection_policy_item_request_builder.rb index 1bb3292e84..7f85487ced 100644 --- a/lib/device_app_management/mdm_windows_information_protection_policies/item/mdm_windows_information_protection_policy_item_request_builder.rb +++ b/lib/device_app_management/mdm_windows_information_protection_policies/item/mdm_windows_information_protection_policy_item_request_builder.rb @@ -39,7 +39,7 @@ def protected_app_locker_files() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}{?%24expand,%24select}") end ## ## Deletes a mdmWindowsInformationProtectionPolicy. @@ -51,8 +51,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -65,8 +64,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MdmWindowsInformationProtectionPolicy.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,8 +79,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MdmWindowsInformationProtectionPolicy.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -92,13 +89,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -108,15 +106,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -128,17 +126,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mdm_windows_information_protection_policy_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MdmWindowsInformationProtectionPolicyItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the mdmWindowsInformationProtectionPolicy object. diff --git a/lib/device_app_management/mdm_windows_information_protection_policies/item/protected_app_locker_files/count/count_request_builder.rb b/lib/device_app_management/mdm_windows_information_protection_policies/item/protected_app_locker_files/count/count_request_builder.rb index 150dafcd80..6246a5905e 100644 --- a/lib/device_app_management/mdm_windows_information_protection_policies/item/protected_app_locker_files/count/count_request_builder.rb +++ b/lib/device_app_management/mdm_windows_information_protection_policies/item/protected_app_locker_files/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/protectedAppLockerFiles/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/protectedAppLockerFiles/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/mdm_windows_information_protection_policies/item/protected_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.rb b/lib/device_app_management/mdm_windows_information_protection_policies/item/protected_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.rb index abc15a3a89..26566b20b1 100644 --- a/lib/device_app_management/mdm_windows_information_protection_policies/item/protected_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.rb +++ b/lib/device_app_management/mdm_windows_information_protection_policies/item/protected_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.rb @@ -25,7 +25,7 @@ class WindowsInformationProtectionAppLockerFileItemRequestBuilder < MicrosoftKio ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/protectedAppLockerFiles/{windowsInformationProtectionAppLockerFile%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/protectedAppLockerFiles/{windowsInformationProtectionAppLockerFile%2Did}{?%24expand,%24select}") end ## ## Delete navigation property protectedAppLockerFiles for deviceAppManagement @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionAppLockerFile.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionAppLockerFile.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a windows_information_protection_app_locker_file_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return WindowsInformationProtectionAppLockerFileItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Another way to input protected apps through xml files diff --git a/lib/device_app_management/mdm_windows_information_protection_policies/item/protected_app_locker_files/protected_app_locker_files_request_builder.rb b/lib/device_app_management/mdm_windows_information_protection_policies/item/protected_app_locker_files/protected_app_locker_files_request_builder.rb index c8329c1667..ddc47ce218 100644 --- a/lib/device_app_management/mdm_windows_information_protection_policies/item/protected_app_locker_files/protected_app_locker_files_request_builder.rb +++ b/lib/device_app_management/mdm_windows_information_protection_policies/item/protected_app_locker_files/protected_app_locker_files_request_builder.rb @@ -42,7 +42,7 @@ def by_windows_information_protection_app_locker_file_id(windows_information_pro ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/protectedAppLockerFiles{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies/{mdmWindowsInformationProtectionPolicy%2Did}/protectedAppLockerFiles{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Another way to input protected apps through xml files @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionAppLockerFileCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionAppLockerFile.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a protected_app_locker_files_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ProtectedAppLockerFilesRequestBuilder.new(raw_url, @request_adapter) + end ## # Another way to input protected apps through xml files diff --git a/lib/device_app_management/mdm_windows_information_protection_policies/mdm_windows_information_protection_policies_request_builder.rb b/lib/device_app_management/mdm_windows_information_protection_policies/mdm_windows_information_protection_policies_request_builder.rb index 6fcdde39f4..550a4ac2c9 100644 --- a/lib/device_app_management/mdm_windows_information_protection_policies/mdm_windows_information_protection_policies_request_builder.rb +++ b/lib/device_app_management/mdm_windows_information_protection_policies/mdm_windows_information_protection_policies_request_builder.rb @@ -38,7 +38,7 @@ def by_mdm_windows_information_protection_policy_id(mdm_windows_information_prot ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mdmWindowsInformationProtectionPolicies{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the mdmWindowsInformationProtectionPolicy objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MdmWindowsInformationProtectionPolicyCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MdmWindowsInformationProtectionPolicy.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mdm_windows_information_protection_policies_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MdmWindowsInformationProtectionPoliciesRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the mdmWindowsInformationProtectionPolicy objects. diff --git a/lib/device_app_management/mobile_app_categories/count/count_request_builder.rb b/lib/device_app_management/mobile_app_categories/count/count_request_builder.rb index 93e590465b..723dddd832 100644 --- a/lib/device_app_management/mobile_app_categories/count/count_request_builder.rb +++ b/lib/device_app_management/mobile_app_categories/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppCategories/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppCategories/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/mobile_app_categories/item/mobile_app_category_item_request_builder.rb b/lib/device_app_management/mobile_app_categories/item/mobile_app_category_item_request_builder.rb index 395c9c20c8..948db0894b 100644 --- a/lib/device_app_management/mobile_app_categories/item/mobile_app_category_item_request_builder.rb +++ b/lib/device_app_management/mobile_app_categories/item/mobile_app_category_item_request_builder.rb @@ -21,7 +21,7 @@ class MobileAppCategoryItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequ ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppCategories/{mobileAppCategory%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppCategories/{mobileAppCategory%2Did}{?%24expand,%24select}") end ## ## Deletes a mobileAppCategory. @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_category_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppCategoryItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the mobileAppCategory object. diff --git a/lib/device_app_management/mobile_app_categories/mobile_app_categories_request_builder.rb b/lib/device_app_management/mobile_app_categories/mobile_app_categories_request_builder.rb index b70b364852..bbfc9e3eb5 100644 --- a/lib/device_app_management/mobile_app_categories/mobile_app_categories_request_builder.rb +++ b/lib/device_app_management/mobile_app_categories/mobile_app_categories_request_builder.rb @@ -38,7 +38,7 @@ def by_mobile_app_category_id(mobile_app_category_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppCategories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppCategories{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the mobileAppCategory objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategoryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_categories_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppCategoriesRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the mobileAppCategory objects. diff --git a/lib/device_app_management/mobile_app_configurations/count/count_request_builder.rb b/lib/device_app_management/mobile_app_configurations/count/count_request_builder.rb index d4b821ef5a..22e4c48b1b 100644 --- a/lib/device_app_management/mobile_app_configurations/count/count_request_builder.rb +++ b/lib/device_app_management/mobile_app_configurations/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/mobile_app_configurations/item/assign/assign_post_request_body.rb b/lib/device_app_management/mobile_app_configurations/item/assign/assign_post_request_body.rb index a3339776ee..482307a53e 100644 --- a/lib/device_app_management/mobile_app_configurations/item/assign/assign_post_request_body.rb +++ b/lib/device_app_management/mobile_app_configurations/item/assign/assign_post_request_body.rb @@ -20,15 +20,15 @@ class AssignPostRequestBody # The assignments property @assignments ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -50,7 +50,7 @@ def assignments=(value) @assignments = value end ## - ## Instantiates a new assignPostRequestBody and sets the default values. + ## Instantiates a new AssignPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_app_management/mobile_app_configurations/item/assign/assign_request_builder.rb b/lib/device_app_management/mobile_app_configurations/item/assign/assign_request_builder.rb index 5380f016ce..33582b1532 100644 --- a/lib/device_app_management/mobile_app_configurations/item/assign/assign_request_builder.rb +++ b/lib/device_app_management/mobile_app_configurations/item/assign/assign_request_builder.rb @@ -36,8 +36,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assign_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_app_management/mobile_app_configurations/item/assignments/assignments_request_builder.rb b/lib/device_app_management/mobile_app_configurations/item/assignments/assignments_request_builder.rb index a6c044d298..3aa44a42c8 100644 --- a/lib/device_app_management/mobile_app_configurations/item/assignments/assignments_request_builder.rb +++ b/lib/device_app_management/mobile_app_configurations/item/assignments/assignments_request_builder.rb @@ -42,7 +42,7 @@ def by_managed_device_mobile_app_configuration_assignment_id(managed_device_mobi ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfiguration%2Did}/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfiguration%2Did}/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the managedDeviceMobileAppConfigurationAssignment objects. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDeviceMobileAppConfigurationAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDeviceMobileAppConfigurationAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the managedDeviceMobileAppConfigurationAssignment objects. diff --git a/lib/device_app_management/mobile_app_configurations/item/assignments/count/count_request_builder.rb b/lib/device_app_management/mobile_app_configurations/item/assignments/count/count_request_builder.rb index cad60ff5da..c57cbfe6e9 100644 --- a/lib/device_app_management/mobile_app_configurations/item/assignments/count/count_request_builder.rb +++ b/lib/device_app_management/mobile_app_configurations/item/assignments/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfiguration%2Did}/assignments/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfiguration%2Did}/assignments/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/mobile_app_configurations/item/assignments/item/managed_device_mobile_app_configuration_assignment_item_request_builder.rb b/lib/device_app_management/mobile_app_configurations/item/assignments/item/managed_device_mobile_app_configuration_assignment_item_request_builder.rb index d4cd16ce75..9f1fbd984f 100644 --- a/lib/device_app_management/mobile_app_configurations/item/assignments/item/managed_device_mobile_app_configuration_assignment_item_request_builder.rb +++ b/lib/device_app_management/mobile_app_configurations/item/assignments/item/managed_device_mobile_app_configuration_assignment_item_request_builder.rb @@ -25,7 +25,7 @@ class ManagedDeviceMobileAppConfigurationAssignmentItemRequestBuilder < Microsof ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfiguration%2Did}/assignments/{managedDeviceMobileAppConfigurationAssignment%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfiguration%2Did}/assignments/{managedDeviceMobileAppConfigurationAssignment%2Did}{?%24expand,%24select}") end ## ## Deletes a managedDeviceMobileAppConfigurationAssignment. @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDeviceMobileAppConfigurationAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDeviceMobileAppConfigurationAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a managed_device_mobile_app_configuration_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagedDeviceMobileAppConfigurationAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the managedDeviceMobileAppConfigurationAssignment object. diff --git a/lib/device_app_management/mobile_app_configurations/item/device_status_summary/device_status_summary_request_builder.rb b/lib/device_app_management/mobile_app_configurations/item/device_status_summary/device_status_summary_request_builder.rb index b1e2d96083..9be00a2f27 100644 --- a/lib/device_app_management/mobile_app_configurations/item/device_status_summary/device_status_summary_request_builder.rb +++ b/lib/device_app_management/mobile_app_configurations/item/device_status_summary/device_status_summary_request_builder.rb @@ -23,7 +23,7 @@ class DeviceStatusSummaryRequestBuilder < MicrosoftKiotaAbstractions::BaseReques ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfiguration%2Did}/deviceStatusSummary{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfiguration%2Did}/deviceStatusSummary{?%24expand,%24select}") end ## ## Delete navigation property deviceStatusSummary for deviceAppManagement @@ -35,8 +35,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDeviceMobileAppConfigurationDeviceSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -65,8 +63,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDeviceMobileAppConfigurationDeviceSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,13 +73,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -92,15 +90,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,17 +110,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_status_summary_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceStatusSummaryRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the managedDeviceMobileAppConfigurationDeviceSummary object. diff --git a/lib/device_app_management/mobile_app_configurations/item/device_statuses/count/count_request_builder.rb b/lib/device_app_management/mobile_app_configurations/item/device_statuses/count/count_request_builder.rb index ed5be58c69..f4ebad20c7 100644 --- a/lib/device_app_management/mobile_app_configurations/item/device_statuses/count/count_request_builder.rb +++ b/lib/device_app_management/mobile_app_configurations/item/device_statuses/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfiguration%2Did}/deviceStatuses/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfiguration%2Did}/deviceStatuses/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/mobile_app_configurations/item/device_statuses/device_statuses_request_builder.rb b/lib/device_app_management/mobile_app_configurations/item/device_statuses/device_statuses_request_builder.rb index dea4c1d037..5c6cbaa542 100644 --- a/lib/device_app_management/mobile_app_configurations/item/device_statuses/device_statuses_request_builder.rb +++ b/lib/device_app_management/mobile_app_configurations/item/device_statuses/device_statuses_request_builder.rb @@ -42,7 +42,7 @@ def by_managed_device_mobile_app_configuration_device_status_id(managed_device_m ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfiguration%2Did}/deviceStatuses{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfiguration%2Did}/deviceStatuses{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the managedDeviceMobileAppConfigurationDeviceStatus objects. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDeviceMobileAppConfigurationDeviceStatusCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDeviceMobileAppConfigurationDeviceStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_statuses_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceStatusesRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the managedDeviceMobileAppConfigurationDeviceStatus objects. diff --git a/lib/device_app_management/mobile_app_configurations/item/device_statuses/item/managed_device_mobile_app_configuration_device_status_item_request_builder.rb b/lib/device_app_management/mobile_app_configurations/item/device_statuses/item/managed_device_mobile_app_configuration_device_status_item_request_builder.rb index b6aed0d3aa..26fa5411d8 100644 --- a/lib/device_app_management/mobile_app_configurations/item/device_statuses/item/managed_device_mobile_app_configuration_device_status_item_request_builder.rb +++ b/lib/device_app_management/mobile_app_configurations/item/device_statuses/item/managed_device_mobile_app_configuration_device_status_item_request_builder.rb @@ -25,7 +25,7 @@ class ManagedDeviceMobileAppConfigurationDeviceStatusItemRequestBuilder < Micros ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfiguration%2Did}/deviceStatuses/{managedDeviceMobileAppConfigurationDeviceStatus%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfiguration%2Did}/deviceStatuses/{managedDeviceMobileAppConfigurationDeviceStatus%2Did}{?%24expand,%24select}") end ## ## Deletes a managedDeviceMobileAppConfigurationDeviceStatus. @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDeviceMobileAppConfigurationDeviceStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDeviceMobileAppConfigurationDeviceStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a managed_device_mobile_app_configuration_device_status_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagedDeviceMobileAppConfigurationDeviceStatusItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the managedDeviceMobileAppConfigurationDeviceStatus object. diff --git a/lib/device_app_management/mobile_app_configurations/item/managed_device_mobile_app_configuration_item_request_builder.rb b/lib/device_app_management/mobile_app_configurations/item/managed_device_mobile_app_configuration_item_request_builder.rb index 2a7e4d57d1..324537813e 100644 --- a/lib/device_app_management/mobile_app_configurations/item/managed_device_mobile_app_configuration_item_request_builder.rb +++ b/lib/device_app_management/mobile_app_configurations/item/managed_device_mobile_app_configuration_item_request_builder.rb @@ -57,7 +57,7 @@ def user_status_summary() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfiguration%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfiguration%2Did}{?%24expand,%24select}") end ## ## Deletes a iosMobileAppConfiguration. @@ -69,8 +69,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -83,8 +82,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDeviceMobileAppConfiguration.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -99,8 +97,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDeviceMobileAppConfiguration.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -110,13 +107,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -126,15 +124,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -146,17 +144,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a managed_device_mobile_app_configuration_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagedDeviceMobileAppConfigurationItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the iosMobileAppConfiguration object. diff --git a/lib/device_app_management/mobile_app_configurations/item/user_status_summary/user_status_summary_request_builder.rb b/lib/device_app_management/mobile_app_configurations/item/user_status_summary/user_status_summary_request_builder.rb index 6b1c037ad6..c628c4e4b6 100644 --- a/lib/device_app_management/mobile_app_configurations/item/user_status_summary/user_status_summary_request_builder.rb +++ b/lib/device_app_management/mobile_app_configurations/item/user_status_summary/user_status_summary_request_builder.rb @@ -23,7 +23,7 @@ class UserStatusSummaryRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestB ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfiguration%2Did}/userStatusSummary{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfiguration%2Did}/userStatusSummary{?%24expand,%24select}") end ## ## Delete navigation property userStatusSummary for deviceAppManagement @@ -35,8 +35,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDeviceMobileAppConfigurationUserSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -65,8 +63,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDeviceMobileAppConfigurationUserSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,13 +73,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -92,15 +90,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,17 +110,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_status_summary_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserStatusSummaryRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the managedDeviceMobileAppConfigurationUserSummary object. diff --git a/lib/device_app_management/mobile_app_configurations/item/user_statuses/count/count_request_builder.rb b/lib/device_app_management/mobile_app_configurations/item/user_statuses/count/count_request_builder.rb index d22654a887..67c00abdba 100644 --- a/lib/device_app_management/mobile_app_configurations/item/user_statuses/count/count_request_builder.rb +++ b/lib/device_app_management/mobile_app_configurations/item/user_statuses/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfiguration%2Did}/userStatuses/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfiguration%2Did}/userStatuses/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/mobile_app_configurations/item/user_statuses/item/managed_device_mobile_app_configuration_user_status_item_request_builder.rb b/lib/device_app_management/mobile_app_configurations/item/user_statuses/item/managed_device_mobile_app_configuration_user_status_item_request_builder.rb index 1fb7bb0daf..3ec72913b0 100644 --- a/lib/device_app_management/mobile_app_configurations/item/user_statuses/item/managed_device_mobile_app_configuration_user_status_item_request_builder.rb +++ b/lib/device_app_management/mobile_app_configurations/item/user_statuses/item/managed_device_mobile_app_configuration_user_status_item_request_builder.rb @@ -25,7 +25,7 @@ class ManagedDeviceMobileAppConfigurationUserStatusItemRequestBuilder < Microsof ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfiguration%2Did}/userStatuses/{managedDeviceMobileAppConfigurationUserStatus%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfiguration%2Did}/userStatuses/{managedDeviceMobileAppConfigurationUserStatus%2Did}{?%24expand,%24select}") end ## ## Deletes a managedDeviceMobileAppConfigurationUserStatus. @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDeviceMobileAppConfigurationUserStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDeviceMobileAppConfigurationUserStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a managed_device_mobile_app_configuration_user_status_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagedDeviceMobileAppConfigurationUserStatusItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the managedDeviceMobileAppConfigurationUserStatus object. diff --git a/lib/device_app_management/mobile_app_configurations/item/user_statuses/user_statuses_request_builder.rb b/lib/device_app_management/mobile_app_configurations/item/user_statuses/user_statuses_request_builder.rb index 6637c4b5f1..eeabead6a4 100644 --- a/lib/device_app_management/mobile_app_configurations/item/user_statuses/user_statuses_request_builder.rb +++ b/lib/device_app_management/mobile_app_configurations/item/user_statuses/user_statuses_request_builder.rb @@ -42,7 +42,7 @@ def by_managed_device_mobile_app_configuration_user_status_id(managed_device_mob ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfiguration%2Did}/userStatuses{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfiguration%2Did}/userStatuses{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the managedDeviceMobileAppConfigurationUserStatus objects. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDeviceMobileAppConfigurationUserStatusCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDeviceMobileAppConfigurationUserStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_statuses_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserStatusesRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the managedDeviceMobileAppConfigurationUserStatus objects. diff --git a/lib/device_app_management/mobile_app_configurations/mobile_app_configurations_request_builder.rb b/lib/device_app_management/mobile_app_configurations/mobile_app_configurations_request_builder.rb index ea848df312..469cfe1af5 100644 --- a/lib/device_app_management/mobile_app_configurations/mobile_app_configurations_request_builder.rb +++ b/lib/device_app_management/mobile_app_configurations/mobile_app_configurations_request_builder.rb @@ -38,7 +38,7 @@ def by_managed_device_mobile_app_configuration_id(managed_device_mobile_app_conf ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileAppConfigurations{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the managedDeviceMobileAppConfiguration objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDeviceMobileAppConfigurationCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDeviceMobileAppConfiguration.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_configurations_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppConfigurationsRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the managedDeviceMobileAppConfiguration objects. diff --git a/lib/device_app_management/mobile_apps/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/count/count_request_builder.rb index 64f94df7d2..015c7d4ad7 100644 --- a/lib/device_app_management/mobile_apps/count/count_request_builder.rb +++ b/lib/device_app_management/mobile_apps/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/groups/item/calendar/events/item/instances/item/extensions/count/count.rb b/lib/device_app_management/mobile_apps/graph_android_lob_app/count/count.rb similarity index 100% rename from lib/groups/item/calendar/events/item/instances/item/extensions/count/count.rb rename to lib/device_app_management/mobile_apps/graph_android_lob_app/count/count.rb diff --git a/lib/device_app_management/mobile_apps/graph_android_lob_app/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/graph_android_lob_app/count/count_request_builder.rb new file mode 100644 index 0000000000..f09f0451e6 --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_android_lob_app/count/count_request_builder.rb @@ -0,0 +1,100 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../graph_android_lob_app' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphAndroidLobApp + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.androidLobApp/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar/events/item/instances/item/calendar/calendar.rb b/lib/device_app_management/mobile_apps/graph_android_lob_app/graph_android_lob_app.rb similarity index 100% rename from lib/groups/item/calendar/events/item/instances/item/calendar/calendar.rb rename to lib/device_app_management/mobile_apps/graph_android_lob_app/graph_android_lob_app.rb diff --git a/lib/device_app_management/mobile_apps/graph_android_lob_app/graph_android_lob_app_request_builder.rb b/lib/device_app_management/mobile_apps/graph_android_lob_app/graph_android_lob_app_request_builder.rb new file mode 100644 index 0000000000..722fce3754 --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_android_lob_app/graph_android_lob_app_request_builder.rb @@ -0,0 +1,134 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/android_lob_app_collection_response' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../device_app_management' +require_relative '../mobile_apps' +require_relative './count/count_request_builder' +require_relative './graph_android_lob_app' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphAndroidLobApp + ## + # Casts the previous resource to androidLobApp. + class GraphAndroidLobAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphAndroidLobApp::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphAndroidLobAppRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.androidLobApp{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Get the items of type microsoft.graph.androidLobApp in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of android_lob_app_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AndroidLobAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the items of type microsoft.graph.androidLobApp in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_android_lob_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphAndroidLobAppRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the items of type microsoft.graph.androidLobApp in the microsoft.graph.mobileApp collection + class GraphAndroidLobAppRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar_view/count/count.rb b/lib/device_app_management/mobile_apps/graph_android_store_app/count/count.rb similarity index 100% rename from lib/groups/item/calendar_view/count/count.rb rename to lib/device_app_management/mobile_apps/graph_android_store_app/count/count.rb diff --git a/lib/device_app_management/mobile_apps/graph_android_store_app/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/graph_android_store_app/count/count_request_builder.rb new file mode 100644 index 0000000000..a6140a7f23 --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_android_store_app/count/count_request_builder.rb @@ -0,0 +1,100 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../graph_android_store_app' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphAndroidStoreApp + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.androidStoreApp/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar/events/item/instances/item/dismiss_reminder/dismiss_reminder.rb b/lib/device_app_management/mobile_apps/graph_android_store_app/graph_android_store_app.rb similarity index 100% rename from lib/groups/item/calendar/events/item/instances/item/dismiss_reminder/dismiss_reminder.rb rename to lib/device_app_management/mobile_apps/graph_android_store_app/graph_android_store_app.rb diff --git a/lib/device_app_management/mobile_apps/graph_android_store_app/graph_android_store_app_request_builder.rb b/lib/device_app_management/mobile_apps/graph_android_store_app/graph_android_store_app_request_builder.rb new file mode 100644 index 0000000000..eb350fc2a8 --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_android_store_app/graph_android_store_app_request_builder.rb @@ -0,0 +1,134 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/android_store_app_collection_response' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../device_app_management' +require_relative '../mobile_apps' +require_relative './count/count_request_builder' +require_relative './graph_android_store_app' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphAndroidStoreApp + ## + # Casts the previous resource to androidStoreApp. + class GraphAndroidStoreAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphAndroidStoreApp::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphAndroidStoreAppRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.androidStoreApp{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Get the items of type microsoft.graph.androidStoreApp in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of android_store_app_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AndroidStoreAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the items of type microsoft.graph.androidStoreApp in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_android_store_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphAndroidStoreAppRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the items of type microsoft.graph.androidStoreApp in the microsoft.graph.mobileApp collection + class GraphAndroidStoreAppRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar_view/item/attachments/count/count.rb b/lib/device_app_management/mobile_apps/graph_ios_lob_app/count/count.rb similarity index 100% rename from lib/groups/item/calendar_view/item/attachments/count/count.rb rename to lib/device_app_management/mobile_apps/graph_ios_lob_app/count/count.rb diff --git a/lib/device_app_management/mobile_apps/graph_ios_lob_app/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/graph_ios_lob_app/count/count_request_builder.rb new file mode 100644 index 0000000000..10bdbbd38c --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_ios_lob_app/count/count_request_builder.rb @@ -0,0 +1,100 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../graph_ios_lob_app' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphIosLobApp + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.iosLobApp/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar/events/item/instances/item/extensions/extensions.rb b/lib/device_app_management/mobile_apps/graph_ios_lob_app/graph_ios_lob_app.rb similarity index 100% rename from lib/groups/item/calendar/events/item/instances/item/extensions/extensions.rb rename to lib/device_app_management/mobile_apps/graph_ios_lob_app/graph_ios_lob_app.rb diff --git a/lib/device_app_management/mobile_apps/graph_ios_lob_app/graph_ios_lob_app_request_builder.rb b/lib/device_app_management/mobile_apps/graph_ios_lob_app/graph_ios_lob_app_request_builder.rb new file mode 100644 index 0000000000..14fb5d7d8b --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_ios_lob_app/graph_ios_lob_app_request_builder.rb @@ -0,0 +1,134 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/ios_lob_app_collection_response' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../device_app_management' +require_relative '../mobile_apps' +require_relative './count/count_request_builder' +require_relative './graph_ios_lob_app' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphIosLobApp + ## + # Casts the previous resource to iosLobApp. + class GraphIosLobAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphIosLobApp::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphIosLobAppRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.iosLobApp{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Get the items of type microsoft.graph.iosLobApp in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of ios_lob_app_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::IosLobAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the items of type microsoft.graph.iosLobApp in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_ios_lob_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphIosLobAppRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the items of type microsoft.graph.iosLobApp in the microsoft.graph.mobileApp collection + class GraphIosLobAppRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar_view/item/extensions/count/count.rb b/lib/device_app_management/mobile_apps/graph_ios_store_app/count/count.rb similarity index 100% rename from lib/groups/item/calendar_view/item/extensions/count/count.rb rename to lib/device_app_management/mobile_apps/graph_ios_store_app/count/count.rb diff --git a/lib/device_app_management/mobile_apps/graph_ios_store_app/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/graph_ios_store_app/count/count_request_builder.rb new file mode 100644 index 0000000000..944f30ecfe --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_ios_store_app/count/count_request_builder.rb @@ -0,0 +1,100 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../graph_ios_store_app' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphIosStoreApp + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.iosStoreApp/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar/events/item/instances/item/extensions/item/item.rb b/lib/device_app_management/mobile_apps/graph_ios_store_app/graph_ios_store_app.rb similarity index 100% rename from lib/groups/item/calendar/events/item/instances/item/extensions/item/item.rb rename to lib/device_app_management/mobile_apps/graph_ios_store_app/graph_ios_store_app.rb diff --git a/lib/device_app_management/mobile_apps/graph_ios_store_app/graph_ios_store_app_request_builder.rb b/lib/device_app_management/mobile_apps/graph_ios_store_app/graph_ios_store_app_request_builder.rb new file mode 100644 index 0000000000..e803032b3e --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_ios_store_app/graph_ios_store_app_request_builder.rb @@ -0,0 +1,134 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/ios_store_app_collection_response' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../device_app_management' +require_relative '../mobile_apps' +require_relative './count/count_request_builder' +require_relative './graph_ios_store_app' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphIosStoreApp + ## + # Casts the previous resource to iosStoreApp. + class GraphIosStoreAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphIosStoreApp::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphIosStoreAppRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.iosStoreApp{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Get the items of type microsoft.graph.iosStoreApp in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of ios_store_app_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::IosStoreAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the items of type microsoft.graph.iosStoreApp in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_ios_store_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphIosStoreAppRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the items of type microsoft.graph.iosStoreApp in the microsoft.graph.mobileApp collection + class GraphIosStoreAppRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar_view/item/instances/count/count.rb b/lib/device_app_management/mobile_apps/graph_ios_vpp_app/count/count.rb similarity index 100% rename from lib/groups/item/calendar_view/item/instances/count/count.rb rename to lib/device_app_management/mobile_apps/graph_ios_vpp_app/count/count.rb diff --git a/lib/device_app_management/mobile_apps/graph_ios_vpp_app/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/graph_ios_vpp_app/count/count_request_builder.rb new file mode 100644 index 0000000000..077d2a06d8 --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_ios_vpp_app/count/count_request_builder.rb @@ -0,0 +1,100 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../graph_ios_vpp_app' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphIosVppApp + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.iosVppApp/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar/events/item/instances/item/item.rb b/lib/device_app_management/mobile_apps/graph_ios_vpp_app/graph_ios_vpp_app.rb similarity index 100% rename from lib/groups/item/calendar/events/item/instances/item/item.rb rename to lib/device_app_management/mobile_apps/graph_ios_vpp_app/graph_ios_vpp_app.rb diff --git a/lib/device_app_management/mobile_apps/graph_ios_vpp_app/graph_ios_vpp_app_request_builder.rb b/lib/device_app_management/mobile_apps/graph_ios_vpp_app/graph_ios_vpp_app_request_builder.rb new file mode 100644 index 0000000000..ab927de8fe --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_ios_vpp_app/graph_ios_vpp_app_request_builder.rb @@ -0,0 +1,134 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/ios_vpp_app_collection_response' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../device_app_management' +require_relative '../mobile_apps' +require_relative './count/count_request_builder' +require_relative './graph_ios_vpp_app' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphIosVppApp + ## + # Casts the previous resource to iosVppApp. + class GraphIosVppAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphIosVppApp::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphIosVppAppRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.iosVppApp{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Get the items of type microsoft.graph.iosVppApp in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of ios_vpp_app_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::IosVppAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the items of type microsoft.graph.iosVppApp in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_ios_vpp_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphIosVppAppRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the items of type microsoft.graph.iosVppApp in the microsoft.graph.mobileApp collection + class GraphIosVppAppRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar_view/item/instances/item/attachments/count/count.rb b/lib/device_app_management/mobile_apps/graph_mac_o_s_dmg_app/count/count.rb similarity index 100% rename from lib/groups/item/calendar_view/item/instances/item/attachments/count/count.rb rename to lib/device_app_management/mobile_apps/graph_mac_o_s_dmg_app/count/count.rb diff --git a/lib/device_app_management/mobile_apps/graph_mac_o_s_dmg_app/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/graph_mac_o_s_dmg_app/count/count_request_builder.rb new file mode 100644 index 0000000000..844ae761d4 --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_mac_o_s_dmg_app/count/count_request_builder.rb @@ -0,0 +1,100 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../graph_mac_o_s_dmg_app' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphMacOSDmgApp + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.macOSDmgApp/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar_view/item/attachments/attachments.rb b/lib/device_app_management/mobile_apps/graph_mac_o_s_dmg_app/graph_mac_o_s_dmg_app.rb similarity index 100% rename from lib/groups/item/calendar_view/item/attachments/attachments.rb rename to lib/device_app_management/mobile_apps/graph_mac_o_s_dmg_app/graph_mac_o_s_dmg_app.rb diff --git a/lib/device_app_management/mobile_apps/graph_mac_o_s_dmg_app/graph_mac_o_s_dmg_app_request_builder.rb b/lib/device_app_management/mobile_apps/graph_mac_o_s_dmg_app/graph_mac_o_s_dmg_app_request_builder.rb new file mode 100644 index 0000000000..80673fe135 --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_mac_o_s_dmg_app/graph_mac_o_s_dmg_app_request_builder.rb @@ -0,0 +1,134 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/mac_o_s_dmg_app_collection_response' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../device_app_management' +require_relative '../mobile_apps' +require_relative './count/count_request_builder' +require_relative './graph_mac_o_s_dmg_app' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphMacOSDmgApp + ## + # Casts the previous resource to macOSDmgApp. + class GraphMacOSDmgAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphMacOSDmgApp::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphMacOSDmgAppRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.macOSDmgApp{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Get the items of type microsoft.graph.macOSDmgApp in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mac_o_s_dmg_app_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MacOSDmgAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the items of type microsoft.graph.macOSDmgApp in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_mac_o_s_dmg_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphMacOSDmgAppRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the items of type microsoft.graph.macOSDmgApp in the microsoft.graph.mobileApp collection + class GraphMacOSDmgAppRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar_view/item/instances/item/extensions/count/count.rb b/lib/device_app_management/mobile_apps/graph_mac_o_s_lob_app/count/count.rb similarity index 100% rename from lib/groups/item/calendar_view/item/instances/item/extensions/count/count.rb rename to lib/device_app_management/mobile_apps/graph_mac_o_s_lob_app/count/count.rb diff --git a/lib/device_app_management/mobile_apps/graph_mac_o_s_lob_app/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/graph_mac_o_s_lob_app/count/count_request_builder.rb new file mode 100644 index 0000000000..e936311b8e --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_mac_o_s_lob_app/count/count_request_builder.rb @@ -0,0 +1,100 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../graph_mac_o_s_lob_app' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphMacOSLobApp + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.macOSLobApp/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar_view/item/attachments/item/item.rb b/lib/device_app_management/mobile_apps/graph_mac_o_s_lob_app/graph_mac_o_s_lob_app.rb similarity index 100% rename from lib/groups/item/calendar_view/item/attachments/item/item.rb rename to lib/device_app_management/mobile_apps/graph_mac_o_s_lob_app/graph_mac_o_s_lob_app.rb diff --git a/lib/device_app_management/mobile_apps/graph_mac_o_s_lob_app/graph_mac_o_s_lob_app_request_builder.rb b/lib/device_app_management/mobile_apps/graph_mac_o_s_lob_app/graph_mac_o_s_lob_app_request_builder.rb new file mode 100644 index 0000000000..45e326257f --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_mac_o_s_lob_app/graph_mac_o_s_lob_app_request_builder.rb @@ -0,0 +1,134 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/mac_o_s_lob_app_collection_response' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../device_app_management' +require_relative '../mobile_apps' +require_relative './count/count_request_builder' +require_relative './graph_mac_o_s_lob_app' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphMacOSLobApp + ## + # Casts the previous resource to macOSLobApp. + class GraphMacOSLobAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphMacOSLobApp::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphMacOSLobAppRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.macOSLobApp{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Get the items of type microsoft.graph.macOSLobApp in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mac_o_s_lob_app_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MacOSLobAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the items of type microsoft.graph.macOSLobApp in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_mac_o_s_lob_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphMacOSLobAppRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the items of type microsoft.graph.macOSLobApp in the microsoft.graph.mobileApp collection + class GraphMacOSLobAppRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/events/item/instances/count/count.rb b/lib/device_app_management/mobile_apps/graph_managed_android_lob_app/count/count.rb similarity index 100% rename from lib/groups/item/events/item/instances/count/count.rb rename to lib/device_app_management/mobile_apps/graph_managed_android_lob_app/count/count.rb diff --git a/lib/device_app_management/mobile_apps/graph_managed_android_lob_app/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/graph_managed_android_lob_app/count/count_request_builder.rb new file mode 100644 index 0000000000..a21a6eb32f --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_managed_android_lob_app/count/count_request_builder.rb @@ -0,0 +1,100 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../graph_managed_android_lob_app' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphManagedAndroidLobApp + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.managedAndroidLobApp/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar_view/item/calendar/calendar.rb b/lib/device_app_management/mobile_apps/graph_managed_android_lob_app/graph_managed_android_lob_app.rb similarity index 100% rename from lib/groups/item/calendar_view/item/calendar/calendar.rb rename to lib/device_app_management/mobile_apps/graph_managed_android_lob_app/graph_managed_android_lob_app.rb diff --git a/lib/device_app_management/mobile_apps/graph_managed_android_lob_app/graph_managed_android_lob_app_request_builder.rb b/lib/device_app_management/mobile_apps/graph_managed_android_lob_app/graph_managed_android_lob_app_request_builder.rb new file mode 100644 index 0000000000..cbe05654aa --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_managed_android_lob_app/graph_managed_android_lob_app_request_builder.rb @@ -0,0 +1,134 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/managed_android_lob_app_collection_response' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../device_app_management' +require_relative '../mobile_apps' +require_relative './count/count_request_builder' +require_relative './graph_managed_android_lob_app' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphManagedAndroidLobApp + ## + # Casts the previous resource to managedAndroidLobApp. + class GraphManagedAndroidLobAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphManagedAndroidLobApp::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphManagedAndroidLobAppRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.managedAndroidLobApp{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Get the items of type microsoft.graph.managedAndroidLobApp in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of managed_android_lob_app_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAndroidLobAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the items of type microsoft.graph.managedAndroidLobApp in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_managed_android_lob_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphManagedAndroidLobAppRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the items of type microsoft.graph.managedAndroidLobApp in the microsoft.graph.mobileApp collection + class GraphManagedAndroidLobAppRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/events/item/instances/item/attachments/count/count.rb b/lib/device_app_management/mobile_apps/graph_managed_i_o_s_lob_app/count/count.rb similarity index 100% rename from lib/groups/item/events/item/instances/item/attachments/count/count.rb rename to lib/device_app_management/mobile_apps/graph_managed_i_o_s_lob_app/count/count.rb diff --git a/lib/device_app_management/mobile_apps/graph_managed_i_o_s_lob_app/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/graph_managed_i_o_s_lob_app/count/count_request_builder.rb new file mode 100644 index 0000000000..12066bff13 --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_managed_i_o_s_lob_app/count/count_request_builder.rb @@ -0,0 +1,100 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../graph_managed_i_o_s_lob_app' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphManagedIOSLobApp + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.managedIOSLobApp/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar_view/item/dismiss_reminder/dismiss_reminder.rb b/lib/device_app_management/mobile_apps/graph_managed_i_o_s_lob_app/graph_managed_i_o_s_lob_app.rb similarity index 100% rename from lib/groups/item/calendar_view/item/dismiss_reminder/dismiss_reminder.rb rename to lib/device_app_management/mobile_apps/graph_managed_i_o_s_lob_app/graph_managed_i_o_s_lob_app.rb diff --git a/lib/device_app_management/mobile_apps/graph_managed_i_o_s_lob_app/graph_managed_i_o_s_lob_app_request_builder.rb b/lib/device_app_management/mobile_apps/graph_managed_i_o_s_lob_app/graph_managed_i_o_s_lob_app_request_builder.rb new file mode 100644 index 0000000000..ef14e5444e --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_managed_i_o_s_lob_app/graph_managed_i_o_s_lob_app_request_builder.rb @@ -0,0 +1,134 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/managed_i_o_s_lob_app_collection_response' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../device_app_management' +require_relative '../mobile_apps' +require_relative './count/count_request_builder' +require_relative './graph_managed_i_o_s_lob_app' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphManagedIOSLobApp + ## + # Casts the previous resource to managedIOSLobApp. + class GraphManagedIOSLobAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphManagedIOSLobApp::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphManagedIOSLobAppRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.managedIOSLobApp{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Get the items of type microsoft.graph.managedIOSLobApp in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of managed_i_o_s_lob_app_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedIOSLobAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the items of type microsoft.graph.managedIOSLobApp in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_managed_i_o_s_lob_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphManagedIOSLobAppRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the items of type microsoft.graph.managedIOSLobApp in the microsoft.graph.mobileApp collection + class GraphManagedIOSLobAppRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/graph_managed_mobile_lob_app/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/graph_managed_mobile_lob_app/count/count_request_builder.rb index 00bf0edad9..4ff85ef73f 100644 --- a/lib/device_app_management/mobile_apps/graph_managed_mobile_lob_app/count/count_request_builder.rb +++ b/lib/device_app_management/mobile_apps/graph_managed_mobile_lob_app/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.managedMobileLobApp/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.managedMobileLobApp/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/mobile_apps/graph_managed_mobile_lob_app/graph_managed_mobile_lob_app_request_builder.rb b/lib/device_app_management/mobile_apps/graph_managed_mobile_lob_app/graph_managed_mobile_lob_app_request_builder.rb index bfef12baf6..637593d3f2 100644 --- a/lib/device_app_management/mobile_apps/graph_managed_mobile_lob_app/graph_managed_mobile_lob_app_request_builder.rb +++ b/lib/device_app_management/mobile_apps/graph_managed_mobile_lob_app/graph_managed_mobile_lob_app_request_builder.rb @@ -27,7 +27,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.managedMobileLobApp{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.managedMobileLobApp{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.managedMobileLobApp in the microsoft.graph.mobileApp collection @@ -39,8 +39,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedMobileLobAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -50,17 +49,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_managed_mobile_lob_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphManagedMobileLobAppRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.managedMobileLobApp in the microsoft.graph.mobileApp collection diff --git a/lib/groups/item/events/item/instances/item/extensions/count/count.rb b/lib/device_app_management/mobile_apps/graph_microsoft_store_for_business_app/count/count.rb similarity index 100% rename from lib/groups/item/events/item/instances/item/extensions/count/count.rb rename to lib/device_app_management/mobile_apps/graph_microsoft_store_for_business_app/count/count.rb diff --git a/lib/device_app_management/mobile_apps/graph_microsoft_store_for_business_app/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/graph_microsoft_store_for_business_app/count/count_request_builder.rb new file mode 100644 index 0000000000..072633f8c3 --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_microsoft_store_for_business_app/count/count_request_builder.rb @@ -0,0 +1,100 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../graph_microsoft_store_for_business_app' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphMicrosoftStoreForBusinessApp + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.microsoftStoreForBusinessApp/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar_view/item/extensions/extensions.rb b/lib/device_app_management/mobile_apps/graph_microsoft_store_for_business_app/graph_microsoft_store_for_business_app.rb similarity index 100% rename from lib/groups/item/calendar_view/item/extensions/extensions.rb rename to lib/device_app_management/mobile_apps/graph_microsoft_store_for_business_app/graph_microsoft_store_for_business_app.rb diff --git a/lib/device_app_management/mobile_apps/graph_microsoft_store_for_business_app/graph_microsoft_store_for_business_app_request_builder.rb b/lib/device_app_management/mobile_apps/graph_microsoft_store_for_business_app/graph_microsoft_store_for_business_app_request_builder.rb new file mode 100644 index 0000000000..3cbb9fa5be --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_microsoft_store_for_business_app/graph_microsoft_store_for_business_app_request_builder.rb @@ -0,0 +1,134 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/microsoft_store_for_business_app_collection_response' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../device_app_management' +require_relative '../mobile_apps' +require_relative './count/count_request_builder' +require_relative './graph_microsoft_store_for_business_app' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphMicrosoftStoreForBusinessApp + ## + # Casts the previous resource to microsoftStoreForBusinessApp. + class GraphMicrosoftStoreForBusinessAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphMicrosoftStoreForBusinessApp::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphMicrosoftStoreForBusinessAppRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.microsoftStoreForBusinessApp{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Get the items of type microsoft.graph.microsoftStoreForBusinessApp in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of microsoft_store_for_business_app_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MicrosoftStoreForBusinessAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the items of type microsoft.graph.microsoftStoreForBusinessApp in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_microsoft_store_for_business_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphMicrosoftStoreForBusinessAppRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the items of type microsoft.graph.microsoftStoreForBusinessApp in the microsoft.graph.mobileApp collection + class GraphMicrosoftStoreForBusinessAppRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/graph_mobile_lob_app/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/graph_mobile_lob_app/count/count_request_builder.rb deleted file mode 100644 index c32b51260c..0000000000 --- a/lib/device_app_management/mobile_apps/graph_mobile_lob_app/count/count_request_builder.rb +++ /dev/null @@ -1,92 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../../models/o_data_errors_o_data_error' -require_relative '../../../device_app_management' -require_relative '../../mobile_apps' -require_relative '../graph_mobile_lob_app' -require_relative './count' - -module MicrosoftGraph - module DeviceAppManagement - module MobileApps - module GraphMobileLobApp - module Count - ## - # Provides operations to count the resources in the collection. - class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder - - ## - ## Instantiates a new CountRequestBuilder and sets the default values. - ## @param path_parameters Path parameters for the request - ## @param request_adapter The request adapter to use to execute the requests. - ## @return a void - ## - def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.mobileLobApp/$count{?%24search,%24filter}") - end - ## - ## Get the number of the resource - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of integer - ## - def get(request_configuration=nil) - request_info = self.to_get_request_information( - request_configuration - ) - error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, number, error_mapping) - end - ## - ## Get the number of the resource - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a request_information - ## - def to_get_request_information(request_configuration=nil) - request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') - unless request_configuration.nil? - request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) - request_info.add_request_options(request_configuration.options) - end - return request_info - end - - ## - # Get the number of the resource - class CountRequestBuilderGetQueryParameters - - ## - # Filter items by property values - attr_accessor :filter - ## - # Search items by search phrases - attr_accessor :search - ## - ## Maps the query parameters names to their encoded names for the URI template parsing. - ## @param original_name The original query parameter name in the class. - ## @return a string - ## - def get_query_parameter(original_name) - raise StandardError, 'original_name cannot be null' if original_name.nil? - case original_name - when "filter" - return "%24filter" - when "search" - return "%24search" - else - return original_name - end - end - end - end - end - end - end - end -end diff --git a/lib/device_app_management/mobile_apps/graph_mobile_lob_app/graph_mobile_lob_app_request_builder.rb b/lib/device_app_management/mobile_apps/graph_mobile_lob_app/graph_mobile_lob_app_request_builder.rb deleted file mode 100644 index cfeff5e62b..0000000000 --- a/lib/device_app_management/mobile_apps/graph_mobile_lob_app/graph_mobile_lob_app_request_builder.rb +++ /dev/null @@ -1,126 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/mobile_lob_app_collection_response' -require_relative '../../../models/o_data_errors_o_data_error' -require_relative '../../device_app_management' -require_relative '../mobile_apps' -require_relative './count/count_request_builder' -require_relative './graph_mobile_lob_app' - -module MicrosoftGraph - module DeviceAppManagement - module MobileApps - module GraphMobileLobApp - ## - # Casts the previous resource to mobileLobApp. - class GraphMobileLobAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder - - ## - # Provides operations to count the resources in the collection. - def count() - return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphMobileLobApp::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) - end - ## - ## Instantiates a new GraphMobileLobAppRequestBuilder and sets the default values. - ## @param path_parameters Path parameters for the request - ## @param request_adapter The request adapter to use to execute the requests. - ## @return a void - ## - def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.mobileLobApp{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") - end - ## - ## Get the items of type microsoft.graph.mobileLobApp in the microsoft.graph.mobileApp collection - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of mobile_lob_app_collection_response - ## - def get(request_configuration=nil) - request_info = self.to_get_request_information( - request_configuration - ) - error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileLobAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) - end - ## - ## Get the items of type microsoft.graph.mobileLobApp in the microsoft.graph.mobileApp collection - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a request_information - ## - def to_get_request_information(request_configuration=nil) - request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') - unless request_configuration.nil? - request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) - request_info.add_request_options(request_configuration.options) - end - return request_info - end - - ## - # Get the items of type microsoft.graph.mobileLobApp in the microsoft.graph.mobileApp collection - class GraphMobileLobAppRequestBuilderGetQueryParameters - - ## - # Include count of items - attr_accessor :count - ## - # Expand related entities - attr_accessor :expand - ## - # Filter items by property values - attr_accessor :filter - ## - # Order items by property values - attr_accessor :orderby - ## - # Search items by search phrases - attr_accessor :search - ## - # Select properties to be returned - attr_accessor :select - ## - # Skip the first n items - attr_accessor :skip - ## - # Show only the first n items - attr_accessor :top - ## - ## Maps the query parameters names to their encoded names for the URI template parsing. - ## @param original_name The original query parameter name in the class. - ## @return a string - ## - def get_query_parameter(original_name) - raise StandardError, 'original_name cannot be null' if original_name.nil? - case original_name - when "count" - return "%24count" - when "expand" - return "%24expand" - when "filter" - return "%24filter" - when "orderby" - return "%24orderby" - when "search" - return "%24search" - when "select" - return "%24select" - when "skip" - return "%24skip" - when "top" - return "%24top" - else - return original_name - end - end - end - end - end - end - end -end diff --git a/lib/groups/item/photos/count/count.rb b/lib/device_app_management/mobile_apps/graph_win32_lob_app/count/count.rb similarity index 100% rename from lib/groups/item/photos/count/count.rb rename to lib/device_app_management/mobile_apps/graph_win32_lob_app/count/count.rb diff --git a/lib/device_app_management/mobile_apps/graph_win32_lob_app/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/graph_win32_lob_app/count/count_request_builder.rb new file mode 100644 index 0000000000..e390877694 --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_win32_lob_app/count/count_request_builder.rb @@ -0,0 +1,100 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../graph_win32_lob_app' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphWin32LobApp + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.win32LobApp/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar_view/item/extensions/item/item.rb b/lib/device_app_management/mobile_apps/graph_win32_lob_app/graph_win32_lob_app.rb similarity index 100% rename from lib/groups/item/calendar_view/item/extensions/item/item.rb rename to lib/device_app_management/mobile_apps/graph_win32_lob_app/graph_win32_lob_app.rb diff --git a/lib/device_app_management/mobile_apps/graph_win32_lob_app/graph_win32_lob_app_request_builder.rb b/lib/device_app_management/mobile_apps/graph_win32_lob_app/graph_win32_lob_app_request_builder.rb new file mode 100644 index 0000000000..2f4263e41c --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_win32_lob_app/graph_win32_lob_app_request_builder.rb @@ -0,0 +1,134 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../../models/win32_lob_app_collection_response' +require_relative '../../device_app_management' +require_relative '../mobile_apps' +require_relative './count/count_request_builder' +require_relative './graph_win32_lob_app' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphWin32LobApp + ## + # Casts the previous resource to win32LobApp. + class GraphWin32LobAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphWin32LobApp::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphWin32LobAppRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.win32LobApp{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Get the items of type microsoft.graph.win32LobApp in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of win32_lob_app_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Win32LobAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the items of type microsoft.graph.win32LobApp in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_win32_lob_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphWin32LobAppRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the items of type microsoft.graph.win32LobApp in the microsoft.graph.mobileApp collection + class GraphWin32LobAppRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/me/activities/count/count.rb b/lib/device_app_management/mobile_apps/graph_windows_app_x/count/count.rb similarity index 100% rename from lib/me/activities/count/count.rb rename to lib/device_app_management/mobile_apps/graph_windows_app_x/count/count.rb diff --git a/lib/device_app_management/mobile_apps/graph_windows_app_x/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/graph_windows_app_x/count/count_request_builder.rb new file mode 100644 index 0000000000..7336625132 --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_windows_app_x/count/count_request_builder.rb @@ -0,0 +1,100 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../graph_windows_app_x' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphWindowsAppX + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.windowsAppX/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar_view/item/instances/instances.rb b/lib/device_app_management/mobile_apps/graph_windows_app_x/graph_windows_app_x.rb similarity index 100% rename from lib/groups/item/calendar_view/item/instances/instances.rb rename to lib/device_app_management/mobile_apps/graph_windows_app_x/graph_windows_app_x.rb diff --git a/lib/device_app_management/mobile_apps/graph_windows_app_x/graph_windows_app_x_request_builder.rb b/lib/device_app_management/mobile_apps/graph_windows_app_x/graph_windows_app_x_request_builder.rb new file mode 100644 index 0000000000..c03a6e3c4f --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_windows_app_x/graph_windows_app_x_request_builder.rb @@ -0,0 +1,134 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../../models/windows_app_x_collection_response' +require_relative '../../device_app_management' +require_relative '../mobile_apps' +require_relative './count/count_request_builder' +require_relative './graph_windows_app_x' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphWindowsAppX + ## + # Casts the previous resource to windowsAppX. + class GraphWindowsAppXRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphWindowsAppX::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphWindowsAppXRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.windowsAppX{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Get the items of type microsoft.graph.windowsAppX in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of windows_app_x_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsAppXCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the items of type microsoft.graph.windowsAppX in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_windows_app_x_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphWindowsAppXRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the items of type microsoft.graph.windowsAppX in the microsoft.graph.mobileApp collection + class GraphWindowsAppXRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/me/activities/item/history_items/count/count.rb b/lib/device_app_management/mobile_apps/graph_windows_mobile_m_s_i/count/count.rb similarity index 100% rename from lib/me/activities/item/history_items/count/count.rb rename to lib/device_app_management/mobile_apps/graph_windows_mobile_m_s_i/count/count.rb diff --git a/lib/device_app_management/mobile_apps/graph_windows_mobile_m_s_i/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/graph_windows_mobile_m_s_i/count/count_request_builder.rb new file mode 100644 index 0000000000..5786f1cb30 --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_windows_mobile_m_s_i/count/count_request_builder.rb @@ -0,0 +1,100 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../graph_windows_mobile_m_s_i' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphWindowsMobileMSI + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.windowsMobileMSI/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar_view/item/instances/item/attachments/attachments.rb b/lib/device_app_management/mobile_apps/graph_windows_mobile_m_s_i/graph_windows_mobile_m_s_i.rb similarity index 100% rename from lib/groups/item/calendar_view/item/instances/item/attachments/attachments.rb rename to lib/device_app_management/mobile_apps/graph_windows_mobile_m_s_i/graph_windows_mobile_m_s_i.rb diff --git a/lib/device_app_management/mobile_apps/graph_windows_mobile_m_s_i/graph_windows_mobile_m_s_i_request_builder.rb b/lib/device_app_management/mobile_apps/graph_windows_mobile_m_s_i/graph_windows_mobile_m_s_i_request_builder.rb new file mode 100644 index 0000000000..b753f75a3e --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_windows_mobile_m_s_i/graph_windows_mobile_m_s_i_request_builder.rb @@ -0,0 +1,134 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../../models/windows_mobile_m_s_i_collection_response' +require_relative '../../device_app_management' +require_relative '../mobile_apps' +require_relative './count/count_request_builder' +require_relative './graph_windows_mobile_m_s_i' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphWindowsMobileMSI + ## + # Casts the previous resource to windowsMobileMSI. + class GraphWindowsMobileMSIRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphWindowsMobileMSI::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphWindowsMobileMSIRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.windowsMobileMSI{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Get the items of type microsoft.graph.windowsMobileMSI in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of windows_mobile_m_s_i_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsMobileMSICollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the items of type microsoft.graph.windowsMobileMSI in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_windows_mobile_m_s_i_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphWindowsMobileMSIRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the items of type microsoft.graph.windowsMobileMSI in the microsoft.graph.mobileApp collection + class GraphWindowsMobileMSIRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/me/agreement_acceptances/count/count.rb b/lib/device_app_management/mobile_apps/graph_windows_universal_app_x/count/count.rb similarity index 100% rename from lib/me/agreement_acceptances/count/count.rb rename to lib/device_app_management/mobile_apps/graph_windows_universal_app_x/count/count.rb diff --git a/lib/device_app_management/mobile_apps/graph_windows_universal_app_x/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/graph_windows_universal_app_x/count/count_request_builder.rb new file mode 100644 index 0000000000..32f14ed5a5 --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_windows_universal_app_x/count/count_request_builder.rb @@ -0,0 +1,100 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../graph_windows_universal_app_x' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphWindowsUniversalAppX + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.windowsUniversalAppX/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar_view/item/instances/item/attachments/item/item.rb b/lib/device_app_management/mobile_apps/graph_windows_universal_app_x/graph_windows_universal_app_x.rb similarity index 100% rename from lib/groups/item/calendar_view/item/instances/item/attachments/item/item.rb rename to lib/device_app_management/mobile_apps/graph_windows_universal_app_x/graph_windows_universal_app_x.rb diff --git a/lib/device_app_management/mobile_apps/graph_windows_universal_app_x/graph_windows_universal_app_x_request_builder.rb b/lib/device_app_management/mobile_apps/graph_windows_universal_app_x/graph_windows_universal_app_x_request_builder.rb new file mode 100644 index 0000000000..d97d1f780a --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_windows_universal_app_x/graph_windows_universal_app_x_request_builder.rb @@ -0,0 +1,134 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../../models/windows_universal_app_x_collection_response' +require_relative '../../device_app_management' +require_relative '../mobile_apps' +require_relative './count/count_request_builder' +require_relative './graph_windows_universal_app_x' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphWindowsUniversalAppX + ## + # Casts the previous resource to windowsUniversalAppX. + class GraphWindowsUniversalAppXRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphWindowsUniversalAppX::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphWindowsUniversalAppXRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.windowsUniversalAppX{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Get the items of type microsoft.graph.windowsUniversalAppX in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of windows_universal_app_x_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsUniversalAppXCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the items of type microsoft.graph.windowsUniversalAppX in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_windows_universal_app_x_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphWindowsUniversalAppXRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the items of type microsoft.graph.windowsUniversalAppX in the microsoft.graph.mobileApp collection + class GraphWindowsUniversalAppXRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/me/app_role_assignments/count/count.rb b/lib/device_app_management/mobile_apps/graph_windows_web_app/count/count.rb similarity index 100% rename from lib/me/app_role_assignments/count/count.rb rename to lib/device_app_management/mobile_apps/graph_windows_web_app/count/count.rb diff --git a/lib/device_app_management/mobile_apps/graph_windows_web_app/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/graph_windows_web_app/count/count_request_builder.rb new file mode 100644 index 0000000000..6b9b781cee --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_windows_web_app/count/count_request_builder.rb @@ -0,0 +1,100 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../graph_windows_web_app' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphWindowsWebApp + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.windowsWebApp/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar_view/item/instances/item/calendar/calendar.rb b/lib/device_app_management/mobile_apps/graph_windows_web_app/graph_windows_web_app.rb similarity index 100% rename from lib/groups/item/calendar_view/item/instances/item/calendar/calendar.rb rename to lib/device_app_management/mobile_apps/graph_windows_web_app/graph_windows_web_app.rb diff --git a/lib/device_app_management/mobile_apps/graph_windows_web_app/graph_windows_web_app_request_builder.rb b/lib/device_app_management/mobile_apps/graph_windows_web_app/graph_windows_web_app_request_builder.rb new file mode 100644 index 0000000000..1879b58fc7 --- /dev/null +++ b/lib/device_app_management/mobile_apps/graph_windows_web_app/graph_windows_web_app_request_builder.rb @@ -0,0 +1,134 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../../models/windows_web_app_collection_response' +require_relative '../../device_app_management' +require_relative '../mobile_apps' +require_relative './count/count_request_builder' +require_relative './graph_windows_web_app' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module GraphWindowsWebApp + ## + # Casts the previous resource to windowsWebApp. + class GraphWindowsWebAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphWindowsWebApp::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphWindowsWebAppRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/graph.windowsWebApp{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Get the items of type microsoft.graph.windowsWebApp in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of windows_web_app_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsWebAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the items of type microsoft.graph.windowsWebApp in the microsoft.graph.mobileApp collection + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_windows_web_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphWindowsWebAppRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the items of type microsoft.graph.windowsWebApp in the microsoft.graph.mobileApp collection + class GraphWindowsWebAppRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/assign/assign_post_request_body.rb b/lib/device_app_management/mobile_apps/item/assign/assign_post_request_body.rb index 95ab01d1e5..66d282c0b0 100644 --- a/lib/device_app_management/mobile_apps/item/assign/assign_post_request_body.rb +++ b/lib/device_app_management/mobile_apps/item/assign/assign_post_request_body.rb @@ -20,22 +20,22 @@ class AssignPostRequestBody # The mobileAppAssignments property @mobile_app_assignments ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new assignPostRequestBody and sets the default values. + ## Instantiates a new AssignPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_app_management/mobile_apps/item/assign/assign_request_builder.rb b/lib/device_app_management/mobile_apps/item/assign/assign_request_builder.rb index fceb784c1b..dafe315906 100644 --- a/lib/device_app_management/mobile_apps/item/assign/assign_request_builder.rb +++ b/lib/device_app_management/mobile_apps/item/assign/assign_request_builder.rb @@ -25,7 +25,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/assign") end ## - ## Not yet documented + ## Invoke action assign ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void @@ -36,12 +36,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Not yet documented + ## Invoke action assign ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assign_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_app_management/mobile_apps/item/assignments/assignments_request_builder.rb b/lib/device_app_management/mobile_apps/item/assignments/assignments_request_builder.rb index d6b22a8925..e260bed4c0 100644 --- a/lib/device_app_management/mobile_apps/item/assignments/assignments_request_builder.rb +++ b/lib/device_app_management/mobile_apps/item/assignments/assignments_request_builder.rb @@ -42,7 +42,7 @@ def by_mobile_app_assignment_id(mobile_app_assignment_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the mobileAppAssignment objects. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the mobileAppAssignment objects. diff --git a/lib/device_app_management/mobile_apps/item/assignments/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/assignments/count/count_request_builder.rb index 7825131bfe..5d968ec78a 100644 --- a/lib/device_app_management/mobile_apps/item/assignments/count/count_request_builder.rb +++ b/lib/device_app_management/mobile_apps/item/assignments/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/assignments/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/assignments/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/mobile_apps/item/assignments/item/mobile_app_assignment_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/assignments/item/mobile_app_assignment_item_request_builder.rb index 697bfaf2a2..2ac08511b3 100644 --- a/lib/device_app_management/mobile_apps/item/assignments/item/mobile_app_assignment_item_request_builder.rb +++ b/lib/device_app_management/mobile_apps/item/assignments/item/mobile_app_assignment_item_request_builder.rb @@ -25,7 +25,7 @@ class MobileAppAssignmentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRe ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/assignments/{mobileAppAssignment%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/assignments/{mobileAppAssignment%2Did}{?%24expand,%24select}") end ## ## Deletes a mobileAppAssignment. @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the mobileAppAssignment object. diff --git a/lib/device_app_management/mobile_apps/item/categories/categories_request_builder.rb b/lib/device_app_management/mobile_apps/item/categories/categories_request_builder.rb index 504cbf7912..e653cc4963 100644 --- a/lib/device_app_management/mobile_apps/item/categories/categories_request_builder.rb +++ b/lib/device_app_management/mobile_apps/item/categories/categories_request_builder.rb @@ -41,7 +41,7 @@ def by_mobile_app_category_id(mobile_app_category_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/categories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/categories{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## The list of categories for this app. @@ -53,8 +53,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategoryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -64,17 +63,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a categories_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CategoriesRequestBuilder.new(raw_url, @request_adapter) + end ## # The list of categories for this app. diff --git a/lib/device_app_management/mobile_apps/item/categories/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/categories/count/count_request_builder.rb index 69f2f0e6ca..093b2f773b 100644 --- a/lib/device_app_management/mobile_apps/item/categories/count/count_request_builder.rb +++ b/lib/device_app_management/mobile_apps/item/categories/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/categories/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/categories/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/mobile_apps/item/categories/item/mobile_app_category_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/categories/item/mobile_app_category_item_request_builder.rb index e7a0ddebc4..87177d9a36 100644 --- a/lib/device_app_management/mobile_apps/item/categories/item/mobile_app_category_item_request_builder.rb +++ b/lib/device_app_management/mobile_apps/item/categories/item/mobile_app_category_item_request_builder.rb @@ -25,7 +25,7 @@ class MobileAppCategoryItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequ ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/categories/{mobileAppCategory%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/categories/{mobileAppCategory%2Did}{?%24expand,%24select}") end ## ## The list of categories for this app. @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_category_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppCategoryItemRequestBuilder.new(raw_url, @request_adapter) + end ## # The list of categories for this app. diff --git a/lib/groups/item/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/assignments.rb similarity index 100% rename from lib/groups/item/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder.rb rename to lib/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/assignments.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/assignments_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/assignments_request_builder.rb new file mode 100644 index 0000000000..38f6b29f99 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/assignments_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_assignment' +require_relative '../../../../../models/mobile_app_assignment_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_android_lob_app' +require_relative './assignments' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_assignment_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidLobApp + module Assignments + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class AssignmentsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphAndroidLobApp::Assignments::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_assignment_id The unique identifier of mobileAppAssignment + ## @return a mobile_app_assignment_item_request_builder + ## + def by_mobile_app_assignment_id(mobile_app_assignment_id) + raise StandardError, 'mobile_app_assignment_id cannot be null' if mobile_app_assignment_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphAndroidLobApp::Assignments::Item::MobileAppAssignmentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new AssignmentsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class AssignmentsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/email_methods/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/count/count.rb similarity index 100% rename from lib/me/authentication/email_methods/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/count/count_request_builder.rb new file mode 100644 index 0000000000..b1fa5ce723 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_android_lob_app' +require_relative '../assignments' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidLobApp + module Assignments + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/assignments/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar_view/item/instances/item/extensions/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/item/item.rb similarity index 100% rename from lib/groups/item/calendar_view/item/instances/item/extensions/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/item/mobile_app_assignment_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/item/mobile_app_assignment_item_request_builder.rb new file mode 100644 index 0000000000..1703b01b45 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/assignments/item/mobile_app_assignment_item_request_builder.rb @@ -0,0 +1,172 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_assignment' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_android_lob_app' +require_relative '../assignments' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidLobApp + module Assignments + module Item + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class MobileAppAssignmentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/assignments/{mobileAppAssignment%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class MobileAppAssignmentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar_view/item/instances/item/extensions/extensions.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/categories/categories.rb similarity index 100% rename from lib/groups/item/calendar_view/item/instances/item/extensions/extensions.rb rename to lib/device_app_management/mobile_apps/item/graph_android_lob_app/categories/categories.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_android_lob_app/categories/categories_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/categories/categories_request_builder.rb new file mode 100644 index 0000000000..ab1d23db89 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/categories/categories_request_builder.rb @@ -0,0 +1,152 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_category_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_android_lob_app' +require_relative './categories' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_category_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidLobApp + module Categories + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class CategoriesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphAndroidLobApp::Categories::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_category_id The unique identifier of mobileAppCategory + ## @return a mobile_app_category_item_request_builder + ## + def by_mobile_app_category_id(mobile_app_category_id) + raise StandardError, 'mobile_app_category_id cannot be null' if mobile_app_category_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphAndroidLobApp::Categories::Item::MobileAppCategoryItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new CategoriesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/categories{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategoryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a categories_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CategoriesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class CategoriesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/fido2_methods/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/categories/count/count.rb similarity index 100% rename from lib/me/authentication/fido2_methods/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_android_lob_app/categories/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_android_lob_app/categories/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/categories/count/count_request_builder.rb new file mode 100644 index 0000000000..8d63a8e781 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/categories/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_android_lob_app' +require_relative '../categories' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidLobApp + module Categories + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/categories/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar_view/item/instances/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/categories/item/item.rb similarity index 100% rename from lib/groups/item/calendar_view/item/instances/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_android_lob_app/categories/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_android_lob_app/categories/item/mobile_app_category_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/categories/item/mobile_app_category_item_request_builder.rb new file mode 100644 index 0000000000..12fb8eb2f5 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/categories/item/mobile_app_category_item_request_builder.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_category' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_android_lob_app' +require_relative '../categories' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidLobApp + module Categories + module Item + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class MobileAppCategoryItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/categories/{mobileAppCategory%2Did}{?%24expand,%24select}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategory.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_category_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppCategoryItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class MobileAppCategoryItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/calendar_view/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/content_versions.rb similarity index 100% rename from lib/groups/item/calendar_view/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/content_versions.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/content_versions_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/content_versions_request_builder.rb new file mode 100644 index 0000000000..a31ad89566 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/content_versions_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_content' +require_relative '../../../../../models/mobile_app_content_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_android_lob_app' +require_relative './content_versions' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_content_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidLobApp + module ContentVersions + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + class ContentVersionsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphAndroidLobApp::ContentVersions::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + ## @param mobile_app_content_id The unique identifier of mobileAppContent + ## @return a mobile_app_content_item_request_builder + ## + def by_mobile_app_content_id(mobile_app_content_id) + raise StandardError, 'mobile_app_content_id cannot be null' if mobile_app_content_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppContent%2Did"] = mobile_app_content_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphAndroidLobApp::ContentVersions::Item::MobileAppContentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new ContentVersionsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to contentVersions for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to contentVersions for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a content_versions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContentVersionsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of content versions for this app. + class ContentVersionsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/methods/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/count/count.rb similarity index 100% rename from lib/me/authentication/methods/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/count/count_request_builder.rb new file mode 100644 index 0000000000..9cdcd02971 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_android_lob_app' +require_relative '../content_versions' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidLobApp + module ContentVersions + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/events/item/instances/item/attachments/attachments.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/contained_apps.rb similarity index 100% rename from lib/groups/item/events/item/instances/item/attachments/attachments.rb rename to lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/contained_apps.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.rb new file mode 100644 index 0000000000..be124bcb4a --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.rb @@ -0,0 +1,194 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/mobile_contained_app' +require_relative '../../../../../../../models/mobile_contained_app_collection_response' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../device_app_management' +require_relative '../../../../../mobile_apps' +require_relative '../../../../item' +require_relative '../../../graph_android_lob_app' +require_relative '../../content_versions' +require_relative '../item' +require_relative './contained_apps' +require_relative './count/count_request_builder' +require_relative './item/mobile_contained_app_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidLobApp + module ContentVersions + module Item + module ContainedApps + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + class ContainedAppsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphAndroidLobApp::ContentVersions::Item::ContainedApps::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + ## @param mobile_contained_app_id The unique identifier of mobileContainedApp + ## @return a mobile_contained_app_item_request_builder + ## + def by_mobile_contained_app_id(mobile_contained_app_id) + raise StandardError, 'mobile_contained_app_id cannot be null' if mobile_contained_app_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileContainedApp%2Did"] = mobile_contained_app_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphAndroidLobApp::ContentVersions::Item::ContainedApps::Item::MobileContainedAppItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new ContainedAppsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to containedApps for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to containedApps for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a contained_apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContainedAppsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of contained apps in a MobileLobApp acting as a package. + class ContainedAppsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/microsoft_authenticator_methods/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/count/count.rb similarity index 100% rename from lib/me/authentication/microsoft_authenticator_methods/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/count/count_request_builder.rb new file mode 100644 index 0000000000..eb2d4bf6c3 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/count/count_request_builder.rb @@ -0,0 +1,112 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_android_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../contained_apps' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidLobApp + module ContentVersions + module Item + module ContainedApps + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/events/item/instances/item/attachments/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/item/item.rb similarity index 100% rename from lib/groups/item/events/item/instances/item/attachments/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb new file mode 100644 index 0000000000..afa061add8 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb @@ -0,0 +1,178 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/mobile_contained_app' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_android_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../contained_apps' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidLobApp + module ContentVersions + module Item + module ContainedApps + module Item + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + class MobileContainedAppItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property containedApps for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property containedApps in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property containedApps for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property containedApps in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_contained_app_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileContainedAppItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of contained apps in a MobileLobApp acting as a package. + class MobileContainedAppItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/operations/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/count/count.rb similarity index 100% rename from lib/me/authentication/operations/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/count/count_request_builder.rb new file mode 100644 index 0000000000..bf21bbc6bf --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/count/count_request_builder.rb @@ -0,0 +1,112 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_android_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../files' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidLobApp + module ContentVersions + module Item + module Files + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/files/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/events/item/instances/item/calendar/calendar.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/files.rb similarity index 100% rename from lib/groups/item/events/item/instances/item/calendar/calendar.rb rename to lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/files.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/files_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/files_request_builder.rb new file mode 100644 index 0000000000..47dd55d6c4 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/files_request_builder.rb @@ -0,0 +1,194 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/mobile_app_content_file' +require_relative '../../../../../../../models/mobile_app_content_file_collection_response' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../device_app_management' +require_relative '../../../../../mobile_apps' +require_relative '../../../../item' +require_relative '../../../graph_android_lob_app' +require_relative '../../content_versions' +require_relative '../item' +require_relative './count/count_request_builder' +require_relative './files' +require_relative './item/mobile_app_content_file_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidLobApp + module ContentVersions + module Item + module Files + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + class FilesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphAndroidLobApp::ContentVersions::Item::Files::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + ## @param mobile_app_content_file_id The unique identifier of mobileAppContentFile + ## @return a mobile_app_content_file_item_request_builder + ## + def by_mobile_app_content_file_id(mobile_app_content_file_id) + raise StandardError, 'mobile_app_content_file_id cannot be null' if mobile_app_content_file_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppContentFile%2Did"] = mobile_app_content_file_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphAndroidLobApp::ContentVersions::Item::Files::Item::MobileAppContentFileItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new FilesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFileCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to files for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to files for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a files_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return FilesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of files for this app content version. + class FilesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/commit/commit.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/commit/commit.rb new file mode 100644 index 0000000000..b61410499d --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/commit/commit.rb @@ -0,0 +1 @@ +require_relative 'commit_post_request_body' diff --git a/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/commit/commit_post_request_body.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/commit/commit_post_request_body.rb new file mode 100644 index 0000000000..8c8bd259f2 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/commit/commit_post_request_body.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/file_encryption_info' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_android_lob_app' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './commit' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidLobApp + module ContentVersions + module Item + module Files + module Item + module Commit + class CommitPostRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The fileEncryptionInfo property + @file_encryption_info + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new CommitPostRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a commit_post_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CommitPostRequestBody.new + end + ## + ## Gets the fileEncryptionInfo property value. The fileEncryptionInfo property + ## @return a file_encryption_info + ## + def file_encryption_info + return @file_encryption_info + end + ## + ## Sets the fileEncryptionInfo property value. The fileEncryptionInfo property + ## @param value Value to set for the fileEncryptionInfo property. + ## @return a void + ## + def file_encryption_info=(value) + @file_encryption_info = value + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "fileEncryptionInfo" => lambda {|n| @file_encryption_info = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::FileEncryptionInfo.create_from_discriminator_value(pn) }) }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_object_value("fileEncryptionInfo", @file_encryption_info) + writer.write_additional_data(@additional_data) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/commit/commit_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/commit/commit_request_builder.rb new file mode 100644 index 0000000000..ab5a84fe07 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/commit/commit_request_builder.rb @@ -0,0 +1,91 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_android_lob_app' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './commit' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidLobApp + module ContentVersions + module Item + module Files + module Item + module Commit + ## + # Provides operations to call the commit method. + class CommitRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CommitRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit") + end + ## + ## Commits a file of a given app. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Commits a file of a given app. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a commit_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CommitRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/events/item/instances/item/extensions/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/item.rb similarity index 100% rename from lib/groups/item/events/item/instances/item/extensions/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb new file mode 100644 index 0000000000..e265b7b0c1 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb @@ -0,0 +1,190 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/mobile_app_content_file' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_android_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../files' +require_relative './commit/commit_request_builder' +require_relative './item' +require_relative './renew_upload/renew_upload_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidLobApp + module ContentVersions + module Item + module Files + module Item + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + class MobileAppContentFileItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to call the commit method. + def commit() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphAndroidLobApp::ContentVersions::Item::Files::Item::Commit::CommitRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to call the renewUpload method. + def renew_upload() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphAndroidLobApp::ContentVersions::Item::Files::Item::RenewUpload::RenewUploadRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property files for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property files in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property files for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property files in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_content_file_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppContentFileItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of files for this app content version. + class MobileAppContentFileItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/events/item/instances/item/dismiss_reminder/dismiss_reminder.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/renew_upload/renew_upload.rb similarity index 100% rename from lib/groups/item/events/item/instances/item/dismiss_reminder/dismiss_reminder.rb rename to lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/renew_upload/renew_upload.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb new file mode 100644 index 0000000000..08ee2ff631 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb @@ -0,0 +1,86 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_android_lob_app' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './renew_upload' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidLobApp + module ContentVersions + module Item + module Files + module Item + module RenewUpload + ## + # Provides operations to call the renewUpload method. + class RenewUploadRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new RenewUploadRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload") + end + ## + ## Renews the SAS URI for an application file upload. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(request_configuration=nil) + request_info = self.to_post_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Renews the SAS URI for an application file upload. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a renew_upload_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RenewUploadRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/events/item/instances/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/item.rb similarity index 100% rename from lib/groups/item/events/item/instances/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/mobile_app_content_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/mobile_app_content_item_request_builder.rb new file mode 100644 index 0000000000..8b34c443d9 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/content_versions/item/mobile_app_content_item_request_builder.rb @@ -0,0 +1,184 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_content' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_android_lob_app' +require_relative '../content_versions' +require_relative './contained_apps/contained_apps_request_builder' +require_relative './files/files_request_builder' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidLobApp + module ContentVersions + module Item + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + class MobileAppContentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + def contained_apps() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphAndroidLobApp::ContentVersions::Item::ContainedApps::ContainedAppsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + def files() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphAndroidLobApp::ContentVersions::Item::Files::FilesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp/contentVersions/{mobileAppContent%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property contentVersions for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property contentVersions in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property contentVersions for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property contentVersions in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_content_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppContentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of content versions for this app. + class MobileAppContentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/events/item/instances/item/extensions/extensions.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/graph_android_lob_app.rb similarity index 100% rename from lib/groups/item/events/item/instances/item/extensions/extensions.rb rename to lib/device_app_management/mobile_apps/item/graph_android_lob_app/graph_android_lob_app.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_android_lob_app/graph_android_lob_app_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/graph_android_lob_app_request_builder.rb new file mode 100644 index 0000000000..9236717035 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_lob_app/graph_android_lob_app_request_builder.rb @@ -0,0 +1,119 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/android_lob_app' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../item' +require_relative './assignments/assignments_request_builder' +require_relative './categories/categories_request_builder' +require_relative './content_versions/content_versions_request_builder' +require_relative './graph_android_lob_app' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidLobApp + ## + # Casts the previous resource to androidLobApp. + class GraphAndroidLobAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + def assignments() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphAndroidLobApp::Assignments::AssignmentsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + def categories() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphAndroidLobApp::Categories::CategoriesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + def content_versions() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphAndroidLobApp::ContentVersions::ContentVersionsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphAndroidLobAppRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidLobApp{?%24expand,%24select}") + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.androidLobApp + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of android_lob_app + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AndroidLobApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.androidLobApp + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_android_lob_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphAndroidLobAppRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the item of type microsoft.graph.mobileApp as microsoft.graph.androidLobApp + class GraphAndroidLobAppRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/permission_grants/item/restore/restore.rb b/lib/device_app_management/mobile_apps/item/graph_android_store_app/assignments/assignments.rb similarity index 100% rename from lib/groups/item/permission_grants/item/restore/restore.rb rename to lib/device_app_management/mobile_apps/item/graph_android_store_app/assignments/assignments.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_android_store_app/assignments/assignments_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_android_store_app/assignments/assignments_request_builder.rb new file mode 100644 index 0000000000..69b8ad8027 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_store_app/assignments/assignments_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_assignment' +require_relative '../../../../../models/mobile_app_assignment_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_android_store_app' +require_relative './assignments' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_assignment_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidStoreApp + module Assignments + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class AssignmentsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphAndroidStoreApp::Assignments::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_assignment_id The unique identifier of mobileAppAssignment + ## @return a mobile_app_assignment_item_request_builder + ## + def by_mobile_app_assignment_id(mobile_app_assignment_id) + raise StandardError, 'mobile_app_assignment_id cannot be null' if mobile_app_assignment_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphAndroidStoreApp::Assignments::Item::MobileAppAssignmentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new AssignmentsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class AssignmentsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/password_methods/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_android_store_app/assignments/count/count.rb similarity index 100% rename from lib/me/authentication/password_methods/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_android_store_app/assignments/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_android_store_app/assignments/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_android_store_app/assignments/count/count_request_builder.rb new file mode 100644 index 0000000000..c9d79e7c3c --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_store_app/assignments/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_android_store_app' +require_relative '../assignments' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidStoreApp + module Assignments + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/assignments/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/invitations/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_android_store_app/assignments/item/item.rb similarity index 100% rename from lib/invitations/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_android_store_app/assignments/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_android_store_app/assignments/item/mobile_app_assignment_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_android_store_app/assignments/item/mobile_app_assignment_item_request_builder.rb new file mode 100644 index 0000000000..6ddf75f8b3 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_store_app/assignments/item/mobile_app_assignment_item_request_builder.rb @@ -0,0 +1,172 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_assignment' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_android_store_app' +require_relative '../assignments' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidStoreApp + module Assignments + module Item + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class MobileAppAssignmentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/assignments/{mobileAppAssignment%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class MobileAppAssignmentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/groups/item/team/permission_grants/item/restore/restore.rb b/lib/device_app_management/mobile_apps/item/graph_android_store_app/categories/categories.rb similarity index 100% rename from lib/groups/item/team/permission_grants/item/restore/restore.rb rename to lib/device_app_management/mobile_apps/item/graph_android_store_app/categories/categories.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_android_store_app/categories/categories_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_android_store_app/categories/categories_request_builder.rb new file mode 100644 index 0000000000..fb8ead4503 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_store_app/categories/categories_request_builder.rb @@ -0,0 +1,152 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_category_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_android_store_app' +require_relative './categories' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_category_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidStoreApp + module Categories + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class CategoriesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphAndroidStoreApp::Categories::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_category_id The unique identifier of mobileAppCategory + ## @return a mobile_app_category_item_request_builder + ## + def by_mobile_app_category_id(mobile_app_category_id) + raise StandardError, 'mobile_app_category_id cannot be null' if mobile_app_category_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphAndroidStoreApp::Categories::Item::MobileAppCategoryItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new CategoriesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/categories{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategoryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a categories_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CategoriesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class CategoriesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/phone_methods/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_android_store_app/categories/count/count.rb similarity index 100% rename from lib/me/authentication/phone_methods/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_android_store_app/categories/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_android_store_app/categories/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_android_store_app/categories/count/count_request_builder.rb new file mode 100644 index 0000000000..d32651b066 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_store_app/categories/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_android_store_app' +require_relative '../categories' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidStoreApp + module Categories + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/categories/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/activities/item/history_items/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_android_store_app/categories/item/item.rb similarity index 100% rename from lib/me/activities/item/history_items/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_android_store_app/categories/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_android_store_app/categories/item/mobile_app_category_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_android_store_app/categories/item/mobile_app_category_item_request_builder.rb new file mode 100644 index 0000000000..9ef9607318 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_store_app/categories/item/mobile_app_category_item_request_builder.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_category' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_android_store_app' +require_relative '../categories' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidStoreApp + module Categories + module Item + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class MobileAppCategoryItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp/categories/{mobileAppCategory%2Did}{?%24expand,%24select}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategory.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_category_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppCategoryItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class MobileAppCategoryItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/invitations/item/invited_user/invited_user.rb b/lib/device_app_management/mobile_apps/item/graph_android_store_app/graph_android_store_app.rb similarity index 100% rename from lib/invitations/item/invited_user/invited_user.rb rename to lib/device_app_management/mobile_apps/item/graph_android_store_app/graph_android_store_app.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_android_store_app/graph_android_store_app_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_android_store_app/graph_android_store_app_request_builder.rb new file mode 100644 index 0000000000..deafbff63d --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_android_store_app/graph_android_store_app_request_builder.rb @@ -0,0 +1,113 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/android_store_app' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../item' +require_relative './assignments/assignments_request_builder' +require_relative './categories/categories_request_builder' +require_relative './graph_android_store_app' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphAndroidStoreApp + ## + # Casts the previous resource to androidStoreApp. + class GraphAndroidStoreAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + def assignments() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphAndroidStoreApp::Assignments::AssignmentsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + def categories() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphAndroidStoreApp::Categories::CategoriesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphAndroidStoreAppRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.androidStoreApp{?%24expand,%24select}") + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.androidStoreApp + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of android_store_app + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AndroidStoreApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.androidStoreApp + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_android_store_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphAndroidStoreAppRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the item of type microsoft.graph.mobileApp as microsoft.graph.androidStoreApp + class GraphAndroidStoreAppRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/invitations/item/invited_user/mailbox_settings/mailbox_settings.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/assignments.rb similarity index 100% rename from lib/invitations/item/invited_user/mailbox_settings/mailbox_settings.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/assignments.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/assignments_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/assignments_request_builder.rb new file mode 100644 index 0000000000..03b604704a --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/assignments_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_assignment' +require_relative '../../../../../models/mobile_app_assignment_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_ios_lob_app' +require_relative './assignments' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_assignment_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosLobApp + module Assignments + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class AssignmentsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosLobApp::Assignments::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_assignment_id The unique identifier of mobileAppAssignment + ## @return a mobile_app_assignment_item_request_builder + ## + def by_mobile_app_assignment_id(mobile_app_assignment_id) + raise StandardError, 'mobile_app_assignment_id cannot be null' if mobile_app_assignment_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosLobApp::Assignments::Item::MobileAppAssignmentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new AssignmentsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class AssignmentsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/software_oath_methods/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/count/count.rb similarity index 100% rename from lib/me/authentication/software_oath_methods/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/count/count_request_builder.rb new file mode 100644 index 0000000000..3debfcb8b0 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_ios_lob_app' +require_relative '../assignments' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosLobApp + module Assignments + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/assignments/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/activities/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/item/item.rb similarity index 100% rename from lib/me/activities/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/item/mobile_app_assignment_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/item/mobile_app_assignment_item_request_builder.rb new file mode 100644 index 0000000000..c6046559b8 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/assignments/item/mobile_app_assignment_item_request_builder.rb @@ -0,0 +1,172 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_assignment' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_ios_lob_app' +require_relative '../assignments' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosLobApp + module Assignments + module Item + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class MobileAppAssignmentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/assignments/{mobileAppAssignment%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class MobileAppAssignmentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/activities/activities.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/categories.rb similarity index 100% rename from lib/me/activities/activities.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/categories.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/categories_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/categories_request_builder.rb new file mode 100644 index 0000000000..bf85ac01aa --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/categories_request_builder.rb @@ -0,0 +1,152 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_category_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_ios_lob_app' +require_relative './categories' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_category_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosLobApp + module Categories + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class CategoriesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosLobApp::Categories::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_category_id The unique identifier of mobileAppCategory + ## @return a mobile_app_category_item_request_builder + ## + def by_mobile_app_category_id(mobile_app_category_id) + raise StandardError, 'mobile_app_category_id cannot be null' if mobile_app_category_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosLobApp::Categories::Item::MobileAppCategoryItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new CategoriesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/categories{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategoryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a categories_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CategoriesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class CategoriesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/temporary_access_pass_methods/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/count/count.rb similarity index 100% rename from lib/me/authentication/temporary_access_pass_methods/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/count/count_request_builder.rb new file mode 100644 index 0000000000..22f9fb6407 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_ios_lob_app' +require_relative '../categories' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosLobApp + module Categories + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/categories/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/agreement_acceptances/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/item/item.rb similarity index 100% rename from lib/me/agreement_acceptances/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/item/mobile_app_category_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/item/mobile_app_category_item_request_builder.rb new file mode 100644 index 0000000000..ff839e6c49 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/categories/item/mobile_app_category_item_request_builder.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_category' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_ios_lob_app' +require_relative '../categories' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosLobApp + module Categories + module Item + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class MobileAppCategoryItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/categories/{mobileAppCategory%2Did}{?%24expand,%24select}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategory.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_category_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppCategoryItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class MobileAppCategoryItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/activities/item/history_items/history_items.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/content_versions.rb similarity index 100% rename from lib/me/activities/item/history_items/history_items.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/content_versions.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/content_versions_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/content_versions_request_builder.rb new file mode 100644 index 0000000000..0e9b5eae24 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/content_versions_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_content' +require_relative '../../../../../models/mobile_app_content_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_ios_lob_app' +require_relative './content_versions' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_content_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosLobApp + module ContentVersions + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + class ContentVersionsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosLobApp::ContentVersions::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + ## @param mobile_app_content_id The unique identifier of mobileAppContent + ## @return a mobile_app_content_item_request_builder + ## + def by_mobile_app_content_id(mobile_app_content_id) + raise StandardError, 'mobile_app_content_id cannot be null' if mobile_app_content_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppContent%2Did"] = mobile_app_content_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosLobApp::ContentVersions::Item::MobileAppContentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new ContentVersionsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to contentVersions for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to contentVersions for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a content_versions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContentVersionsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of content versions for this app. + class ContentVersionsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/windows_hello_for_business_methods/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/count/count.rb similarity index 100% rename from lib/me/authentication/windows_hello_for_business_methods/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/count/count_request_builder.rb new file mode 100644 index 0000000000..82c1769f2c --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_ios_lob_app' +require_relative '../content_versions' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosLobApp + module ContentVersions + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/activities/item/history_items/item/activity/activity.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/contained_apps.rb similarity index 100% rename from lib/me/activities/item/history_items/item/activity/activity.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/contained_apps.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.rb new file mode 100644 index 0000000000..aaef05fd4b --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.rb @@ -0,0 +1,194 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/mobile_contained_app' +require_relative '../../../../../../../models/mobile_contained_app_collection_response' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../device_app_management' +require_relative '../../../../../mobile_apps' +require_relative '../../../../item' +require_relative '../../../graph_ios_lob_app' +require_relative '../../content_versions' +require_relative '../item' +require_relative './contained_apps' +require_relative './count/count_request_builder' +require_relative './item/mobile_contained_app_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosLobApp + module ContentVersions + module Item + module ContainedApps + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + class ContainedAppsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosLobApp::ContentVersions::Item::ContainedApps::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + ## @param mobile_contained_app_id The unique identifier of mobileContainedApp + ## @return a mobile_contained_app_item_request_builder + ## + def by_mobile_contained_app_id(mobile_contained_app_id) + raise StandardError, 'mobile_contained_app_id cannot be null' if mobile_contained_app_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileContainedApp%2Did"] = mobile_contained_app_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosLobApp::ContentVersions::Item::ContainedApps::Item::MobileContainedAppItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new ContainedAppsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to containedApps for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to containedApps for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a contained_apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContainedAppsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of contained apps in a MobileLobApp acting as a package. + class ContainedAppsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar_permissions/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/count/count.rb similarity index 100% rename from lib/me/calendar/calendar_permissions/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/count/count_request_builder.rb new file mode 100644 index 0000000000..bb04c89de3 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/count/count_request_builder.rb @@ -0,0 +1,112 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_ios_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../contained_apps' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosLobApp + module ContentVersions + module Item + module ContainedApps + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/app_role_assignments/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/item/item.rb similarity index 100% rename from lib/me/app_role_assignments/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb new file mode 100644 index 0000000000..27780d0858 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb @@ -0,0 +1,178 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/mobile_contained_app' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_ios_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../contained_apps' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosLobApp + module ContentVersions + module Item + module ContainedApps + module Item + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + class MobileContainedAppItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property containedApps for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property containedApps in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property containedApps for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property containedApps in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_contained_app_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileContainedAppItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of contained apps in a MobileLobApp acting as a package. + class MobileContainedAppItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar_view/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/count/count.rb similarity index 100% rename from lib/me/calendar/calendar_view/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/count/count_request_builder.rb new file mode 100644 index 0000000000..c80c612838 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/count/count_request_builder.rb @@ -0,0 +1,112 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_ios_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../files' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosLobApp + module ContentVersions + module Item + module Files + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/files/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/agreement_acceptances/agreement_acceptances.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/files.rb similarity index 100% rename from lib/me/agreement_acceptances/agreement_acceptances.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/files.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/files_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/files_request_builder.rb new file mode 100644 index 0000000000..30bcf92b51 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/files_request_builder.rb @@ -0,0 +1,194 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/mobile_app_content_file' +require_relative '../../../../../../../models/mobile_app_content_file_collection_response' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../device_app_management' +require_relative '../../../../../mobile_apps' +require_relative '../../../../item' +require_relative '../../../graph_ios_lob_app' +require_relative '../../content_versions' +require_relative '../item' +require_relative './count/count_request_builder' +require_relative './files' +require_relative './item/mobile_app_content_file_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosLobApp + module ContentVersions + module Item + module Files + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + class FilesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosLobApp::ContentVersions::Item::Files::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + ## @param mobile_app_content_file_id The unique identifier of mobileAppContentFile + ## @return a mobile_app_content_file_item_request_builder + ## + def by_mobile_app_content_file_id(mobile_app_content_file_id) + raise StandardError, 'mobile_app_content_file_id cannot be null' if mobile_app_content_file_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppContentFile%2Did"] = mobile_app_content_file_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosLobApp::ContentVersions::Item::Files::Item::MobileAppContentFileItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new FilesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFileCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to files for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to files for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a files_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return FilesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of files for this app content version. + class FilesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/commit/commit.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/commit/commit.rb new file mode 100644 index 0000000000..b61410499d --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/commit/commit.rb @@ -0,0 +1 @@ +require_relative 'commit_post_request_body' diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/commit/commit_post_request_body.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/commit/commit_post_request_body.rb new file mode 100644 index 0000000000..f41dfcb2bd --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/commit/commit_post_request_body.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/file_encryption_info' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_ios_lob_app' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './commit' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosLobApp + module ContentVersions + module Item + module Files + module Item + module Commit + class CommitPostRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The fileEncryptionInfo property + @file_encryption_info + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new CommitPostRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a commit_post_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CommitPostRequestBody.new + end + ## + ## Gets the fileEncryptionInfo property value. The fileEncryptionInfo property + ## @return a file_encryption_info + ## + def file_encryption_info + return @file_encryption_info + end + ## + ## Sets the fileEncryptionInfo property value. The fileEncryptionInfo property + ## @param value Value to set for the fileEncryptionInfo property. + ## @return a void + ## + def file_encryption_info=(value) + @file_encryption_info = value + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "fileEncryptionInfo" => lambda {|n| @file_encryption_info = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::FileEncryptionInfo.create_from_discriminator_value(pn) }) }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_object_value("fileEncryptionInfo", @file_encryption_info) + writer.write_additional_data(@additional_data) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/commit/commit_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/commit/commit_request_builder.rb new file mode 100644 index 0000000000..0ebf8341c0 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/commit/commit_request_builder.rb @@ -0,0 +1,91 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_ios_lob_app' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './commit' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosLobApp + module ContentVersions + module Item + module Files + module Item + module Commit + ## + # Provides operations to call the commit method. + class CommitRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CommitRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit") + end + ## + ## Commits a file of a given app. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Commits a file of a given app. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a commit_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CommitRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/email_methods/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/item.rb similarity index 100% rename from lib/me/authentication/email_methods/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb new file mode 100644 index 0000000000..77b7f09924 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb @@ -0,0 +1,190 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/mobile_app_content_file' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_ios_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../files' +require_relative './commit/commit_request_builder' +require_relative './item' +require_relative './renew_upload/renew_upload_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosLobApp + module ContentVersions + module Item + module Files + module Item + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + class MobileAppContentFileItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to call the commit method. + def commit() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosLobApp::ContentVersions::Item::Files::Item::Commit::CommitRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to call the renewUpload method. + def renew_upload() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosLobApp::ContentVersions::Item::Files::Item::RenewUpload::RenewUploadRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property files for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property files in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property files for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property files in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_content_file_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppContentFileItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of files for this app content version. + class MobileAppContentFileItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/app_role_assignments/app_role_assignments.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/renew_upload/renew_upload.rb similarity index 100% rename from lib/me/app_role_assignments/app_role_assignments.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/renew_upload/renew_upload.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb new file mode 100644 index 0000000000..f5d00e5b09 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb @@ -0,0 +1,86 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_ios_lob_app' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './renew_upload' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosLobApp + module ContentVersions + module Item + module Files + module Item + module RenewUpload + ## + # Provides operations to call the renewUpload method. + class RenewUploadRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new RenewUploadRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload") + end + ## + ## Renews the SAS URI for an application file upload. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(request_configuration=nil) + request_info = self.to_post_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Renews the SAS URI for an application file upload. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a renew_upload_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RenewUploadRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/fido2_methods/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/item.rb similarity index 100% rename from lib/me/authentication/fido2_methods/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/mobile_app_content_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/mobile_app_content_item_request_builder.rb new file mode 100644 index 0000000000..61e2c4b0b2 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/content_versions/item/mobile_app_content_item_request_builder.rb @@ -0,0 +1,184 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_content' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_ios_lob_app' +require_relative '../content_versions' +require_relative './contained_apps/contained_apps_request_builder' +require_relative './files/files_request_builder' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosLobApp + module ContentVersions + module Item + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + class MobileAppContentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + def contained_apps() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosLobApp::ContentVersions::Item::ContainedApps::ContainedAppsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + def files() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosLobApp::ContentVersions::Item::Files::FilesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp/contentVersions/{mobileAppContent%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property contentVersions for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property contentVersions in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property contentVersions for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property contentVersions in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_content_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppContentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of content versions for this app. + class MobileAppContentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/authentication.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/graph_ios_lob_app.rb similarity index 100% rename from lib/me/authentication/authentication.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_lob_app/graph_ios_lob_app.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/graph_ios_lob_app_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/graph_ios_lob_app_request_builder.rb new file mode 100644 index 0000000000..a67f3a293d --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_lob_app/graph_ios_lob_app_request_builder.rb @@ -0,0 +1,119 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/ios_lob_app' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../item' +require_relative './assignments/assignments_request_builder' +require_relative './categories/categories_request_builder' +require_relative './content_versions/content_versions_request_builder' +require_relative './graph_ios_lob_app' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosLobApp + ## + # Casts the previous resource to iosLobApp. + class GraphIosLobAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + def assignments() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosLobApp::Assignments::AssignmentsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + def categories() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosLobApp::Categories::CategoriesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + def content_versions() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosLobApp::ContentVersions::ContentVersionsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphIosLobAppRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosLobApp{?%24expand,%24select}") + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.iosLobApp + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of ios_lob_app + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::IosLobApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.iosLobApp + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_ios_lob_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphIosLobAppRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the item of type microsoft.graph.mobileApp as microsoft.graph.iosLobApp + class GraphIosLobAppRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/email_methods/email_methods.rb b/lib/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/assignments.rb similarity index 100% rename from lib/me/authentication/email_methods/email_methods.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/assignments.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/assignments_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/assignments_request_builder.rb new file mode 100644 index 0000000000..e59cc6436d --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/assignments_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_assignment' +require_relative '../../../../../models/mobile_app_assignment_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_ios_store_app' +require_relative './assignments' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_assignment_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosStoreApp + module Assignments + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class AssignmentsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosStoreApp::Assignments::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_assignment_id The unique identifier of mobileAppAssignment + ## @return a mobile_app_assignment_item_request_builder + ## + def by_mobile_app_assignment_id(mobile_app_assignment_id) + raise StandardError, 'mobile_app_assignment_id cannot be null' if mobile_app_assignment_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosStoreApp::Assignments::Item::MobileAppAssignmentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new AssignmentsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class AssignmentsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar_view/item/attachments/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/count/count.rb similarity index 100% rename from lib/me/calendar/calendar_view/item/attachments/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/count/count_request_builder.rb new file mode 100644 index 0000000000..81ffd231c0 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_ios_store_app' +require_relative '../assignments' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosStoreApp + module Assignments + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/assignments/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/methods/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/item/item.rb similarity index 100% rename from lib/me/authentication/methods/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/item/mobile_app_assignment_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/item/mobile_app_assignment_item_request_builder.rb new file mode 100644 index 0000000000..f90fbe3b28 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_store_app/assignments/item/mobile_app_assignment_item_request_builder.rb @@ -0,0 +1,172 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_assignment' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_ios_store_app' +require_relative '../assignments' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosStoreApp + module Assignments + module Item + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class MobileAppAssignmentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/assignments/{mobileAppAssignment%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class MobileAppAssignmentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/fido2_methods/fido2_methods.rb b/lib/device_app_management/mobile_apps/item/graph_ios_store_app/categories/categories.rb similarity index 100% rename from lib/me/authentication/fido2_methods/fido2_methods.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_store_app/categories/categories.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_store_app/categories/categories_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_store_app/categories/categories_request_builder.rb new file mode 100644 index 0000000000..e27ffb8992 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_store_app/categories/categories_request_builder.rb @@ -0,0 +1,152 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_category_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_ios_store_app' +require_relative './categories' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_category_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosStoreApp + module Categories + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class CategoriesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosStoreApp::Categories::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_category_id The unique identifier of mobileAppCategory + ## @return a mobile_app_category_item_request_builder + ## + def by_mobile_app_category_id(mobile_app_category_id) + raise StandardError, 'mobile_app_category_id cannot be null' if mobile_app_category_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosStoreApp::Categories::Item::MobileAppCategoryItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new CategoriesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/categories{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategoryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a categories_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CategoriesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class CategoriesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar_view/item/extensions/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_ios_store_app/categories/count/count.rb similarity index 100% rename from lib/me/calendar/calendar_view/item/extensions/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_store_app/categories/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_store_app/categories/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_store_app/categories/count/count_request_builder.rb new file mode 100644 index 0000000000..aa7d69c739 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_store_app/categories/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_ios_store_app' +require_relative '../categories' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosStoreApp + module Categories + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/categories/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/microsoft_authenticator_methods/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_ios_store_app/categories/item/item.rb similarity index 100% rename from lib/me/authentication/microsoft_authenticator_methods/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_store_app/categories/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_store_app/categories/item/mobile_app_category_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_store_app/categories/item/mobile_app_category_item_request_builder.rb new file mode 100644 index 0000000000..655cb61c68 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_store_app/categories/item/mobile_app_category_item_request_builder.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_category' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_ios_store_app' +require_relative '../categories' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosStoreApp + module Categories + module Item + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class MobileAppCategoryItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp/categories/{mobileAppCategory%2Did}{?%24expand,%24select}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategory.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_category_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppCategoryItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class MobileAppCategoryItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/methods/methods.rb b/lib/device_app_management/mobile_apps/item/graph_ios_store_app/graph_ios_store_app.rb similarity index 100% rename from lib/me/authentication/methods/methods.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_store_app/graph_ios_store_app.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_store_app/graph_ios_store_app_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_store_app/graph_ios_store_app_request_builder.rb new file mode 100644 index 0000000000..48913ac1b2 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_store_app/graph_ios_store_app_request_builder.rb @@ -0,0 +1,113 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/ios_store_app' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../item' +require_relative './assignments/assignments_request_builder' +require_relative './categories/categories_request_builder' +require_relative './graph_ios_store_app' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosStoreApp + ## + # Casts the previous resource to iosStoreApp. + class GraphIosStoreAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + def assignments() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosStoreApp::Assignments::AssignmentsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + def categories() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosStoreApp::Categories::CategoriesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphIosStoreAppRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosStoreApp{?%24expand,%24select}") + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.iosStoreApp + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of ios_store_app + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::IosStoreApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.iosStoreApp + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_ios_store_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphIosStoreAppRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the item of type microsoft.graph.mobileApp as microsoft.graph.iosStoreApp + class GraphIosStoreAppRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/microsoft_authenticator_methods/item/device/device.rb b/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/assignments.rb similarity index 100% rename from lib/me/authentication/microsoft_authenticator_methods/item/device/device.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/assignments.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/assignments_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/assignments_request_builder.rb new file mode 100644 index 0000000000..6a4c884c7f --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/assignments_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_assignment' +require_relative '../../../../../models/mobile_app_assignment_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_ios_vpp_app' +require_relative './assignments' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_assignment_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosVppApp + module Assignments + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class AssignmentsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosVppApp::Assignments::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_assignment_id The unique identifier of mobileAppAssignment + ## @return a mobile_app_assignment_item_request_builder + ## + def by_mobile_app_assignment_id(mobile_app_assignment_id) + raise StandardError, 'mobile_app_assignment_id cannot be null' if mobile_app_assignment_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosVppApp::Assignments::Item::MobileAppAssignmentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new AssignmentsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class AssignmentsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar_view/item/instances/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/count/count.rb similarity index 100% rename from lib/me/calendar/calendar_view/item/instances/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/count/count_request_builder.rb new file mode 100644 index 0000000000..4069c0371f --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_ios_vpp_app' +require_relative '../assignments' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosVppApp + module Assignments + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/assignments/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/operations/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/item/item.rb similarity index 100% rename from lib/me/authentication/operations/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/item/mobile_app_assignment_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/item/mobile_app_assignment_item_request_builder.rb new file mode 100644 index 0000000000..ec311c336b --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/assignments/item/mobile_app_assignment_item_request_builder.rb @@ -0,0 +1,172 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_assignment' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_ios_vpp_app' +require_relative '../assignments' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosVppApp + module Assignments + module Item + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class MobileAppAssignmentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/assignments/{mobileAppAssignment%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class MobileAppAssignmentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/microsoft_authenticator_methods/microsoft_authenticator_methods.rb b/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/categories.rb similarity index 100% rename from lib/me/authentication/microsoft_authenticator_methods/microsoft_authenticator_methods.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/categories.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/categories_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/categories_request_builder.rb new file mode 100644 index 0000000000..3640867a1c --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/categories_request_builder.rb @@ -0,0 +1,152 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_category_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_ios_vpp_app' +require_relative './categories' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_category_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosVppApp + module Categories + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class CategoriesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosVppApp::Categories::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_category_id The unique identifier of mobileAppCategory + ## @return a mobile_app_category_item_request_builder + ## + def by_mobile_app_category_id(mobile_app_category_id) + raise StandardError, 'mobile_app_category_id cannot be null' if mobile_app_category_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosVppApp::Categories::Item::MobileAppCategoryItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new CategoriesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/categories{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategoryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a categories_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CategoriesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class CategoriesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar_view/item/instances/item/attachments/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/count/count.rb similarity index 100% rename from lib/me/calendar/calendar_view/item/instances/item/attachments/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/count/count_request_builder.rb new file mode 100644 index 0000000000..0d3308ed12 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_ios_vpp_app' +require_relative '../categories' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosVppApp + module Categories + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/categories/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/password_methods/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/item/item.rb similarity index 100% rename from lib/me/authentication/password_methods/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/item/mobile_app_category_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/item/mobile_app_category_item_request_builder.rb new file mode 100644 index 0000000000..48c89d8b15 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/categories/item/mobile_app_category_item_request_builder.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_category' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_ios_vpp_app' +require_relative '../categories' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosVppApp + module Categories + module Item + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class MobileAppCategoryItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp/categories/{mobileAppCategory%2Did}{?%24expand,%24select}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategory.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_category_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppCategoryItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class MobileAppCategoryItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/operations/operations.rb b/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/graph_ios_vpp_app.rb similarity index 100% rename from lib/me/authentication/operations/operations.rb rename to lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/graph_ios_vpp_app.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/graph_ios_vpp_app_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/graph_ios_vpp_app_request_builder.rb new file mode 100644 index 0000000000..c0f956512f --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_ios_vpp_app/graph_ios_vpp_app_request_builder.rb @@ -0,0 +1,113 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/ios_vpp_app' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../item' +require_relative './assignments/assignments_request_builder' +require_relative './categories/categories_request_builder' +require_relative './graph_ios_vpp_app' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphIosVppApp + ## + # Casts the previous resource to iosVppApp. + class GraphIosVppAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + def assignments() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosVppApp::Assignments::AssignmentsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + def categories() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosVppApp::Categories::CategoriesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphIosVppAppRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.iosVppApp{?%24expand,%24select}") + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.iosVppApp + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of ios_vpp_app + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::IosVppApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.iosVppApp + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_ios_vpp_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphIosVppAppRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the item of type microsoft.graph.mobileApp as microsoft.graph.iosVppApp + class GraphIosVppAppRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/password_methods/password_methods.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/assignments.rb similarity index 100% rename from lib/me/authentication/password_methods/password_methods.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/assignments.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/assignments_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/assignments_request_builder.rb new file mode 100644 index 0000000000..1122c86ffb --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/assignments_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_assignment' +require_relative '../../../../../models/mobile_app_assignment_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_mac_o_s_dmg_app' +require_relative './assignments' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_assignment_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSDmgApp + module Assignments + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class AssignmentsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSDmgApp::Assignments::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_assignment_id The unique identifier of mobileAppAssignment + ## @return a mobile_app_assignment_item_request_builder + ## + def by_mobile_app_assignment_id(mobile_app_assignment_id) + raise StandardError, 'mobile_app_assignment_id cannot be null' if mobile_app_assignment_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSDmgApp::Assignments::Item::MobileAppAssignmentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new AssignmentsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class AssignmentsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar_view/item/instances/item/extensions/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/count/count.rb similarity index 100% rename from lib/me/calendar/calendar_view/item/instances/item/extensions/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/count/count_request_builder.rb new file mode 100644 index 0000000000..c4338b2145 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_mac_o_s_dmg_app' +require_relative '../assignments' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSDmgApp + module Assignments + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/assignments/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/phone_methods/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/item/item.rb similarity index 100% rename from lib/me/authentication/phone_methods/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/item/mobile_app_assignment_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/item/mobile_app_assignment_item_request_builder.rb new file mode 100644 index 0000000000..5e03006a8e --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/assignments/item/mobile_app_assignment_item_request_builder.rb @@ -0,0 +1,172 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_assignment' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_mac_o_s_dmg_app' +require_relative '../assignments' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSDmgApp + module Assignments + module Item + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class MobileAppAssignmentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/assignments/{mobileAppAssignment%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class MobileAppAssignmentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/phone_methods/item/disable_sms_sign_in/disable_sms_sign_in.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/categories.rb similarity index 100% rename from lib/me/authentication/phone_methods/item/disable_sms_sign_in/disable_sms_sign_in.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/categories.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/categories_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/categories_request_builder.rb new file mode 100644 index 0000000000..80c0ee88a2 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/categories_request_builder.rb @@ -0,0 +1,152 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_category_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_mac_o_s_dmg_app' +require_relative './categories' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_category_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSDmgApp + module Categories + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class CategoriesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSDmgApp::Categories::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_category_id The unique identifier of mobileAppCategory + ## @return a mobile_app_category_item_request_builder + ## + def by_mobile_app_category_id(mobile_app_category_id) + raise StandardError, 'mobile_app_category_id cannot be null' if mobile_app_category_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSDmgApp::Categories::Item::MobileAppCategoryItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new CategoriesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/categories{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategoryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a categories_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CategoriesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class CategoriesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/events/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/count/count.rb similarity index 100% rename from lib/me/calendar/events/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/count/count_request_builder.rb new file mode 100644 index 0000000000..1fb8db0340 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_mac_o_s_dmg_app' +require_relative '../categories' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSDmgApp + module Categories + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/categories/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/software_oath_methods/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/item/item.rb similarity index 100% rename from lib/me/authentication/software_oath_methods/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/item/mobile_app_category_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/item/mobile_app_category_item_request_builder.rb new file mode 100644 index 0000000000..2c962be506 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/categories/item/mobile_app_category_item_request_builder.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_category' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_mac_o_s_dmg_app' +require_relative '../categories' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSDmgApp + module Categories + module Item + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class MobileAppCategoryItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/categories/{mobileAppCategory%2Did}{?%24expand,%24select}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategory.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_category_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppCategoryItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class MobileAppCategoryItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/phone_methods/item/enable_sms_sign_in/enable_sms_sign_in.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/content_versions.rb similarity index 100% rename from lib/me/authentication/phone_methods/item/enable_sms_sign_in/enable_sms_sign_in.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/content_versions.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/content_versions_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/content_versions_request_builder.rb new file mode 100644 index 0000000000..137fdc1f0b --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/content_versions_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_content' +require_relative '../../../../../models/mobile_app_content_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_mac_o_s_dmg_app' +require_relative './content_versions' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_content_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSDmgApp + module ContentVersions + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + class ContentVersionsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSDmgApp::ContentVersions::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + ## @param mobile_app_content_id The unique identifier of mobileAppContent + ## @return a mobile_app_content_item_request_builder + ## + def by_mobile_app_content_id(mobile_app_content_id) + raise StandardError, 'mobile_app_content_id cannot be null' if mobile_app_content_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppContent%2Did"] = mobile_app_content_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSDmgApp::ContentVersions::Item::MobileAppContentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new ContentVersionsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to contentVersions for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to contentVersions for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a content_versions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContentVersionsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of content versions for this app. + class ContentVersionsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/events/item/attachments/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/count/count.rb similarity index 100% rename from lib/me/calendar/events/item/attachments/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/count/count_request_builder.rb new file mode 100644 index 0000000000..a83a6f5ea2 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_mac_o_s_dmg_app' +require_relative '../content_versions' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSDmgApp + module ContentVersions + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/phone_methods/phone_methods.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/contained_apps.rb similarity index 100% rename from lib/me/authentication/phone_methods/phone_methods.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/contained_apps.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/contained_apps_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/contained_apps_request_builder.rb new file mode 100644 index 0000000000..80fcf29251 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/contained_apps_request_builder.rb @@ -0,0 +1,194 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/mobile_contained_app' +require_relative '../../../../../../../models/mobile_contained_app_collection_response' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../device_app_management' +require_relative '../../../../../mobile_apps' +require_relative '../../../../item' +require_relative '../../../graph_mac_o_s_dmg_app' +require_relative '../../content_versions' +require_relative '../item' +require_relative './contained_apps' +require_relative './count/count_request_builder' +require_relative './item/mobile_contained_app_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSDmgApp + module ContentVersions + module Item + module ContainedApps + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + class ContainedAppsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSDmgApp::ContentVersions::Item::ContainedApps::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + ## @param mobile_contained_app_id The unique identifier of mobileContainedApp + ## @return a mobile_contained_app_item_request_builder + ## + def by_mobile_contained_app_id(mobile_contained_app_id) + raise StandardError, 'mobile_contained_app_id cannot be null' if mobile_contained_app_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileContainedApp%2Did"] = mobile_contained_app_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSDmgApp::ContentVersions::Item::ContainedApps::Item::MobileContainedAppItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new ContainedAppsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to containedApps for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to containedApps for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a contained_apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContainedAppsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of contained apps in a MobileLobApp acting as a package. + class ContainedAppsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/events/item/extensions/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/count/count.rb similarity index 100% rename from lib/me/calendar/events/item/extensions/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/count/count_request_builder.rb new file mode 100644 index 0000000000..85828b5685 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/count/count_request_builder.rb @@ -0,0 +1,112 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_mac_o_s_dmg_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../contained_apps' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSDmgApp + module ContentVersions + module Item + module ContainedApps + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/temporary_access_pass_methods/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/item/item.rb similarity index 100% rename from lib/me/authentication/temporary_access_pass_methods/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb new file mode 100644 index 0000000000..cbc3a6614d --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb @@ -0,0 +1,178 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/mobile_contained_app' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_mac_o_s_dmg_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../contained_apps' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSDmgApp + module ContentVersions + module Item + module ContainedApps + module Item + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + class MobileContainedAppItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property containedApps for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property containedApps in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property containedApps for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property containedApps in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_contained_app_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileContainedAppItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of contained apps in a MobileLobApp acting as a package. + class MobileContainedAppItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/events/item/instances/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/count/count.rb similarity index 100% rename from lib/me/calendar/events/item/instances/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/count/count_request_builder.rb new file mode 100644 index 0000000000..731dd06501 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/count/count_request_builder.rb @@ -0,0 +1,112 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_mac_o_s_dmg_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../files' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSDmgApp + module ContentVersions + module Item + module Files + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/files/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/software_oath_methods/software_oath_methods.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/files.rb similarity index 100% rename from lib/me/authentication/software_oath_methods/software_oath_methods.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/files.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/files_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/files_request_builder.rb new file mode 100644 index 0000000000..39ec0dc833 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/files_request_builder.rb @@ -0,0 +1,194 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/mobile_app_content_file' +require_relative '../../../../../../../models/mobile_app_content_file_collection_response' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../device_app_management' +require_relative '../../../../../mobile_apps' +require_relative '../../../../item' +require_relative '../../../graph_mac_o_s_dmg_app' +require_relative '../../content_versions' +require_relative '../item' +require_relative './count/count_request_builder' +require_relative './files' +require_relative './item/mobile_app_content_file_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSDmgApp + module ContentVersions + module Item + module Files + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + class FilesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSDmgApp::ContentVersions::Item::Files::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + ## @param mobile_app_content_file_id The unique identifier of mobileAppContentFile + ## @return a mobile_app_content_file_item_request_builder + ## + def by_mobile_app_content_file_id(mobile_app_content_file_id) + raise StandardError, 'mobile_app_content_file_id cannot be null' if mobile_app_content_file_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppContentFile%2Did"] = mobile_app_content_file_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSDmgApp::ContentVersions::Item::Files::Item::MobileAppContentFileItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new FilesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/files{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFileCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to files for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to files for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a files_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return FilesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of files for this app content version. + class FilesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/commit/commit.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/commit/commit.rb new file mode 100644 index 0000000000..b61410499d --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/commit/commit.rb @@ -0,0 +1 @@ +require_relative 'commit_post_request_body' diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/commit/commit_post_request_body.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/commit/commit_post_request_body.rb new file mode 100644 index 0000000000..b1df5c8df8 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/commit/commit_post_request_body.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/file_encryption_info' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_mac_o_s_dmg_app' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './commit' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSDmgApp + module ContentVersions + module Item + module Files + module Item + module Commit + class CommitPostRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The fileEncryptionInfo property + @file_encryption_info + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new CommitPostRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a commit_post_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CommitPostRequestBody.new + end + ## + ## Gets the fileEncryptionInfo property value. The fileEncryptionInfo property + ## @return a file_encryption_info + ## + def file_encryption_info + return @file_encryption_info + end + ## + ## Sets the fileEncryptionInfo property value. The fileEncryptionInfo property + ## @param value Value to set for the fileEncryptionInfo property. + ## @return a void + ## + def file_encryption_info=(value) + @file_encryption_info = value + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "fileEncryptionInfo" => lambda {|n| @file_encryption_info = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::FileEncryptionInfo.create_from_discriminator_value(pn) }) }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_object_value("fileEncryptionInfo", @file_encryption_info) + writer.write_additional_data(@additional_data) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/commit/commit_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/commit/commit_request_builder.rb new file mode 100644 index 0000000000..29dec9842d --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/commit/commit_request_builder.rb @@ -0,0 +1,91 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_mac_o_s_dmg_app' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './commit' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSDmgApp + module ContentVersions + module Item + module Files + module Item + module Commit + ## + # Provides operations to call the commit method. + class CommitRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CommitRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit") + end + ## + ## Commits a file of a given app. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Commits a file of a given app. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a commit_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CommitRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/windows_hello_for_business_methods/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/item.rb similarity index 100% rename from lib/me/authentication/windows_hello_for_business_methods/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb new file mode 100644 index 0000000000..8c3c850406 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb @@ -0,0 +1,190 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/mobile_app_content_file' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_mac_o_s_dmg_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../files' +require_relative './commit/commit_request_builder' +require_relative './item' +require_relative './renew_upload/renew_upload_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSDmgApp + module ContentVersions + module Item + module Files + module Item + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + class MobileAppContentFileItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to call the commit method. + def commit() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSDmgApp::ContentVersions::Item::Files::Item::Commit::CommitRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to call the renewUpload method. + def renew_upload() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSDmgApp::ContentVersions::Item::Files::Item::RenewUpload::RenewUploadRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property files for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property files in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property files for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property files in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_content_file_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppContentFileItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of files for this app content version. + class MobileAppContentFileItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/temporary_access_pass_methods/temporary_access_pass_methods.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/renew_upload/renew_upload.rb similarity index 100% rename from lib/me/authentication/temporary_access_pass_methods/temporary_access_pass_methods.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/renew_upload/renew_upload.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb new file mode 100644 index 0000000000..41c48f2c9f --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb @@ -0,0 +1,86 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_mac_o_s_dmg_app' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './renew_upload' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSDmgApp + module ContentVersions + module Item + module Files + module Item + module RenewUpload + ## + # Provides operations to call the renewUpload method. + class RenewUploadRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new RenewUploadRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload") + end + ## + ## Renews the SAS URI for an application file upload. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(request_configuration=nil) + request_info = self.to_post_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Renews the SAS URI for an application file upload. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a renew_upload_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RenewUploadRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar_permissions/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/item.rb similarity index 100% rename from lib/me/calendar/calendar_permissions/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/mobile_app_content_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/mobile_app_content_item_request_builder.rb new file mode 100644 index 0000000000..6dcab7fe36 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/content_versions/item/mobile_app_content_item_request_builder.rb @@ -0,0 +1,184 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_content' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_mac_o_s_dmg_app' +require_relative '../content_versions' +require_relative './contained_apps/contained_apps_request_builder' +require_relative './files/files_request_builder' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSDmgApp + module ContentVersions + module Item + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + class MobileAppContentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + def contained_apps() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSDmgApp::ContentVersions::Item::ContainedApps::ContainedAppsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + def files() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSDmgApp::ContentVersions::Item::Files::FilesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp/contentVersions/{mobileAppContent%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property contentVersions for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property contentVersions in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property contentVersions for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property contentVersions in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_content_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppContentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of content versions for this app. + class MobileAppContentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/windows_hello_for_business_methods/item/device/device.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/graph_mac_o_s_dmg_app.rb similarity index 100% rename from lib/me/authentication/windows_hello_for_business_methods/item/device/device.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/graph_mac_o_s_dmg_app.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/graph_mac_o_s_dmg_app_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/graph_mac_o_s_dmg_app_request_builder.rb new file mode 100644 index 0000000000..2e45f97ed5 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_dmg_app/graph_mac_o_s_dmg_app_request_builder.rb @@ -0,0 +1,119 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/mac_o_s_dmg_app' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../item' +require_relative './assignments/assignments_request_builder' +require_relative './categories/categories_request_builder' +require_relative './content_versions/content_versions_request_builder' +require_relative './graph_mac_o_s_dmg_app' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSDmgApp + ## + # Casts the previous resource to macOSDmgApp. + class GraphMacOSDmgAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + def assignments() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSDmgApp::Assignments::AssignmentsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + def categories() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSDmgApp::Categories::CategoriesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + def content_versions() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSDmgApp::ContentVersions::ContentVersionsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphMacOSDmgAppRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSDmgApp{?%24expand,%24select}") + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.macOSDmgApp + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mac_o_s_dmg_app + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MacOSDmgApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.macOSDmgApp + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_mac_o_s_dmg_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphMacOSDmgAppRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the item of type microsoft.graph.mobileApp as microsoft.graph.macOSDmgApp + class GraphMacOSDmgAppRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/me/authentication/windows_hello_for_business_methods/windows_hello_for_business_methods.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/assignments.rb similarity index 100% rename from lib/me/authentication/windows_hello_for_business_methods/windows_hello_for_business_methods.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/assignments.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/assignments_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/assignments_request_builder.rb new file mode 100644 index 0000000000..b9eff63b96 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/assignments_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_assignment' +require_relative '../../../../../models/mobile_app_assignment_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_mac_o_s_lob_app' +require_relative './assignments' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_assignment_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSLobApp + module Assignments + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class AssignmentsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSLobApp::Assignments::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_assignment_id The unique identifier of mobileAppAssignment + ## @return a mobile_app_assignment_item_request_builder + ## + def by_mobile_app_assignment_id(mobile_app_assignment_id) + raise StandardError, 'mobile_app_assignment_id cannot be null' if mobile_app_assignment_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSLobApp::Assignments::Item::MobileAppAssignmentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new AssignmentsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class AssignmentsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/events/item/instances/item/attachments/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/count/count.rb similarity index 100% rename from lib/me/calendar/events/item/instances/item/attachments/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/count/count_request_builder.rb new file mode 100644 index 0000000000..ed4881b07e --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_mac_o_s_lob_app' +require_relative '../assignments' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSLobApp + module Assignments + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/assignments/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar_view/item/attachments/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/item/item.rb similarity index 100% rename from lib/me/calendar/calendar_view/item/attachments/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/item/mobile_app_assignment_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/item/mobile_app_assignment_item_request_builder.rb new file mode 100644 index 0000000000..4a9ae07ccb --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/assignments/item/mobile_app_assignment_item_request_builder.rb @@ -0,0 +1,172 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_assignment' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_mac_o_s_lob_app' +require_relative '../assignments' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSLobApp + module Assignments + module Item + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class MobileAppAssignmentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/assignments/{mobileAppAssignment%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class MobileAppAssignmentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/categories.rb similarity index 100% rename from lib/me/calendar/calendar.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/categories.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/categories_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/categories_request_builder.rb new file mode 100644 index 0000000000..6cd623b4ba --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/categories_request_builder.rb @@ -0,0 +1,152 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_category_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_mac_o_s_lob_app' +require_relative './categories' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_category_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSLobApp + module Categories + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class CategoriesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSLobApp::Categories::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_category_id The unique identifier of mobileAppCategory + ## @return a mobile_app_category_item_request_builder + ## + def by_mobile_app_category_id(mobile_app_category_id) + raise StandardError, 'mobile_app_category_id cannot be null' if mobile_app_category_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSLobApp::Categories::Item::MobileAppCategoryItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new CategoriesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/categories{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategoryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a categories_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CategoriesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class CategoriesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/events/item/instances/item/extensions/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/count/count.rb similarity index 100% rename from lib/me/calendar/events/item/instances/item/extensions/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/count/count_request_builder.rb new file mode 100644 index 0000000000..913d1bb0e3 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_mac_o_s_lob_app' +require_relative '../categories' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSLobApp + module Categories + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/categories/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar_view/item/extensions/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/item/item.rb similarity index 100% rename from lib/me/calendar/calendar_view/item/extensions/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/item/mobile_app_category_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/item/mobile_app_category_item_request_builder.rb new file mode 100644 index 0000000000..e8ad8f0f09 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/categories/item/mobile_app_category_item_request_builder.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_category' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_mac_o_s_lob_app' +require_relative '../categories' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSLobApp + module Categories + module Item + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class MobileAppCategoryItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/categories/{mobileAppCategory%2Did}{?%24expand,%24select}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategory.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_category_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppCategoryItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class MobileAppCategoryItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar_permissions/calendar_permissions.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/content_versions.rb similarity index 100% rename from lib/me/calendar/calendar_permissions/calendar_permissions.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/content_versions.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/content_versions_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/content_versions_request_builder.rb new file mode 100644 index 0000000000..381b671f92 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/content_versions_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_content' +require_relative '../../../../../models/mobile_app_content_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_mac_o_s_lob_app' +require_relative './content_versions' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_content_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSLobApp + module ContentVersions + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + class ContentVersionsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSLobApp::ContentVersions::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + ## @param mobile_app_content_id The unique identifier of mobileAppContent + ## @return a mobile_app_content_item_request_builder + ## + def by_mobile_app_content_id(mobile_app_content_id) + raise StandardError, 'mobile_app_content_id cannot be null' if mobile_app_content_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppContent%2Did"] = mobile_app_content_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSLobApp::ContentVersions::Item::MobileAppContentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new ContentVersionsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to contentVersions for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to contentVersions for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a content_versions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContentVersionsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of content versions for this app. + class ContentVersionsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/count/count.rb similarity index 100% rename from lib/me/calendar_groups/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/count/count_request_builder.rb new file mode 100644 index 0000000000..9977e557ff --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_mac_o_s_lob_app' +require_relative '../content_versions' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSLobApp + module ContentVersions + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar_view/calendar_view.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/contained_apps.rb similarity index 100% rename from lib/me/calendar/calendar_view/calendar_view.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/contained_apps.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.rb new file mode 100644 index 0000000000..67cc1ee0fd --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.rb @@ -0,0 +1,194 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/mobile_contained_app' +require_relative '../../../../../../../models/mobile_contained_app_collection_response' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../device_app_management' +require_relative '../../../../../mobile_apps' +require_relative '../../../../item' +require_relative '../../../graph_mac_o_s_lob_app' +require_relative '../../content_versions' +require_relative '../item' +require_relative './contained_apps' +require_relative './count/count_request_builder' +require_relative './item/mobile_contained_app_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSLobApp + module ContentVersions + module Item + module ContainedApps + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + class ContainedAppsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSLobApp::ContentVersions::Item::ContainedApps::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + ## @param mobile_contained_app_id The unique identifier of mobileContainedApp + ## @return a mobile_contained_app_item_request_builder + ## + def by_mobile_contained_app_id(mobile_contained_app_id) + raise StandardError, 'mobile_contained_app_id cannot be null' if mobile_contained_app_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileContainedApp%2Did"] = mobile_contained_app_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSLobApp::ContentVersions::Item::ContainedApps::Item::MobileContainedAppItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new ContainedAppsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to containedApps for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to containedApps for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a contained_apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContainedAppsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of contained apps in a MobileLobApp acting as a package. + class ContainedAppsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/count/count.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/count/count_request_builder.rb new file mode 100644 index 0000000000..6876750ba4 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/count/count_request_builder.rb @@ -0,0 +1,112 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_mac_o_s_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../contained_apps' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSLobApp + module ContentVersions + module Item + module ContainedApps + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar_view/item/instances/item/attachments/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/item/item.rb similarity index 100% rename from lib/me/calendar/calendar_view/item/instances/item/attachments/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb new file mode 100644 index 0000000000..a898ed5dea --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb @@ -0,0 +1,178 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/mobile_contained_app' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_mac_o_s_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../contained_apps' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSLobApp + module ContentVersions + module Item + module ContainedApps + module Item + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + class MobileContainedAppItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property containedApps for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property containedApps in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property containedApps for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property containedApps in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_contained_app_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileContainedAppItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of contained apps in a MobileLobApp acting as a package. + class MobileContainedAppItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/calendar_permissions/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/count/count.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/calendar_permissions/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/count/count_request_builder.rb new file mode 100644 index 0000000000..35f6e65097 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/count/count_request_builder.rb @@ -0,0 +1,112 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_mac_o_s_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../files' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSLobApp + module ContentVersions + module Item + module Files + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/files/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar_view/item/attachments/attachments.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/files.rb similarity index 100% rename from lib/me/calendar/calendar_view/item/attachments/attachments.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/files.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/files_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/files_request_builder.rb new file mode 100644 index 0000000000..92424c3dbb --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/files_request_builder.rb @@ -0,0 +1,194 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/mobile_app_content_file' +require_relative '../../../../../../../models/mobile_app_content_file_collection_response' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../device_app_management' +require_relative '../../../../../mobile_apps' +require_relative '../../../../item' +require_relative '../../../graph_mac_o_s_lob_app' +require_relative '../../content_versions' +require_relative '../item' +require_relative './count/count_request_builder' +require_relative './files' +require_relative './item/mobile_app_content_file_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSLobApp + module ContentVersions + module Item + module Files + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + class FilesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSLobApp::ContentVersions::Item::Files::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + ## @param mobile_app_content_file_id The unique identifier of mobileAppContentFile + ## @return a mobile_app_content_file_item_request_builder + ## + def by_mobile_app_content_file_id(mobile_app_content_file_id) + raise StandardError, 'mobile_app_content_file_id cannot be null' if mobile_app_content_file_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppContentFile%2Did"] = mobile_app_content_file_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSLobApp::ContentVersions::Item::Files::Item::MobileAppContentFileItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new FilesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFileCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to files for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to files for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a files_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return FilesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of files for this app content version. + class FilesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/commit/commit.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/commit/commit.rb new file mode 100644 index 0000000000..b61410499d --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/commit/commit.rb @@ -0,0 +1 @@ +require_relative 'commit_post_request_body' diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/commit/commit_post_request_body.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/commit/commit_post_request_body.rb new file mode 100644 index 0000000000..631c546e23 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/commit/commit_post_request_body.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/file_encryption_info' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_mac_o_s_lob_app' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './commit' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSLobApp + module ContentVersions + module Item + module Files + module Item + module Commit + class CommitPostRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The fileEncryptionInfo property + @file_encryption_info + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new CommitPostRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a commit_post_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CommitPostRequestBody.new + end + ## + ## Gets the fileEncryptionInfo property value. The fileEncryptionInfo property + ## @return a file_encryption_info + ## + def file_encryption_info + return @file_encryption_info + end + ## + ## Sets the fileEncryptionInfo property value. The fileEncryptionInfo property + ## @param value Value to set for the fileEncryptionInfo property. + ## @return a void + ## + def file_encryption_info=(value) + @file_encryption_info = value + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "fileEncryptionInfo" => lambda {|n| @file_encryption_info = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::FileEncryptionInfo.create_from_discriminator_value(pn) }) }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_object_value("fileEncryptionInfo", @file_encryption_info) + writer.write_additional_data(@additional_data) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/commit/commit_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/commit/commit_request_builder.rb new file mode 100644 index 0000000000..4aa997debf --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/commit/commit_request_builder.rb @@ -0,0 +1,91 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_mac_o_s_lob_app' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './commit' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSLobApp + module ContentVersions + module Item + module Files + module Item + module Commit + ## + # Provides operations to call the commit method. + class CommitRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CommitRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit") + end + ## + ## Commits a file of a given app. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Commits a file of a given app. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a commit_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CommitRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar_view/item/instances/item/extensions/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/item.rb similarity index 100% rename from lib/me/calendar/calendar_view/item/instances/item/extensions/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb new file mode 100644 index 0000000000..e9af00072a --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb @@ -0,0 +1,190 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/mobile_app_content_file' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_mac_o_s_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../files' +require_relative './commit/commit_request_builder' +require_relative './item' +require_relative './renew_upload/renew_upload_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSLobApp + module ContentVersions + module Item + module Files + module Item + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + class MobileAppContentFileItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to call the commit method. + def commit() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSLobApp::ContentVersions::Item::Files::Item::Commit::CommitRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to call the renewUpload method. + def renew_upload() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSLobApp::ContentVersions::Item::Files::Item::RenewUpload::RenewUploadRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property files for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property files in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property files for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property files in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_content_file_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppContentFileItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of files for this app content version. + class MobileAppContentFileItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar_view/item/calendar/calendar.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/renew_upload/renew_upload.rb similarity index 100% rename from lib/me/calendar/calendar_view/item/calendar/calendar.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/renew_upload/renew_upload.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb new file mode 100644 index 0000000000..c9c4efabe8 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb @@ -0,0 +1,86 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_mac_o_s_lob_app' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './renew_upload' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSLobApp + module ContentVersions + module Item + module Files + module Item + module RenewUpload + ## + # Provides operations to call the renewUpload method. + class RenewUploadRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new RenewUploadRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload") + end + ## + ## Renews the SAS URI for an application file upload. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(request_configuration=nil) + request_info = self.to_post_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Renews the SAS URI for an application file upload. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a renew_upload_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RenewUploadRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar_view/item/instances/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/item.rb similarity index 100% rename from lib/me/calendar/calendar_view/item/instances/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/mobile_app_content_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/mobile_app_content_item_request_builder.rb new file mode 100644 index 0000000000..5d60a5a5bf --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/content_versions/item/mobile_app_content_item_request_builder.rb @@ -0,0 +1,184 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_content' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_mac_o_s_lob_app' +require_relative '../content_versions' +require_relative './contained_apps/contained_apps_request_builder' +require_relative './files/files_request_builder' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSLobApp + module ContentVersions + module Item + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + class MobileAppContentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + def contained_apps() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSLobApp::ContentVersions::Item::ContainedApps::ContainedAppsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + def files() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSLobApp::ContentVersions::Item::Files::FilesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp/contentVersions/{mobileAppContent%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property contentVersions for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property contentVersions in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property contentVersions for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property contentVersions in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_content_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppContentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of content versions for this app. + class MobileAppContentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar_view/item/dismiss_reminder/dismiss_reminder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/graph_mac_o_s_lob_app.rb similarity index 100% rename from lib/me/calendar/calendar_view/item/dismiss_reminder/dismiss_reminder.rb rename to lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/graph_mac_o_s_lob_app.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/graph_mac_o_s_lob_app_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/graph_mac_o_s_lob_app_request_builder.rb new file mode 100644 index 0000000000..8587e5491a --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_mac_o_s_lob_app/graph_mac_o_s_lob_app_request_builder.rb @@ -0,0 +1,119 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/mac_o_s_lob_app' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../item' +require_relative './assignments/assignments_request_builder' +require_relative './categories/categories_request_builder' +require_relative './content_versions/content_versions_request_builder' +require_relative './graph_mac_o_s_lob_app' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMacOSLobApp + ## + # Casts the previous resource to macOSLobApp. + class GraphMacOSLobAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + def assignments() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSLobApp::Assignments::AssignmentsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + def categories() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSLobApp::Categories::CategoriesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + def content_versions() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSLobApp::ContentVersions::ContentVersionsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphMacOSLobAppRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.macOSLobApp{?%24expand,%24select}") + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.macOSLobApp + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mac_o_s_lob_app + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MacOSLobApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.macOSLobApp + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_mac_o_s_lob_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphMacOSLobAppRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the item of type microsoft.graph.mobileApp as microsoft.graph.macOSLobApp + class GraphMacOSLobAppRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar_view/item/extensions/extensions.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/assignments.rb similarity index 100% rename from lib/me/calendar/calendar_view/item/extensions/extensions.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/assignments.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/assignments_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/assignments_request_builder.rb new file mode 100644 index 0000000000..c8e324582b --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/assignments_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_assignment' +require_relative '../../../../../models/mobile_app_assignment_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_managed_android_lob_app' +require_relative './assignments' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_assignment_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedAndroidLobApp + module Assignments + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class AssignmentsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedAndroidLobApp::Assignments::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_assignment_id The unique identifier of mobileAppAssignment + ## @return a mobile_app_assignment_item_request_builder + ## + def by_mobile_app_assignment_id(mobile_app_assignment_id) + raise StandardError, 'mobile_app_assignment_id cannot be null' if mobile_app_assignment_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedAndroidLobApp::Assignments::Item::MobileAppAssignmentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new AssignmentsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class AssignmentsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/calendar_view/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/count/count.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/calendar_view/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/count/count_request_builder.rb new file mode 100644 index 0000000000..1daf9cf4a2 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_managed_android_lob_app' +require_relative '../assignments' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedAndroidLobApp + module Assignments + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/assignments/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar_view/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/item/item.rb similarity index 100% rename from lib/me/calendar/calendar_view/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/item/mobile_app_assignment_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/item/mobile_app_assignment_item_request_builder.rb new file mode 100644 index 0000000000..1c9aa9c399 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/assignments/item/mobile_app_assignment_item_request_builder.rb @@ -0,0 +1,172 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_assignment' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_managed_android_lob_app' +require_relative '../assignments' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedAndroidLobApp + module Assignments + module Item + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class MobileAppAssignmentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/assignments/{mobileAppAssignment%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class MobileAppAssignmentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar_view/item/instances/instances.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/categories.rb similarity index 100% rename from lib/me/calendar/calendar_view/item/instances/instances.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/categories.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/categories_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/categories_request_builder.rb new file mode 100644 index 0000000000..459a6de4d4 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/categories_request_builder.rb @@ -0,0 +1,152 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_category_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_managed_android_lob_app' +require_relative './categories' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_category_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedAndroidLobApp + module Categories + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class CategoriesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedAndroidLobApp::Categories::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_category_id The unique identifier of mobileAppCategory + ## @return a mobile_app_category_item_request_builder + ## + def by_mobile_app_category_id(mobile_app_category_id) + raise StandardError, 'mobile_app_category_id cannot be null' if mobile_app_category_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedAndroidLobApp::Categories::Item::MobileAppCategoryItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new CategoriesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/categories{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategoryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a categories_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CategoriesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class CategoriesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/calendar_view/item/attachments/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/count/count.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/calendar_view/item/attachments/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/count/count_request_builder.rb new file mode 100644 index 0000000000..f766e38873 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_managed_android_lob_app' +require_relative '../categories' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedAndroidLobApp + module Categories + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/categories/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/events/item/attachments/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/item/item.rb similarity index 100% rename from lib/me/calendar/events/item/attachments/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/item/mobile_app_category_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/item/mobile_app_category_item_request_builder.rb new file mode 100644 index 0000000000..76e0961745 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/categories/item/mobile_app_category_item_request_builder.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_category' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_managed_android_lob_app' +require_relative '../categories' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedAndroidLobApp + module Categories + module Item + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class MobileAppCategoryItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/categories/{mobileAppCategory%2Did}{?%24expand,%24select}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategory.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_category_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppCategoryItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class MobileAppCategoryItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar_view/item/instances/item/attachments/attachments.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/content_versions.rb similarity index 100% rename from lib/me/calendar/calendar_view/item/instances/item/attachments/attachments.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/content_versions.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/content_versions_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/content_versions_request_builder.rb new file mode 100644 index 0000000000..11f130d3d7 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/content_versions_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_content' +require_relative '../../../../../models/mobile_app_content_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_managed_android_lob_app' +require_relative './content_versions' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_content_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedAndroidLobApp + module ContentVersions + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + class ContentVersionsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedAndroidLobApp::ContentVersions::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + ## @param mobile_app_content_id The unique identifier of mobileAppContent + ## @return a mobile_app_content_item_request_builder + ## + def by_mobile_app_content_id(mobile_app_content_id) + raise StandardError, 'mobile_app_content_id cannot be null' if mobile_app_content_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppContent%2Did"] = mobile_app_content_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedAndroidLobApp::ContentVersions::Item::MobileAppContentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new ContentVersionsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to contentVersions for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to contentVersions for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a content_versions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContentVersionsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of content versions for this app. + class ContentVersionsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/calendar_view/item/extensions/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/count/count.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/calendar_view/item/extensions/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/count/count_request_builder.rb new file mode 100644 index 0000000000..ec8ba7dbf4 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_managed_android_lob_app' +require_relative '../content_versions' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedAndroidLobApp + module ContentVersions + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar_view/item/instances/item/calendar/calendar.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/contained_apps.rb similarity index 100% rename from lib/me/calendar/calendar_view/item/instances/item/calendar/calendar.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/contained_apps.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.rb new file mode 100644 index 0000000000..6f6c00803c --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.rb @@ -0,0 +1,194 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/mobile_contained_app' +require_relative '../../../../../../../models/mobile_contained_app_collection_response' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../device_app_management' +require_relative '../../../../../mobile_apps' +require_relative '../../../../item' +require_relative '../../../graph_managed_android_lob_app' +require_relative '../../content_versions' +require_relative '../item' +require_relative './contained_apps' +require_relative './count/count_request_builder' +require_relative './item/mobile_contained_app_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedAndroidLobApp + module ContentVersions + module Item + module ContainedApps + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + class ContainedAppsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedAndroidLobApp::ContentVersions::Item::ContainedApps::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + ## @param mobile_contained_app_id The unique identifier of mobileContainedApp + ## @return a mobile_contained_app_item_request_builder + ## + def by_mobile_contained_app_id(mobile_contained_app_id) + raise StandardError, 'mobile_contained_app_id cannot be null' if mobile_contained_app_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileContainedApp%2Did"] = mobile_contained_app_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedAndroidLobApp::ContentVersions::Item::ContainedApps::Item::MobileContainedAppItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new ContainedAppsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to containedApps for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to containedApps for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a contained_apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContainedAppsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of contained apps in a MobileLobApp acting as a package. + class ContainedAppsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/calendar_view/item/instances/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/count/count.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/calendar_view/item/instances/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/count/count_request_builder.rb new file mode 100644 index 0000000000..a5e36419ca --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/count/count_request_builder.rb @@ -0,0 +1,112 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_managed_android_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../contained_apps' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedAndroidLobApp + module ContentVersions + module Item + module ContainedApps + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/events/item/extensions/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/item/item.rb similarity index 100% rename from lib/me/calendar/events/item/extensions/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb new file mode 100644 index 0000000000..61cb31cb8b --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb @@ -0,0 +1,178 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/mobile_contained_app' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_managed_android_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../contained_apps' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedAndroidLobApp + module ContentVersions + module Item + module ContainedApps + module Item + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + class MobileContainedAppItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property containedApps for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property containedApps in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property containedApps for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property containedApps in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_contained_app_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileContainedAppItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of contained apps in a MobileLobApp acting as a package. + class MobileContainedAppItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/calendar_view/item/instances/item/attachments/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/count/count.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/calendar_view/item/instances/item/attachments/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/count/count_request_builder.rb new file mode 100644 index 0000000000..7ad469d85f --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/count/count_request_builder.rb @@ -0,0 +1,112 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_managed_android_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../files' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedAndroidLobApp + module ContentVersions + module Item + module Files + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/files/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/files.rb similarity index 100% rename from lib/me/calendar/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/files.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/files_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/files_request_builder.rb new file mode 100644 index 0000000000..c7d047634a --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/files_request_builder.rb @@ -0,0 +1,194 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/mobile_app_content_file' +require_relative '../../../../../../../models/mobile_app_content_file_collection_response' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../device_app_management' +require_relative '../../../../../mobile_apps' +require_relative '../../../../item' +require_relative '../../../graph_managed_android_lob_app' +require_relative '../../content_versions' +require_relative '../item' +require_relative './count/count_request_builder' +require_relative './files' +require_relative './item/mobile_app_content_file_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedAndroidLobApp + module ContentVersions + module Item + module Files + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + class FilesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedAndroidLobApp::ContentVersions::Item::Files::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + ## @param mobile_app_content_file_id The unique identifier of mobileAppContentFile + ## @return a mobile_app_content_file_item_request_builder + ## + def by_mobile_app_content_file_id(mobile_app_content_file_id) + raise StandardError, 'mobile_app_content_file_id cannot be null' if mobile_app_content_file_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppContentFile%2Did"] = mobile_app_content_file_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedAndroidLobApp::ContentVersions::Item::Files::Item::MobileAppContentFileItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new FilesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFileCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to files for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to files for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a files_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return FilesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of files for this app content version. + class FilesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/commit/commit.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/commit/commit.rb new file mode 100644 index 0000000000..b61410499d --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/commit/commit.rb @@ -0,0 +1 @@ +require_relative 'commit_post_request_body' diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/commit/commit_post_request_body.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/commit/commit_post_request_body.rb new file mode 100644 index 0000000000..dec2b3e626 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/commit/commit_post_request_body.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/file_encryption_info' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_managed_android_lob_app' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './commit' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedAndroidLobApp + module ContentVersions + module Item + module Files + module Item + module Commit + class CommitPostRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The fileEncryptionInfo property + @file_encryption_info + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new CommitPostRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a commit_post_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CommitPostRequestBody.new + end + ## + ## Gets the fileEncryptionInfo property value. The fileEncryptionInfo property + ## @return a file_encryption_info + ## + def file_encryption_info + return @file_encryption_info + end + ## + ## Sets the fileEncryptionInfo property value. The fileEncryptionInfo property + ## @param value Value to set for the fileEncryptionInfo property. + ## @return a void + ## + def file_encryption_info=(value) + @file_encryption_info = value + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "fileEncryptionInfo" => lambda {|n| @file_encryption_info = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::FileEncryptionInfo.create_from_discriminator_value(pn) }) }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_object_value("fileEncryptionInfo", @file_encryption_info) + writer.write_additional_data(@additional_data) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/commit/commit_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/commit/commit_request_builder.rb new file mode 100644 index 0000000000..b67f4cc6cb --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/commit/commit_request_builder.rb @@ -0,0 +1,91 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_managed_android_lob_app' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './commit' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedAndroidLobApp + module ContentVersions + module Item + module Files + module Item + module Commit + ## + # Provides operations to call the commit method. + class CommitRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CommitRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit") + end + ## + ## Commits a file of a given app. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Commits a file of a given app. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a commit_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CommitRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/events/item/instances/item/attachments/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/item.rb similarity index 100% rename from lib/me/calendar/events/item/instances/item/attachments/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb new file mode 100644 index 0000000000..a313a7d51e --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb @@ -0,0 +1,190 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/mobile_app_content_file' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_managed_android_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../files' +require_relative './commit/commit_request_builder' +require_relative './item' +require_relative './renew_upload/renew_upload_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedAndroidLobApp + module ContentVersions + module Item + module Files + module Item + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + class MobileAppContentFileItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to call the commit method. + def commit() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedAndroidLobApp::ContentVersions::Item::Files::Item::Commit::CommitRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to call the renewUpload method. + def renew_upload() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedAndroidLobApp::ContentVersions::Item::Files::Item::RenewUpload::RenewUploadRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property files for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property files in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property files for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property files in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_content_file_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppContentFileItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of files for this app content version. + class MobileAppContentFileItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/calendar_view/item/instances/item/extensions/extensions.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/renew_upload/renew_upload.rb similarity index 100% rename from lib/me/calendar/calendar_view/item/instances/item/extensions/extensions.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/renew_upload/renew_upload.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb new file mode 100644 index 0000000000..817f8925c1 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb @@ -0,0 +1,86 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_managed_android_lob_app' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './renew_upload' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedAndroidLobApp + module ContentVersions + module Item + module Files + module Item + module RenewUpload + ## + # Provides operations to call the renewUpload method. + class RenewUploadRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new RenewUploadRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload") + end + ## + ## Renews the SAS URI for an application file upload. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(request_configuration=nil) + request_info = self.to_post_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Renews the SAS URI for an application file upload. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a renew_upload_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RenewUploadRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/events/item/instances/item/extensions/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/item.rb similarity index 100% rename from lib/me/calendar/events/item/instances/item/extensions/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/mobile_app_content_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/mobile_app_content_item_request_builder.rb new file mode 100644 index 0000000000..a8c484330d --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/content_versions/item/mobile_app_content_item_request_builder.rb @@ -0,0 +1,184 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_content' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_managed_android_lob_app' +require_relative '../content_versions' +require_relative './contained_apps/contained_apps_request_builder' +require_relative './files/files_request_builder' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedAndroidLobApp + module ContentVersions + module Item + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + class MobileAppContentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + def contained_apps() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedAndroidLobApp::ContentVersions::Item::ContainedApps::ContainedAppsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + def files() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedAndroidLobApp::ContentVersions::Item::Files::FilesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp/contentVersions/{mobileAppContent%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property contentVersions for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property contentVersions in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property contentVersions for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property contentVersions in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_content_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppContentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of content versions for this app. + class MobileAppContentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/events/events.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/graph_managed_android_lob_app.rb similarity index 100% rename from lib/me/calendar/events/events.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/graph_managed_android_lob_app.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/graph_managed_android_lob_app_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/graph_managed_android_lob_app_request_builder.rb new file mode 100644 index 0000000000..98a671f752 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_android_lob_app/graph_managed_android_lob_app_request_builder.rb @@ -0,0 +1,119 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/managed_android_lob_app' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../item' +require_relative './assignments/assignments_request_builder' +require_relative './categories/categories_request_builder' +require_relative './content_versions/content_versions_request_builder' +require_relative './graph_managed_android_lob_app' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedAndroidLobApp + ## + # Casts the previous resource to managedAndroidLobApp. + class GraphManagedAndroidLobAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + def assignments() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedAndroidLobApp::Assignments::AssignmentsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + def categories() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedAndroidLobApp::Categories::CategoriesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + def content_versions() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedAndroidLobApp::ContentVersions::ContentVersionsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphManagedAndroidLobAppRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedAndroidLobApp{?%24expand,%24select}") + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.managedAndroidLobApp + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of managed_android_lob_app + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAndroidLobApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.managedAndroidLobApp + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_managed_android_lob_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphManagedAndroidLobAppRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the item of type microsoft.graph.mobileApp as microsoft.graph.managedAndroidLobApp + class GraphManagedAndroidLobAppRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/events/item/attachments/attachments.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/assignments.rb similarity index 100% rename from lib/me/calendar/events/item/attachments/attachments.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/assignments.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/assignments_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/assignments_request_builder.rb new file mode 100644 index 0000000000..1b18024890 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/assignments_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_assignment' +require_relative '../../../../../models/mobile_app_assignment_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_managed_i_o_s_lob_app' +require_relative './assignments' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_assignment_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedIOSLobApp + module Assignments + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class AssignmentsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedIOSLobApp::Assignments::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_assignment_id The unique identifier of mobileAppAssignment + ## @return a mobile_app_assignment_item_request_builder + ## + def by_mobile_app_assignment_id(mobile_app_assignment_id) + raise StandardError, 'mobile_app_assignment_id cannot be null' if mobile_app_assignment_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedIOSLobApp::Assignments::Item::MobileAppAssignmentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new AssignmentsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class AssignmentsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/calendar_view/item/instances/item/extensions/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/count/count.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/calendar_view/item/instances/item/extensions/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/count/count_request_builder.rb new file mode 100644 index 0000000000..02fc6787bc --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_managed_i_o_s_lob_app' +require_relative '../assignments' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedIOSLobApp + module Assignments + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/assignments/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/events/item/instances/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/item/item.rb similarity index 100% rename from lib/me/calendar/events/item/instances/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/item/mobile_app_assignment_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/item/mobile_app_assignment_item_request_builder.rb new file mode 100644 index 0000000000..299d12d92b --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/assignments/item/mobile_app_assignment_item_request_builder.rb @@ -0,0 +1,172 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_assignment' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_managed_i_o_s_lob_app' +require_relative '../assignments' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedIOSLobApp + module Assignments + module Item + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class MobileAppAssignmentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/assignments/{mobileAppAssignment%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class MobileAppAssignmentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/events/item/calendar/calendar.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/categories.rb similarity index 100% rename from lib/me/calendar/events/item/calendar/calendar.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/categories.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/categories_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/categories_request_builder.rb new file mode 100644 index 0000000000..44a3037fbe --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/categories_request_builder.rb @@ -0,0 +1,152 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_category_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_managed_i_o_s_lob_app' +require_relative './categories' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_category_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedIOSLobApp + module Categories + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class CategoriesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedIOSLobApp::Categories::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_category_id The unique identifier of mobileAppCategory + ## @return a mobile_app_category_item_request_builder + ## + def by_mobile_app_category_id(mobile_app_category_id) + raise StandardError, 'mobile_app_category_id cannot be null' if mobile_app_category_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedIOSLobApp::Categories::Item::MobileAppCategoryItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new CategoriesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/categories{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategoryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a categories_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CategoriesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class CategoriesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/events/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/count/count.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/events/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/count/count_request_builder.rb new file mode 100644 index 0000000000..9fb95dd1ca --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_managed_i_o_s_lob_app' +require_relative '../categories' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedIOSLobApp + module Categories + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/categories/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/events/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/item/item.rb similarity index 100% rename from lib/me/calendar/events/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/item/mobile_app_category_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/item/mobile_app_category_item_request_builder.rb new file mode 100644 index 0000000000..c39db68a5c --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/categories/item/mobile_app_category_item_request_builder.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_category' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_managed_i_o_s_lob_app' +require_relative '../categories' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedIOSLobApp + module Categories + module Item + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class MobileAppCategoryItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/categories/{mobileAppCategory%2Did}{?%24expand,%24select}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategory.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_category_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppCategoryItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class MobileAppCategoryItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/events/item/dismiss_reminder/dismiss_reminder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/content_versions.rb similarity index 100% rename from lib/me/calendar/events/item/dismiss_reminder/dismiss_reminder.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/content_versions.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/content_versions_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/content_versions_request_builder.rb new file mode 100644 index 0000000000..61f264804e --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/content_versions_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_content' +require_relative '../../../../../models/mobile_app_content_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_managed_i_o_s_lob_app' +require_relative './content_versions' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_content_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedIOSLobApp + module ContentVersions + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + class ContentVersionsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedIOSLobApp::ContentVersions::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + ## @param mobile_app_content_id The unique identifier of mobileAppContent + ## @return a mobile_app_content_item_request_builder + ## + def by_mobile_app_content_id(mobile_app_content_id) + raise StandardError, 'mobile_app_content_id cannot be null' if mobile_app_content_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppContent%2Did"] = mobile_app_content_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedIOSLobApp::ContentVersions::Item::MobileAppContentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new ContentVersionsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to contentVersions for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to contentVersions for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a content_versions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContentVersionsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of content versions for this app. + class ContentVersionsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/events/item/attachments/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/count/count.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/events/item/attachments/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/count/count_request_builder.rb new file mode 100644 index 0000000000..88b2ac4ef6 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_managed_i_o_s_lob_app' +require_relative '../content_versions' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedIOSLobApp + module ContentVersions + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/events/item/extensions/extensions.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/contained_apps.rb similarity index 100% rename from lib/me/calendar/events/item/extensions/extensions.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/contained_apps.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.rb new file mode 100644 index 0000000000..7be12665d8 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.rb @@ -0,0 +1,194 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/mobile_contained_app' +require_relative '../../../../../../../models/mobile_contained_app_collection_response' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../device_app_management' +require_relative '../../../../../mobile_apps' +require_relative '../../../../item' +require_relative '../../../graph_managed_i_o_s_lob_app' +require_relative '../../content_versions' +require_relative '../item' +require_relative './contained_apps' +require_relative './count/count_request_builder' +require_relative './item/mobile_contained_app_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedIOSLobApp + module ContentVersions + module Item + module ContainedApps + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + class ContainedAppsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedIOSLobApp::ContentVersions::Item::ContainedApps::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + ## @param mobile_contained_app_id The unique identifier of mobileContainedApp + ## @return a mobile_contained_app_item_request_builder + ## + def by_mobile_contained_app_id(mobile_contained_app_id) + raise StandardError, 'mobile_contained_app_id cannot be null' if mobile_contained_app_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileContainedApp%2Did"] = mobile_contained_app_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedIOSLobApp::ContentVersions::Item::ContainedApps::Item::MobileContainedAppItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new ContainedAppsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to containedApps for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to containedApps for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a contained_apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContainedAppsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of contained apps in a MobileLobApp acting as a package. + class ContainedAppsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/events/item/extensions/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/count/count.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/events/item/extensions/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/count/count_request_builder.rb new file mode 100644 index 0000000000..a9d022bb22 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/count/count_request_builder.rb @@ -0,0 +1,112 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_managed_i_o_s_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../contained_apps' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedIOSLobApp + module ContentVersions + module Item + module ContainedApps + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/calendar_permissions/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/item/item.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/calendar_permissions/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb new file mode 100644 index 0000000000..da9527e703 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb @@ -0,0 +1,178 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/mobile_contained_app' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_managed_i_o_s_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../contained_apps' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedIOSLobApp + module ContentVersions + module Item + module ContainedApps + module Item + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + class MobileContainedAppItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property containedApps for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property containedApps in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property containedApps for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property containedApps in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_contained_app_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileContainedAppItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of contained apps in a MobileLobApp acting as a package. + class MobileContainedAppItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/events/item/instances/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/count/count.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/events/item/instances/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/count/count_request_builder.rb new file mode 100644 index 0000000000..b35b1bdfba --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/count/count_request_builder.rb @@ -0,0 +1,112 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_managed_i_o_s_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../files' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedIOSLobApp + module ContentVersions + module Item + module Files + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/files/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/events/item/instances/instances.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/files.rb similarity index 100% rename from lib/me/calendar/events/item/instances/instances.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/files.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/files_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/files_request_builder.rb new file mode 100644 index 0000000000..55c135658e --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/files_request_builder.rb @@ -0,0 +1,194 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/mobile_app_content_file' +require_relative '../../../../../../../models/mobile_app_content_file_collection_response' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../device_app_management' +require_relative '../../../../../mobile_apps' +require_relative '../../../../item' +require_relative '../../../graph_managed_i_o_s_lob_app' +require_relative '../../content_versions' +require_relative '../item' +require_relative './count/count_request_builder' +require_relative './files' +require_relative './item/mobile_app_content_file_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedIOSLobApp + module ContentVersions + module Item + module Files + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + class FilesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedIOSLobApp::ContentVersions::Item::Files::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + ## @param mobile_app_content_file_id The unique identifier of mobileAppContentFile + ## @return a mobile_app_content_file_item_request_builder + ## + def by_mobile_app_content_file_id(mobile_app_content_file_id) + raise StandardError, 'mobile_app_content_file_id cannot be null' if mobile_app_content_file_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppContentFile%2Did"] = mobile_app_content_file_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedIOSLobApp::ContentVersions::Item::Files::Item::MobileAppContentFileItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new FilesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFileCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to files for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to files for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a files_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return FilesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of files for this app content version. + class FilesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/commit/commit.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/commit/commit.rb new file mode 100644 index 0000000000..b61410499d --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/commit/commit.rb @@ -0,0 +1 @@ +require_relative 'commit_post_request_body' diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/commit/commit_post_request_body.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/commit/commit_post_request_body.rb new file mode 100644 index 0000000000..c8af65fbae --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/commit/commit_post_request_body.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/file_encryption_info' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_managed_i_o_s_lob_app' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './commit' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedIOSLobApp + module ContentVersions + module Item + module Files + module Item + module Commit + class CommitPostRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The fileEncryptionInfo property + @file_encryption_info + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new CommitPostRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a commit_post_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CommitPostRequestBody.new + end + ## + ## Gets the fileEncryptionInfo property value. The fileEncryptionInfo property + ## @return a file_encryption_info + ## + def file_encryption_info + return @file_encryption_info + end + ## + ## Sets the fileEncryptionInfo property value. The fileEncryptionInfo property + ## @param value Value to set for the fileEncryptionInfo property. + ## @return a void + ## + def file_encryption_info=(value) + @file_encryption_info = value + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "fileEncryptionInfo" => lambda {|n| @file_encryption_info = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::FileEncryptionInfo.create_from_discriminator_value(pn) }) }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_object_value("fileEncryptionInfo", @file_encryption_info) + writer.write_additional_data(@additional_data) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/commit/commit_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/commit/commit_request_builder.rb new file mode 100644 index 0000000000..43d2b80566 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/commit/commit_request_builder.rb @@ -0,0 +1,91 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_managed_i_o_s_lob_app' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './commit' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedIOSLobApp + module ContentVersions + module Item + module Files + module Item + module Commit + ## + # Provides operations to call the commit method. + class CommitRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CommitRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit") + end + ## + ## Commits a file of a given app. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Commits a file of a given app. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a commit_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CommitRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/calendar_view/item/attachments/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/item.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/calendar_view/item/attachments/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb new file mode 100644 index 0000000000..d5529940b2 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb @@ -0,0 +1,190 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/mobile_app_content_file' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_managed_i_o_s_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../files' +require_relative './commit/commit_request_builder' +require_relative './item' +require_relative './renew_upload/renew_upload_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedIOSLobApp + module ContentVersions + module Item + module Files + module Item + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + class MobileAppContentFileItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to call the commit method. + def commit() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedIOSLobApp::ContentVersions::Item::Files::Item::Commit::CommitRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to call the renewUpload method. + def renew_upload() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedIOSLobApp::ContentVersions::Item::Files::Item::RenewUpload::RenewUploadRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property files for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property files in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property files for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property files in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_content_file_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppContentFileItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of files for this app content version. + class MobileAppContentFileItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/events/item/instances/item/attachments/attachments.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/renew_upload/renew_upload.rb similarity index 100% rename from lib/me/calendar/events/item/instances/item/attachments/attachments.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/renew_upload/renew_upload.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb new file mode 100644 index 0000000000..5d70a1f911 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb @@ -0,0 +1,86 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_managed_i_o_s_lob_app' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './renew_upload' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedIOSLobApp + module ContentVersions + module Item + module Files + module Item + module RenewUpload + ## + # Provides operations to call the renewUpload method. + class RenewUploadRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new RenewUploadRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload") + end + ## + ## Renews the SAS URI for an application file upload. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(request_configuration=nil) + request_info = self.to_post_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Renews the SAS URI for an application file upload. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a renew_upload_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RenewUploadRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/calendar_view/item/extensions/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/item.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/calendar_view/item/extensions/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/mobile_app_content_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/mobile_app_content_item_request_builder.rb new file mode 100644 index 0000000000..ff405a402d --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/content_versions/item/mobile_app_content_item_request_builder.rb @@ -0,0 +1,184 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_content' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_managed_i_o_s_lob_app' +require_relative '../content_versions' +require_relative './contained_apps/contained_apps_request_builder' +require_relative './files/files_request_builder' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedIOSLobApp + module ContentVersions + module Item + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + class MobileAppContentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + def contained_apps() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedIOSLobApp::ContentVersions::Item::ContainedApps::ContainedAppsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + def files() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedIOSLobApp::ContentVersions::Item::Files::FilesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp/contentVersions/{mobileAppContent%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property contentVersions for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property contentVersions in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property contentVersions for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property contentVersions in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_content_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppContentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of content versions for this app. + class MobileAppContentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/events/item/instances/item/calendar/calendar.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/graph_managed_i_o_s_lob_app.rb similarity index 100% rename from lib/me/calendar/events/item/instances/item/calendar/calendar.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/graph_managed_i_o_s_lob_app.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/graph_managed_i_o_s_lob_app_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/graph_managed_i_o_s_lob_app_request_builder.rb new file mode 100644 index 0000000000..832135de84 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_i_o_s_lob_app/graph_managed_i_o_s_lob_app_request_builder.rb @@ -0,0 +1,119 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/managed_i_o_s_lob_app' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../item' +require_relative './assignments/assignments_request_builder' +require_relative './categories/categories_request_builder' +require_relative './content_versions/content_versions_request_builder' +require_relative './graph_managed_i_o_s_lob_app' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedIOSLobApp + ## + # Casts the previous resource to managedIOSLobApp. + class GraphManagedIOSLobAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + def assignments() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedIOSLobApp::Assignments::AssignmentsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + def categories() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedIOSLobApp::Categories::CategoriesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + def content_versions() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedIOSLobApp::ContentVersions::ContentVersionsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphManagedIOSLobAppRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedIOSLobApp{?%24expand,%24select}") + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.managedIOSLobApp + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of managed_i_o_s_lob_app + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedIOSLobApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.managedIOSLobApp + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_managed_i_o_s_lob_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphManagedIOSLobAppRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the item of type microsoft.graph.mobileApp as microsoft.graph.managedIOSLobApp + class GraphManagedIOSLobAppRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/events/item/instances/item/dismiss_reminder/dismiss_reminder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/assignments.rb similarity index 100% rename from lib/me/calendar/events/item/instances/item/dismiss_reminder/dismiss_reminder.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/assignments.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/assignments_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/assignments_request_builder.rb new file mode 100644 index 0000000000..e9785aee06 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/assignments_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_assignment' +require_relative '../../../../../models/mobile_app_assignment_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_managed_mobile_lob_app' +require_relative './assignments' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_assignment_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedMobileLobApp + module Assignments + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class AssignmentsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedMobileLobApp::Assignments::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_assignment_id The unique identifier of mobileAppAssignment + ## @return a mobile_app_assignment_item_request_builder + ## + def by_mobile_app_assignment_id(mobile_app_assignment_id) + raise StandardError, 'mobile_app_assignment_id cannot be null' if mobile_app_assignment_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedMobileLobApp::Assignments::Item::MobileAppAssignmentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new AssignmentsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class AssignmentsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/events/item/instances/item/attachments/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/count/count.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/events/item/instances/item/attachments/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/count/count_request_builder.rb new file mode 100644 index 0000000000..95564b4c2d --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_managed_mobile_lob_app' +require_relative '../assignments' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedMobileLobApp + module Assignments + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/assignments/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/calendar_view/item/instances/item/attachments/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/item/item.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/calendar_view/item/instances/item/attachments/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/item/mobile_app_assignment_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/item/mobile_app_assignment_item_request_builder.rb new file mode 100644 index 0000000000..084c7d5678 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/assignments/item/mobile_app_assignment_item_request_builder.rb @@ -0,0 +1,172 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_assignment' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_managed_mobile_lob_app' +require_relative '../assignments' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedMobileLobApp + module Assignments + module Item + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class MobileAppAssignmentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/assignments/{mobileAppAssignment%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class MobileAppAssignmentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar/events/item/instances/item/extensions/extensions.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/categories.rb similarity index 100% rename from lib/me/calendar/events/item/instances/item/extensions/extensions.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/categories.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/categories_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/categories_request_builder.rb new file mode 100644 index 0000000000..4181fca509 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/categories_request_builder.rb @@ -0,0 +1,152 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_category_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_managed_mobile_lob_app' +require_relative './categories' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_category_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedMobileLobApp + module Categories + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class CategoriesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedMobileLobApp::Categories::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_category_id The unique identifier of mobileAppCategory + ## @return a mobile_app_category_item_request_builder + ## + def by_mobile_app_category_id(mobile_app_category_id) + raise StandardError, 'mobile_app_category_id cannot be null' if mobile_app_category_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedMobileLobApp::Categories::Item::MobileAppCategoryItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new CategoriesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/categories{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategoryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a categories_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CategoriesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class CategoriesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/events/item/instances/item/extensions/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/count/count.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/events/item/instances/item/extensions/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/count/count_request_builder.rb new file mode 100644 index 0000000000..ea740bc903 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_managed_mobile_lob_app' +require_relative '../categories' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedMobileLobApp + module Categories + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/categories/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/calendar_view/item/instances/item/extensions/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/item/item.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/calendar_view/item/instances/item/extensions/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/item/mobile_app_category_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/item/mobile_app_category_item_request_builder.rb new file mode 100644 index 0000000000..1f72afd9e4 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/categories/item/mobile_app_category_item_request_builder.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_category' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_managed_mobile_lob_app' +require_relative '../categories' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedMobileLobApp + module Categories + module Item + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class MobileAppCategoryItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/categories/{mobileAppCategory%2Did}{?%24expand,%24select}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategory.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_category_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppCategoryItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class MobileAppCategoryItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/calendar_groups.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/content_versions.rb similarity index 100% rename from lib/me/calendar_groups/calendar_groups.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/content_versions.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/content_versions_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/content_versions_request_builder.rb new file mode 100644 index 0000000000..1b1d10de00 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/content_versions_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_content' +require_relative '../../../../../models/mobile_app_content_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_managed_mobile_lob_app' +require_relative './content_versions' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_content_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedMobileLobApp + module ContentVersions + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + class ContentVersionsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedMobileLobApp::ContentVersions::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + ## @param mobile_app_content_id The unique identifier of mobileAppContent + ## @return a mobile_app_content_item_request_builder + ## + def by_mobile_app_content_id(mobile_app_content_id) + raise StandardError, 'mobile_app_content_id cannot be null' if mobile_app_content_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppContent%2Did"] = mobile_app_content_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedMobileLobApp::ContentVersions::Item::MobileAppContentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new ContentVersionsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to contentVersions for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to contentVersions for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a content_versions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContentVersionsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of content versions for this app. + class ContentVersionsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_view/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/count/count.rb similarity index 100% rename from lib/me/calendar_view/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/count/count_request_builder.rb new file mode 100644 index 0000000000..f519a2d071 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_managed_mobile_lob_app' +require_relative '../content_versions' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedMobileLobApp + module ContentVersions + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/calendars.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/contained_apps.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/calendars.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/contained_apps.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.rb new file mode 100644 index 0000000000..483e1a38f7 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.rb @@ -0,0 +1,194 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/mobile_contained_app' +require_relative '../../../../../../../models/mobile_contained_app_collection_response' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../device_app_management' +require_relative '../../../../../mobile_apps' +require_relative '../../../../item' +require_relative '../../../graph_managed_mobile_lob_app' +require_relative '../../content_versions' +require_relative '../item' +require_relative './contained_apps' +require_relative './count/count_request_builder' +require_relative './item/mobile_contained_app_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedMobileLobApp + module ContentVersions + module Item + module ContainedApps + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + class ContainedAppsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedMobileLobApp::ContentVersions::Item::ContainedApps::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + ## @param mobile_contained_app_id The unique identifier of mobileContainedApp + ## @return a mobile_contained_app_item_request_builder + ## + def by_mobile_contained_app_id(mobile_contained_app_id) + raise StandardError, 'mobile_contained_app_id cannot be null' if mobile_contained_app_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileContainedApp%2Did"] = mobile_contained_app_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedMobileLobApp::ContentVersions::Item::ContainedApps::Item::MobileContainedAppItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new ContainedAppsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to containedApps for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to containedApps for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a contained_apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContainedAppsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of contained apps in a MobileLobApp acting as a package. + class ContainedAppsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_view/item/attachments/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/count/count.rb similarity index 100% rename from lib/me/calendar_view/item/attachments/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/count/count_request_builder.rb new file mode 100644 index 0000000000..532299d1de --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/count/count_request_builder.rb @@ -0,0 +1,112 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_managed_mobile_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../contained_apps' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedMobileLobApp + module ContentVersions + module Item + module ContainedApps + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/calendar_view/item/instances/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/item/item.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/calendar_view/item/instances/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb new file mode 100644 index 0000000000..a61388fc09 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb @@ -0,0 +1,178 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/mobile_contained_app' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_managed_mobile_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../contained_apps' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedMobileLobApp + module ContentVersions + module Item + module ContainedApps + module Item + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + class MobileContainedAppItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property containedApps for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property containedApps in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property containedApps for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property containedApps in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_contained_app_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileContainedAppItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of contained apps in a MobileLobApp acting as a package. + class MobileContainedAppItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_view/item/extensions/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/count/count.rb similarity index 100% rename from lib/me/calendar_view/item/extensions/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/count/count_request_builder.rb new file mode 100644 index 0000000000..f422aea678 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/count/count_request_builder.rb @@ -0,0 +1,112 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_managed_mobile_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../files' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedMobileLobApp + module ContentVersions + module Item + module Files + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/files/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/calendar_permissions/calendar_permissions.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/files.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/calendar_permissions/calendar_permissions.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/files.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/files_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/files_request_builder.rb new file mode 100644 index 0000000000..8524dcd3c1 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/files_request_builder.rb @@ -0,0 +1,194 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/mobile_app_content_file' +require_relative '../../../../../../../models/mobile_app_content_file_collection_response' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../device_app_management' +require_relative '../../../../../mobile_apps' +require_relative '../../../../item' +require_relative '../../../graph_managed_mobile_lob_app' +require_relative '../../content_versions' +require_relative '../item' +require_relative './count/count_request_builder' +require_relative './files' +require_relative './item/mobile_app_content_file_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedMobileLobApp + module ContentVersions + module Item + module Files + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + class FilesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedMobileLobApp::ContentVersions::Item::Files::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + ## @param mobile_app_content_file_id The unique identifier of mobileAppContentFile + ## @return a mobile_app_content_file_item_request_builder + ## + def by_mobile_app_content_file_id(mobile_app_content_file_id) + raise StandardError, 'mobile_app_content_file_id cannot be null' if mobile_app_content_file_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppContentFile%2Did"] = mobile_app_content_file_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedMobileLobApp::ContentVersions::Item::Files::Item::MobileAppContentFileItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new FilesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/files{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFileCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to files for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to files for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a files_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return FilesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of files for this app content version. + class FilesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/commit/commit.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/commit/commit.rb new file mode 100644 index 0000000000..b61410499d --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/commit/commit.rb @@ -0,0 +1 @@ +require_relative 'commit_post_request_body' diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/commit/commit_post_request_body.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/commit/commit_post_request_body.rb new file mode 100644 index 0000000000..f0f3dd6fa0 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/commit/commit_post_request_body.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/file_encryption_info' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_managed_mobile_lob_app' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './commit' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedMobileLobApp + module ContentVersions + module Item + module Files + module Item + module Commit + class CommitPostRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The fileEncryptionInfo property + @file_encryption_info + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new CommitPostRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a commit_post_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CommitPostRequestBody.new + end + ## + ## Gets the fileEncryptionInfo property value. The fileEncryptionInfo property + ## @return a file_encryption_info + ## + def file_encryption_info + return @file_encryption_info + end + ## + ## Sets the fileEncryptionInfo property value. The fileEncryptionInfo property + ## @param value Value to set for the fileEncryptionInfo property. + ## @return a void + ## + def file_encryption_info=(value) + @file_encryption_info = value + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "fileEncryptionInfo" => lambda {|n| @file_encryption_info = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::FileEncryptionInfo.create_from_discriminator_value(pn) }) }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_object_value("fileEncryptionInfo", @file_encryption_info) + writer.write_additional_data(@additional_data) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/commit/commit_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/commit/commit_request_builder.rb new file mode 100644 index 0000000000..7bbd2ed85d --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/commit/commit_request_builder.rb @@ -0,0 +1,91 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_managed_mobile_lob_app' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './commit' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedMobileLobApp + module ContentVersions + module Item + module Files + module Item + module Commit + ## + # Provides operations to call the commit method. + class CommitRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CommitRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit") + end + ## + ## Commits a file of a given app. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Commits a file of a given app. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a commit_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CommitRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/calendar_view/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/item.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/calendar_view/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb new file mode 100644 index 0000000000..ba2fd101f4 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb @@ -0,0 +1,190 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/mobile_app_content_file' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_managed_mobile_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../files' +require_relative './commit/commit_request_builder' +require_relative './item' +require_relative './renew_upload/renew_upload_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedMobileLobApp + module ContentVersions + module Item + module Files + module Item + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + class MobileAppContentFileItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to call the commit method. + def commit() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedMobileLobApp::ContentVersions::Item::Files::Item::Commit::CommitRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to call the renewUpload method. + def renew_upload() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedMobileLobApp::ContentVersions::Item::Files::Item::RenewUpload::RenewUploadRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property files for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property files in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property files for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property files in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_content_file_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppContentFileItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of files for this app content version. + class MobileAppContentFileItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/calendar_view/calendar_view.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/renew_upload/renew_upload.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/calendar_view/calendar_view.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/renew_upload/renew_upload.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb new file mode 100644 index 0000000000..57bc391009 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb @@ -0,0 +1,86 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_managed_mobile_lob_app' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './renew_upload' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedMobileLobApp + module ContentVersions + module Item + module Files + module Item + module RenewUpload + ## + # Provides operations to call the renewUpload method. + class RenewUploadRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new RenewUploadRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload") + end + ## + ## Renews the SAS URI for an application file upload. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(request_configuration=nil) + request_info = self.to_post_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Renews the SAS URI for an application file upload. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a renew_upload_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RenewUploadRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/events/item/attachments/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/item.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/events/item/attachments/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/mobile_app_content_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/mobile_app_content_item_request_builder.rb new file mode 100644 index 0000000000..00c3da5d0a --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/content_versions/item/mobile_app_content_item_request_builder.rb @@ -0,0 +1,184 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_content' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_managed_mobile_lob_app' +require_relative '../content_versions' +require_relative './contained_apps/contained_apps_request_builder' +require_relative './files/files_request_builder' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphManagedMobileLobApp + module ContentVersions + module Item + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + class MobileAppContentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + def contained_apps() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedMobileLobApp::ContentVersions::Item::ContainedApps::ContainedAppsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + def files() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedMobileLobApp::ContentVersions::Item::Files::FilesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp/contentVersions/{mobileAppContent%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property contentVersions for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property contentVersions in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property contentVersions for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property contentVersions in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_content_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppContentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of content versions for this app. + class MobileAppContentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/graph_managed_mobile_lob_app_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/graph_managed_mobile_lob_app_request_builder.rb index 35cd13fce5..50df80f66d 100644 --- a/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/graph_managed_mobile_lob_app_request_builder.rb +++ b/lib/device_app_management/mobile_apps/item/graph_managed_mobile_lob_app/graph_managed_mobile_lob_app_request_builder.rb @@ -5,6 +5,9 @@ require_relative '../../../device_app_management' require_relative '../../mobile_apps' require_relative '../item' +require_relative './assignments/assignments_request_builder' +require_relative './categories/categories_request_builder' +require_relative './content_versions/content_versions_request_builder' require_relative './graph_managed_mobile_lob_app' module MicrosoftGraph @@ -16,6 +19,21 @@ module GraphManagedMobileLobApp # Casts the previous resource to managedMobileLobApp. class GraphManagedMobileLobAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + def assignments() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedMobileLobApp::Assignments::AssignmentsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + def categories() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedMobileLobApp::Categories::CategoriesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.managedMobileLobApp entity. + def content_versions() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedMobileLobApp::ContentVersions::ContentVersionsRequestBuilder.new(@path_parameters, @request_adapter) + end ## ## Instantiates a new GraphManagedMobileLobAppRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request @@ -23,7 +41,7 @@ class GraphManagedMobileLobAppRequestBuilder < MicrosoftKiotaAbstractions::BaseR ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.managedMobileLobApp{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.managedMobileLobApp @@ -35,8 +53,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedMobileLobApp.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -46,17 +63,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_managed_mobile_lob_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphManagedMobileLobAppRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.mobileApp as microsoft.graph.managedMobileLobApp diff --git a/lib/me/calendar_groups/item/calendars/item/calendar_view/item/attachments/attachments.rb b/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/assignments.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/calendar_view/item/attachments/attachments.rb rename to lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/assignments.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/assignments_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/assignments_request_builder.rb new file mode 100644 index 0000000000..bc811ddc77 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/assignments_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_assignment' +require_relative '../../../../../models/mobile_app_assignment_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_microsoft_store_for_business_app' +require_relative './assignments' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_assignment_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMicrosoftStoreForBusinessApp + module Assignments + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class AssignmentsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMicrosoftStoreForBusinessApp::Assignments::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_assignment_id The unique identifier of mobileAppAssignment + ## @return a mobile_app_assignment_item_request_builder + ## + def by_mobile_app_assignment_id(mobile_app_assignment_id) + raise StandardError, 'mobile_app_assignment_id cannot be null' if mobile_app_assignment_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMicrosoftStoreForBusinessApp::Assignments::Item::MobileAppAssignmentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new AssignmentsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class AssignmentsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_view/item/instances/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/count/count.rb similarity index 100% rename from lib/me/calendar_view/item/instances/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/count/count_request_builder.rb new file mode 100644 index 0000000000..5b646b4277 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_microsoft_store_for_business_app' +require_relative '../assignments' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMicrosoftStoreForBusinessApp + module Assignments + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/assignments/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/events/item/extensions/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/item/item.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/events/item/extensions/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/item/mobile_app_assignment_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/item/mobile_app_assignment_item_request_builder.rb new file mode 100644 index 0000000000..b566ef00b3 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/assignments/item/mobile_app_assignment_item_request_builder.rb @@ -0,0 +1,172 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_assignment' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_microsoft_store_for_business_app' +require_relative '../assignments' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMicrosoftStoreForBusinessApp + module Assignments + module Item + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class MobileAppAssignmentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/assignments/{mobileAppAssignment%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class MobileAppAssignmentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/calendar_view/item/calendar/calendar.rb b/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/categories.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/calendar_view/item/calendar/calendar.rb rename to lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/categories.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/categories_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/categories_request_builder.rb new file mode 100644 index 0000000000..aa6ed794c8 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/categories_request_builder.rb @@ -0,0 +1,152 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_category_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_microsoft_store_for_business_app' +require_relative './categories' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_category_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMicrosoftStoreForBusinessApp + module Categories + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class CategoriesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMicrosoftStoreForBusinessApp::Categories::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_category_id The unique identifier of mobileAppCategory + ## @return a mobile_app_category_item_request_builder + ## + def by_mobile_app_category_id(mobile_app_category_id) + raise StandardError, 'mobile_app_category_id cannot be null' if mobile_app_category_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMicrosoftStoreForBusinessApp::Categories::Item::MobileAppCategoryItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new CategoriesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/categories{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategoryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a categories_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CategoriesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class CategoriesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_view/item/instances/item/attachments/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/count/count.rb similarity index 100% rename from lib/me/calendar_view/item/instances/item/attachments/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/count/count_request_builder.rb new file mode 100644 index 0000000000..7880b69db5 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_microsoft_store_for_business_app' +require_relative '../categories' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMicrosoftStoreForBusinessApp + module Categories + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/categories/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/events/item/instances/item/attachments/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/item/item.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/events/item/instances/item/attachments/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/item/mobile_app_category_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/item/mobile_app_category_item_request_builder.rb new file mode 100644 index 0000000000..a27ef23753 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/categories/item/mobile_app_category_item_request_builder.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_category' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_microsoft_store_for_business_app' +require_relative '../categories' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMicrosoftStoreForBusinessApp + module Categories + module Item + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class MobileAppCategoryItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp/categories/{mobileAppCategory%2Did}{?%24expand,%24select}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategory.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_category_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppCategoryItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class MobileAppCategoryItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/calendar_view/item/dismiss_reminder/dismiss_reminder.rb b/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/graph_microsoft_store_for_business_app.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/calendar_view/item/dismiss_reminder/dismiss_reminder.rb rename to lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/graph_microsoft_store_for_business_app.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/graph_microsoft_store_for_business_app_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/graph_microsoft_store_for_business_app_request_builder.rb new file mode 100644 index 0000000000..882a65e666 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_microsoft_store_for_business_app/graph_microsoft_store_for_business_app_request_builder.rb @@ -0,0 +1,113 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/microsoft_store_for_business_app' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../item' +require_relative './assignments/assignments_request_builder' +require_relative './categories/categories_request_builder' +require_relative './graph_microsoft_store_for_business_app' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphMicrosoftStoreForBusinessApp + ## + # Casts the previous resource to microsoftStoreForBusinessApp. + class GraphMicrosoftStoreForBusinessAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + def assignments() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMicrosoftStoreForBusinessApp::Assignments::AssignmentsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + def categories() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMicrosoftStoreForBusinessApp::Categories::CategoriesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphMicrosoftStoreForBusinessAppRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.microsoftStoreForBusinessApp{?%24expand,%24select}") + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.microsoftStoreForBusinessApp + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of microsoft_store_for_business_app + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MicrosoftStoreForBusinessApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.microsoftStoreForBusinessApp + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_microsoft_store_for_business_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphMicrosoftStoreForBusinessAppRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the item of type microsoft.graph.mobileApp as microsoft.graph.microsoftStoreForBusinessApp + class GraphMicrosoftStoreForBusinessAppRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/graph_mobile_lob_app/graph_mobile_lob_app_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_mobile_lob_app/graph_mobile_lob_app_request_builder.rb deleted file mode 100644 index 17271020fb..0000000000 --- a/lib/device_app_management/mobile_apps/item/graph_mobile_lob_app/graph_mobile_lob_app_request_builder.rb +++ /dev/null @@ -1,93 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../../models/mobile_lob_app' -require_relative '../../../../models/o_data_errors_o_data_error' -require_relative '../../../device_app_management' -require_relative '../../mobile_apps' -require_relative '../item' -require_relative './graph_mobile_lob_app' - -module MicrosoftGraph - module DeviceAppManagement - module MobileApps - module Item - module GraphMobileLobApp - ## - # Casts the previous resource to mobileLobApp. - class GraphMobileLobAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder - - ## - ## Instantiates a new GraphMobileLobAppRequestBuilder and sets the default values. - ## @param path_parameters Path parameters for the request - ## @param request_adapter The request adapter to use to execute the requests. - ## @return a void - ## - def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.mobileLobApp{?%24select,%24expand}") - end - ## - ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.mobileLobApp - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of mobile_lob_app - ## - def get(request_configuration=nil) - request_info = self.to_get_request_information( - request_configuration - ) - error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileLobApp.create_from_discriminator_value(pn) }, error_mapping) - end - ## - ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.mobileLobApp - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a request_information - ## - def to_get_request_information(request_configuration=nil) - request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') - unless request_configuration.nil? - request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) - request_info.add_request_options(request_configuration.options) - end - return request_info - end - - ## - # Get the item of type microsoft.graph.mobileApp as microsoft.graph.mobileLobApp - class GraphMobileLobAppRequestBuilderGetQueryParameters - - ## - # Expand related entities - attr_accessor :expand - ## - # Select properties to be returned - attr_accessor :select - ## - ## Maps the query parameters names to their encoded names for the URI template parsing. - ## @param original_name The original query parameter name in the class. - ## @return a string - ## - def get_query_parameter(original_name) - raise StandardError, 'original_name cannot be null' if original_name.nil? - case original_name - when "expand" - return "%24expand" - when "select" - return "%24select" - else - return original_name - end - end - end - end - end - end - end - end -end diff --git a/lib/me/calendar_groups/item/calendars/item/calendar_view/item/extensions/extensions.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/assignments.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/calendar_view/item/extensions/extensions.rb rename to lib/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/assignments.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/assignments_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/assignments_request_builder.rb new file mode 100644 index 0000000000..1ad0f563ba --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/assignments_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_assignment' +require_relative '../../../../../models/mobile_app_assignment_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_win32_lob_app' +require_relative './assignments' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_assignment_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWin32LobApp + module Assignments + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class AssignmentsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWin32LobApp::Assignments::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_assignment_id The unique identifier of mobileAppAssignment + ## @return a mobile_app_assignment_item_request_builder + ## + def by_mobile_app_assignment_id(mobile_app_assignment_id) + raise StandardError, 'mobile_app_assignment_id cannot be null' if mobile_app_assignment_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWin32LobApp::Assignments::Item::MobileAppAssignmentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new AssignmentsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class AssignmentsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_view/item/instances/item/extensions/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/count/count.rb similarity index 100% rename from lib/me/calendar_view/item/instances/item/extensions/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/count/count_request_builder.rb new file mode 100644 index 0000000000..17a318ca41 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_win32_lob_app' +require_relative '../assignments' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWin32LobApp + module Assignments + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/assignments/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/events/item/instances/item/extensions/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/item/item.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/events/item/instances/item/extensions/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/item/mobile_app_assignment_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/item/mobile_app_assignment_item_request_builder.rb new file mode 100644 index 0000000000..a3c88419b7 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/assignments/item/mobile_app_assignment_item_request_builder.rb @@ -0,0 +1,172 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_assignment' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_win32_lob_app' +require_relative '../assignments' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWin32LobApp + module Assignments + module Item + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class MobileAppAssignmentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/assignments/{mobileAppAssignment%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class MobileAppAssignmentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/calendar_view/item/instances/instances.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/categories.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/calendar_view/item/instances/instances.rb rename to lib/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/categories.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/categories_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/categories_request_builder.rb new file mode 100644 index 0000000000..90339948c3 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/categories_request_builder.rb @@ -0,0 +1,152 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_category_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_win32_lob_app' +require_relative './categories' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_category_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWin32LobApp + module Categories + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class CategoriesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWin32LobApp::Categories::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_category_id The unique identifier of mobileAppCategory + ## @return a mobile_app_category_item_request_builder + ## + def by_mobile_app_category_id(mobile_app_category_id) + raise StandardError, 'mobile_app_category_id cannot be null' if mobile_app_category_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWin32LobApp::Categories::Item::MobileAppCategoryItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new CategoriesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/categories{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategoryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a categories_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CategoriesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class CategoriesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/count/count.rb similarity index 100% rename from lib/me/calendars/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/count/count_request_builder.rb new file mode 100644 index 0000000000..13aea5460a --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_win32_lob_app' +require_relative '../categories' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWin32LobApp + module Categories + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/categories/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/events/item/instances/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/item/item.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/events/item/instances/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/item/mobile_app_category_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/item/mobile_app_category_item_request_builder.rb new file mode 100644 index 0000000000..6ed88d37a6 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/categories/item/mobile_app_category_item_request_builder.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_category' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_win32_lob_app' +require_relative '../categories' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWin32LobApp + module Categories + module Item + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class MobileAppCategoryItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/categories/{mobileAppCategory%2Did}{?%24expand,%24select}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategory.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_category_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppCategoryItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class MobileAppCategoryItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/calendar_view/item/instances/item/attachments/attachments.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/content_versions.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/calendar_view/item/instances/item/attachments/attachments.rb rename to lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/content_versions.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/content_versions_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/content_versions_request_builder.rb new file mode 100644 index 0000000000..17be277ab1 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/content_versions_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_content' +require_relative '../../../../../models/mobile_app_content_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_win32_lob_app' +require_relative './content_versions' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_content_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWin32LobApp + module ContentVersions + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + class ContentVersionsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWin32LobApp::ContentVersions::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + ## @param mobile_app_content_id The unique identifier of mobileAppContent + ## @return a mobile_app_content_item_request_builder + ## + def by_mobile_app_content_id(mobile_app_content_id) + raise StandardError, 'mobile_app_content_id cannot be null' if mobile_app_content_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppContent%2Did"] = mobile_app_content_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWin32LobApp::ContentVersions::Item::MobileAppContentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new ContentVersionsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to contentVersions for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to contentVersions for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a content_versions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContentVersionsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of content versions for this app. + class ContentVersionsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/calendar_permissions/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/count/count.rb similarity index 100% rename from lib/me/calendars/item/calendar_permissions/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/count/count_request_builder.rb new file mode 100644 index 0000000000..f15faca29d --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_win32_lob_app' +require_relative '../content_versions' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWin32LobApp + module ContentVersions + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/calendar_view/item/instances/item/calendar/calendar.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/contained_apps.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/calendar_view/item/instances/item/calendar/calendar.rb rename to lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/contained_apps.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.rb new file mode 100644 index 0000000000..2fce5e043c --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/contained_apps_request_builder.rb @@ -0,0 +1,194 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/mobile_contained_app' +require_relative '../../../../../../../models/mobile_contained_app_collection_response' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../device_app_management' +require_relative '../../../../../mobile_apps' +require_relative '../../../../item' +require_relative '../../../graph_win32_lob_app' +require_relative '../../content_versions' +require_relative '../item' +require_relative './contained_apps' +require_relative './count/count_request_builder' +require_relative './item/mobile_contained_app_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWin32LobApp + module ContentVersions + module Item + module ContainedApps + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + class ContainedAppsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWin32LobApp::ContentVersions::Item::ContainedApps::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + ## @param mobile_contained_app_id The unique identifier of mobileContainedApp + ## @return a mobile_contained_app_item_request_builder + ## + def by_mobile_contained_app_id(mobile_contained_app_id) + raise StandardError, 'mobile_contained_app_id cannot be null' if mobile_contained_app_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileContainedApp%2Did"] = mobile_contained_app_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWin32LobApp::ContentVersions::Item::ContainedApps::Item::MobileContainedAppItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new ContainedAppsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/containedApps{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to containedApps for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to containedApps for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a contained_apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContainedAppsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of contained apps in a MobileLobApp acting as a package. + class ContainedAppsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/calendar_view/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/count/count.rb similarity index 100% rename from lib/me/calendars/item/calendar_view/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/count/count_request_builder.rb new file mode 100644 index 0000000000..abed1efb60 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/count/count_request_builder.rb @@ -0,0 +1,112 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_win32_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../contained_apps' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWin32LobApp + module ContentVersions + module Item + module ContainedApps + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/events/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/item/item.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/events/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb new file mode 100644 index 0000000000..c766b026b0 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb @@ -0,0 +1,178 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/mobile_contained_app' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_win32_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../contained_apps' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWin32LobApp + module ContentVersions + module Item + module ContainedApps + module Item + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + class MobileContainedAppItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property containedApps for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property containedApps in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property containedApps for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property containedApps in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_contained_app_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileContainedAppItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of contained apps in a MobileLobApp acting as a package. + class MobileContainedAppItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/calendar_view/item/attachments/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/count/count.rb similarity index 100% rename from lib/me/calendars/item/calendar_view/item/attachments/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/count/count_request_builder.rb new file mode 100644 index 0000000000..c2fe01ec81 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/count/count_request_builder.rb @@ -0,0 +1,112 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_win32_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../files' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWin32LobApp + module ContentVersions + module Item + module Files + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/files/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/files.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder.rb rename to lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/files.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/files_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/files_request_builder.rb new file mode 100644 index 0000000000..8067eb98ed --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/files_request_builder.rb @@ -0,0 +1,194 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/mobile_app_content_file' +require_relative '../../../../../../../models/mobile_app_content_file_collection_response' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../device_app_management' +require_relative '../../../../../mobile_apps' +require_relative '../../../../item' +require_relative '../../../graph_win32_lob_app' +require_relative '../../content_versions' +require_relative '../item' +require_relative './count/count_request_builder' +require_relative './files' +require_relative './item/mobile_app_content_file_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWin32LobApp + module ContentVersions + module Item + module Files + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + class FilesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWin32LobApp::ContentVersions::Item::Files::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + ## @param mobile_app_content_file_id The unique identifier of mobileAppContentFile + ## @return a mobile_app_content_file_item_request_builder + ## + def by_mobile_app_content_file_id(mobile_app_content_file_id) + raise StandardError, 'mobile_app_content_file_id cannot be null' if mobile_app_content_file_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppContentFile%2Did"] = mobile_app_content_file_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWin32LobApp::ContentVersions::Item::Files::Item::MobileAppContentFileItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new FilesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/files{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFileCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to files for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to files for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a files_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return FilesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of files for this app content version. + class FilesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/commit/commit.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/commit/commit.rb new file mode 100644 index 0000000000..b61410499d --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/commit/commit.rb @@ -0,0 +1 @@ +require_relative 'commit_post_request_body' diff --git a/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/commit/commit_post_request_body.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/commit/commit_post_request_body.rb new file mode 100644 index 0000000000..1b630a4058 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/commit/commit_post_request_body.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/file_encryption_info' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_win32_lob_app' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './commit' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWin32LobApp + module ContentVersions + module Item + module Files + module Item + module Commit + class CommitPostRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The fileEncryptionInfo property + @file_encryption_info + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new CommitPostRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a commit_post_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CommitPostRequestBody.new + end + ## + ## Gets the fileEncryptionInfo property value. The fileEncryptionInfo property + ## @return a file_encryption_info + ## + def file_encryption_info + return @file_encryption_info + end + ## + ## Sets the fileEncryptionInfo property value. The fileEncryptionInfo property + ## @param value Value to set for the fileEncryptionInfo property. + ## @return a void + ## + def file_encryption_info=(value) + @file_encryption_info = value + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "fileEncryptionInfo" => lambda {|n| @file_encryption_info = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::FileEncryptionInfo.create_from_discriminator_value(pn) }) }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_object_value("fileEncryptionInfo", @file_encryption_info) + writer.write_additional_data(@additional_data) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/commit/commit_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/commit/commit_request_builder.rb new file mode 100644 index 0000000000..da4cf948c1 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/commit/commit_request_builder.rb @@ -0,0 +1,91 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_win32_lob_app' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './commit' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWin32LobApp + module ContentVersions + module Item + module Files + module Item + module Commit + ## + # Provides operations to call the commit method. + class CommitRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CommitRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit") + end + ## + ## Commits a file of a given app. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Commits a file of a given app. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a commit_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CommitRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/item.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb new file mode 100644 index 0000000000..3cf6d41e2b --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb @@ -0,0 +1,190 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/mobile_app_content_file' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_win32_lob_app' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../files' +require_relative './commit/commit_request_builder' +require_relative './item' +require_relative './renew_upload/renew_upload_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWin32LobApp + module ContentVersions + module Item + module Files + module Item + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + class MobileAppContentFileItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to call the commit method. + def commit() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWin32LobApp::ContentVersions::Item::Files::Item::Commit::CommitRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to call the renewUpload method. + def renew_upload() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWin32LobApp::ContentVersions::Item::Files::Item::RenewUpload::RenewUploadRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property files for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property files in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property files for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property files in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_content_file_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppContentFileItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of files for this app content version. + class MobileAppContentFileItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/calendar_view/item/instances/item/extensions/extensions.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/renew_upload/renew_upload.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/calendar_view/item/instances/item/extensions/extensions.rb rename to lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/renew_upload/renew_upload.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb new file mode 100644 index 0000000000..447571251b --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb @@ -0,0 +1,86 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_win32_lob_app' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './renew_upload' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWin32LobApp + module ContentVersions + module Item + module Files + module Item + module RenewUpload + ## + # Provides operations to call the renewUpload method. + class RenewUploadRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new RenewUploadRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload") + end + ## + ## Renews the SAS URI for an application file upload. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(request_configuration=nil) + request_info = self.to_post_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Renews the SAS URI for an application file upload. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a renew_upload_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RenewUploadRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/item.rb similarity index 100% rename from lib/me/calendar_groups/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/mobile_app_content_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/mobile_app_content_item_request_builder.rb new file mode 100644 index 0000000000..3550c67827 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/content_versions/item/mobile_app_content_item_request_builder.rb @@ -0,0 +1,184 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_content' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_win32_lob_app' +require_relative '../content_versions' +require_relative './contained_apps/contained_apps_request_builder' +require_relative './files/files_request_builder' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWin32LobApp + module ContentVersions + module Item + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + class MobileAppContentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + def contained_apps() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWin32LobApp::ContentVersions::Item::ContainedApps::ContainedAppsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + def files() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWin32LobApp::ContentVersions::Item::Files::FilesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp/contentVersions/{mobileAppContent%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property contentVersions for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property contentVersions in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property contentVersions for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property contentVersions in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_content_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppContentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of content versions for this app. + class MobileAppContentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/events/events.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/graph_win32_lob_app.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/events/events.rb rename to lib/device_app_management/mobile_apps/item/graph_win32_lob_app/graph_win32_lob_app.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/graph_win32_lob_app_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/graph_win32_lob_app_request_builder.rb new file mode 100644 index 0000000000..3572043357 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_win32_lob_app/graph_win32_lob_app_request_builder.rb @@ -0,0 +1,119 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../../models/win32_lob_app' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../item' +require_relative './assignments/assignments_request_builder' +require_relative './categories/categories_request_builder' +require_relative './content_versions/content_versions_request_builder' +require_relative './graph_win32_lob_app' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWin32LobApp + ## + # Casts the previous resource to win32LobApp. + class GraphWin32LobAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + def assignments() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWin32LobApp::Assignments::AssignmentsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + def categories() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWin32LobApp::Categories::CategoriesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + def content_versions() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWin32LobApp::ContentVersions::ContentVersionsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphWin32LobAppRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.win32LobApp{?%24expand,%24select}") + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.win32LobApp + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of win32_lob_app + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Win32LobApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.win32LobApp + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_win32_lob_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphWin32LobAppRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the item of type microsoft.graph.mobileApp as microsoft.graph.win32LobApp + class GraphWin32LobAppRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/events/item/attachments/attachments.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/assignments.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/events/item/attachments/attachments.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/assignments.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/assignments_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/assignments_request_builder.rb new file mode 100644 index 0000000000..7825c1c5e2 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/assignments_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_assignment' +require_relative '../../../../../models/mobile_app_assignment_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_windows_app_x' +require_relative './assignments' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_assignment_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsAppX + module Assignments + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class AssignmentsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsAppX::Assignments::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_assignment_id The unique identifier of mobileAppAssignment + ## @return a mobile_app_assignment_item_request_builder + ## + def by_mobile_app_assignment_id(mobile_app_assignment_id) + raise StandardError, 'mobile_app_assignment_id cannot be null' if mobile_app_assignment_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsAppX::Assignments::Item::MobileAppAssignmentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new AssignmentsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class AssignmentsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/calendar_view/item/extensions/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/count/count.rb similarity index 100% rename from lib/me/calendars/item/calendar_view/item/extensions/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/count/count_request_builder.rb new file mode 100644 index 0000000000..2856e19528 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_windows_app_x' +require_relative '../assignments' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsAppX + module Assignments + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/assignments/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_view/item/attachments/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/item/item.rb similarity index 100% rename from lib/me/calendar_view/item/attachments/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/item/mobile_app_assignment_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/item/mobile_app_assignment_item_request_builder.rb new file mode 100644 index 0000000000..99e3cfd348 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/assignments/item/mobile_app_assignment_item_request_builder.rb @@ -0,0 +1,172 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_assignment' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_windows_app_x' +require_relative '../assignments' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsAppX + module Assignments + module Item + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class MobileAppAssignmentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/assignments/{mobileAppAssignment%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class MobileAppAssignmentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/events/item/calendar/calendar.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/categories/categories.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/events/item/calendar/calendar.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_app_x/categories/categories.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_app_x/categories/categories_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/categories/categories_request_builder.rb new file mode 100644 index 0000000000..5f06611fbc --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/categories/categories_request_builder.rb @@ -0,0 +1,152 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_category_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_windows_app_x' +require_relative './categories' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_category_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsAppX + module Categories + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class CategoriesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsAppX::Categories::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_category_id The unique identifier of mobileAppCategory + ## @return a mobile_app_category_item_request_builder + ## + def by_mobile_app_category_id(mobile_app_category_id) + raise StandardError, 'mobile_app_category_id cannot be null' if mobile_app_category_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsAppX::Categories::Item::MobileAppCategoryItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new CategoriesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/categories{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategoryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a categories_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CategoriesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class CategoriesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/calendar_view/item/instances/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/categories/count/count.rb similarity index 100% rename from lib/me/calendars/item/calendar_view/item/instances/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_app_x/categories/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_app_x/categories/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/categories/count/count_request_builder.rb new file mode 100644 index 0000000000..9f0b74f01a --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/categories/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_windows_app_x' +require_relative '../categories' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsAppX + module Categories + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/categories/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_view/item/extensions/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/categories/item/item.rb similarity index 100% rename from lib/me/calendar_view/item/extensions/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_app_x/categories/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_app_x/categories/item/mobile_app_category_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/categories/item/mobile_app_category_item_request_builder.rb new file mode 100644 index 0000000000..0cb47f7c54 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/categories/item/mobile_app_category_item_request_builder.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_category' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_windows_app_x' +require_relative '../categories' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsAppX + module Categories + module Item + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class MobileAppCategoryItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/categories/{mobileAppCategory%2Did}{?%24expand,%24select}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategory.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_category_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppCategoryItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class MobileAppCategoryItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/events/item/dismiss_reminder/dismiss_reminder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/content_versions.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/events/item/dismiss_reminder/dismiss_reminder.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/content_versions.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/content_versions_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/content_versions_request_builder.rb new file mode 100644 index 0000000000..3fb62852d0 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/content_versions_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_content' +require_relative '../../../../../models/mobile_app_content_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_windows_app_x' +require_relative './content_versions' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_content_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsAppX + module ContentVersions + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + class ContentVersionsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsAppX::ContentVersions::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + ## @param mobile_app_content_id The unique identifier of mobileAppContent + ## @return a mobile_app_content_item_request_builder + ## + def by_mobile_app_content_id(mobile_app_content_id) + raise StandardError, 'mobile_app_content_id cannot be null' if mobile_app_content_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppContent%2Did"] = mobile_app_content_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsAppX::ContentVersions::Item::MobileAppContentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new ContentVersionsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to contentVersions for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to contentVersions for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a content_versions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContentVersionsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of content versions for this app. + class ContentVersionsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/calendar_view/item/instances/item/attachments/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/count/count.rb similarity index 100% rename from lib/me/calendars/item/calendar_view/item/instances/item/attachments/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/count/count_request_builder.rb new file mode 100644 index 0000000000..9b3b755729 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_windows_app_x' +require_relative '../content_versions' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsAppX + module ContentVersions + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/events/item/extensions/extensions.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/contained_apps.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/events/item/extensions/extensions.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/contained_apps.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/contained_apps_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/contained_apps_request_builder.rb new file mode 100644 index 0000000000..cb1f4db929 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/contained_apps_request_builder.rb @@ -0,0 +1,194 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/mobile_contained_app' +require_relative '../../../../../../../models/mobile_contained_app_collection_response' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../device_app_management' +require_relative '../../../../../mobile_apps' +require_relative '../../../../item' +require_relative '../../../graph_windows_app_x' +require_relative '../../content_versions' +require_relative '../item' +require_relative './contained_apps' +require_relative './count/count_request_builder' +require_relative './item/mobile_contained_app_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsAppX + module ContentVersions + module Item + module ContainedApps + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + class ContainedAppsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsAppX::ContentVersions::Item::ContainedApps::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + ## @param mobile_contained_app_id The unique identifier of mobileContainedApp + ## @return a mobile_contained_app_item_request_builder + ## + def by_mobile_contained_app_id(mobile_contained_app_id) + raise StandardError, 'mobile_contained_app_id cannot be null' if mobile_contained_app_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileContainedApp%2Did"] = mobile_contained_app_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsAppX::ContentVersions::Item::ContainedApps::Item::MobileContainedAppItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new ContainedAppsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/containedApps{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to containedApps for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to containedApps for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a contained_apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContainedAppsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of contained apps in a MobileLobApp acting as a package. + class ContainedAppsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/calendar_view/item/instances/item/extensions/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/count/count.rb similarity index 100% rename from lib/me/calendars/item/calendar_view/item/instances/item/extensions/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/count/count_request_builder.rb new file mode 100644 index 0000000000..c115c00402 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/count/count_request_builder.rb @@ -0,0 +1,112 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_windows_app_x' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../contained_apps' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsAppX + module ContentVersions + module Item + module ContainedApps + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_view/item/instances/item/attachments/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/item/item.rb similarity index 100% rename from lib/me/calendar_view/item/instances/item/attachments/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb new file mode 100644 index 0000000000..4f76e54a5f --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb @@ -0,0 +1,178 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/mobile_contained_app' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_windows_app_x' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../contained_apps' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsAppX + module ContentVersions + module Item + module ContainedApps + module Item + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + class MobileContainedAppItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property containedApps for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property containedApps in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property containedApps for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property containedApps in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_contained_app_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileContainedAppItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of contained apps in a MobileLobApp acting as a package. + class MobileContainedAppItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/events/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/count/count.rb similarity index 100% rename from lib/me/calendars/item/events/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/count/count_request_builder.rb new file mode 100644 index 0000000000..99d81a242a --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/count/count_request_builder.rb @@ -0,0 +1,112 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_windows_app_x' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../files' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsAppX + module ContentVersions + module Item + module Files + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/files/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/events/item/instances/instances.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/files.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/events/item/instances/instances.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/files.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/files_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/files_request_builder.rb new file mode 100644 index 0000000000..e24a2d1220 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/files_request_builder.rb @@ -0,0 +1,194 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/mobile_app_content_file' +require_relative '../../../../../../../models/mobile_app_content_file_collection_response' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../device_app_management' +require_relative '../../../../../mobile_apps' +require_relative '../../../../item' +require_relative '../../../graph_windows_app_x' +require_relative '../../content_versions' +require_relative '../item' +require_relative './count/count_request_builder' +require_relative './files' +require_relative './item/mobile_app_content_file_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsAppX + module ContentVersions + module Item + module Files + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + class FilesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsAppX::ContentVersions::Item::Files::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + ## @param mobile_app_content_file_id The unique identifier of mobileAppContentFile + ## @return a mobile_app_content_file_item_request_builder + ## + def by_mobile_app_content_file_id(mobile_app_content_file_id) + raise StandardError, 'mobile_app_content_file_id cannot be null' if mobile_app_content_file_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppContentFile%2Did"] = mobile_app_content_file_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsAppX::ContentVersions::Item::Files::Item::MobileAppContentFileItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new FilesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/files{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFileCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to files for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to files for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a files_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return FilesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of files for this app content version. + class FilesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/commit/commit.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/commit/commit.rb new file mode 100644 index 0000000000..b61410499d --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/commit/commit.rb @@ -0,0 +1 @@ +require_relative 'commit_post_request_body' diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/commit/commit_post_request_body.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/commit/commit_post_request_body.rb new file mode 100644 index 0000000000..8c48dd4c72 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/commit/commit_post_request_body.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/file_encryption_info' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_windows_app_x' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './commit' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsAppX + module ContentVersions + module Item + module Files + module Item + module Commit + class CommitPostRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The fileEncryptionInfo property + @file_encryption_info + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new CommitPostRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a commit_post_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CommitPostRequestBody.new + end + ## + ## Gets the fileEncryptionInfo property value. The fileEncryptionInfo property + ## @return a file_encryption_info + ## + def file_encryption_info + return @file_encryption_info + end + ## + ## Sets the fileEncryptionInfo property value. The fileEncryptionInfo property + ## @param value Value to set for the fileEncryptionInfo property. + ## @return a void + ## + def file_encryption_info=(value) + @file_encryption_info = value + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "fileEncryptionInfo" => lambda {|n| @file_encryption_info = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::FileEncryptionInfo.create_from_discriminator_value(pn) }) }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_object_value("fileEncryptionInfo", @file_encryption_info) + writer.write_additional_data(@additional_data) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/commit/commit_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/commit/commit_request_builder.rb new file mode 100644 index 0000000000..bbab7b0c16 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/commit/commit_request_builder.rb @@ -0,0 +1,91 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_windows_app_x' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './commit' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsAppX + module ContentVersions + module Item + module Files + module Item + module Commit + ## + # Provides operations to call the commit method. + class CommitRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CommitRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit") + end + ## + ## Commits a file of a given app. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Commits a file of a given app. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a commit_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CommitRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_view/item/instances/item/extensions/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/item.rb similarity index 100% rename from lib/me/calendar_view/item/instances/item/extensions/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb new file mode 100644 index 0000000000..97739abde2 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb @@ -0,0 +1,190 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/mobile_app_content_file' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_windows_app_x' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../files' +require_relative './commit/commit_request_builder' +require_relative './item' +require_relative './renew_upload/renew_upload_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsAppX + module ContentVersions + module Item + module Files + module Item + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + class MobileAppContentFileItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to call the commit method. + def commit() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsAppX::ContentVersions::Item::Files::Item::Commit::CommitRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to call the renewUpload method. + def renew_upload() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsAppX::ContentVersions::Item::Files::Item::RenewUpload::RenewUploadRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property files for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property files in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property files for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property files in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_content_file_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppContentFileItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of files for this app content version. + class MobileAppContentFileItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/events/item/instances/item/attachments/attachments.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/renew_upload/renew_upload.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/events/item/instances/item/attachments/attachments.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/renew_upload/renew_upload.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb new file mode 100644 index 0000000000..c21a7c90c5 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb @@ -0,0 +1,86 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_windows_app_x' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './renew_upload' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsAppX + module ContentVersions + module Item + module Files + module Item + module RenewUpload + ## + # Provides operations to call the renewUpload method. + class RenewUploadRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new RenewUploadRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload") + end + ## + ## Renews the SAS URI for an application file upload. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(request_configuration=nil) + request_info = self.to_post_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Renews the SAS URI for an application file upload. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a renew_upload_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RenewUploadRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_view/item/instances/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/item.rb similarity index 100% rename from lib/me/calendar_view/item/instances/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/mobile_app_content_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/mobile_app_content_item_request_builder.rb new file mode 100644 index 0000000000..fa9e148903 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/content_versions/item/mobile_app_content_item_request_builder.rb @@ -0,0 +1,184 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_content' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_windows_app_x' +require_relative '../content_versions' +require_relative './contained_apps/contained_apps_request_builder' +require_relative './files/files_request_builder' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsAppX + module ContentVersions + module Item + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + class MobileAppContentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + def contained_apps() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsAppX::ContentVersions::Item::ContainedApps::ContainedAppsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + def files() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsAppX::ContentVersions::Item::Files::FilesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX/contentVersions/{mobileAppContent%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property contentVersions for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property contentVersions in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property contentVersions for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property contentVersions in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_content_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppContentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of content versions for this app. + class MobileAppContentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/events/item/instances/item/calendar/calendar.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/graph_windows_app_x.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/events/item/instances/item/calendar/calendar.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_app_x/graph_windows_app_x.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_app_x/graph_windows_app_x_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/graph_windows_app_x_request_builder.rb new file mode 100644 index 0000000000..a3bbbc68c3 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_app_x/graph_windows_app_x_request_builder.rb @@ -0,0 +1,119 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../../models/windows_app_x' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../item' +require_relative './assignments/assignments_request_builder' +require_relative './categories/categories_request_builder' +require_relative './content_versions/content_versions_request_builder' +require_relative './graph_windows_app_x' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsAppX + ## + # Casts the previous resource to windowsAppX. + class GraphWindowsAppXRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + def assignments() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsAppX::Assignments::AssignmentsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + def categories() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsAppX::Categories::CategoriesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + def content_versions() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsAppX::ContentVersions::ContentVersionsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphWindowsAppXRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsAppX{?%24expand,%24select}") + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.windowsAppX + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of windows_app_x + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsAppX.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.windowsAppX + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_windows_app_x_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphWindowsAppXRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the item of type microsoft.graph.mobileApp as microsoft.graph.windowsAppX + class GraphWindowsAppXRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/events/item/instances/item/dismiss_reminder/dismiss_reminder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/assignments.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/events/item/instances/item/dismiss_reminder/dismiss_reminder.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/assignments.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/assignments_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/assignments_request_builder.rb new file mode 100644 index 0000000000..a99761c6d7 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/assignments_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_assignment' +require_relative '../../../../../models/mobile_app_assignment_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_windows_mobile_m_s_i' +require_relative './assignments' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_assignment_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsMobileMSI + module Assignments + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class AssignmentsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsMobileMSI::Assignments::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_assignment_id The unique identifier of mobileAppAssignment + ## @return a mobile_app_assignment_item_request_builder + ## + def by_mobile_app_assignment_id(mobile_app_assignment_id) + raise StandardError, 'mobile_app_assignment_id cannot be null' if mobile_app_assignment_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsMobileMSI::Assignments::Item::MobileAppAssignmentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new AssignmentsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class AssignmentsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/events/item/attachments/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/count/count.rb similarity index 100% rename from lib/me/calendars/item/events/item/attachments/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/count/count_request_builder.rb new file mode 100644 index 0000000000..5a26ab8ac0 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_windows_mobile_m_s_i' +require_relative '../assignments' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsMobileMSI + module Assignments + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/assignments/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_view/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/item/item.rb similarity index 100% rename from lib/me/calendar_view/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/item/mobile_app_assignment_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/item/mobile_app_assignment_item_request_builder.rb new file mode 100644 index 0000000000..daa52b777f --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/assignments/item/mobile_app_assignment_item_request_builder.rb @@ -0,0 +1,172 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_assignment' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_windows_mobile_m_s_i' +require_relative '../assignments' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsMobileMSI + module Assignments + module Item + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class MobileAppAssignmentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/assignments/{mobileAppAssignment%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class MobileAppAssignmentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_groups/item/calendars/item/events/item/instances/item/extensions/extensions.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/categories.rb similarity index 100% rename from lib/me/calendar_groups/item/calendars/item/events/item/instances/item/extensions/extensions.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/categories.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/categories_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/categories_request_builder.rb new file mode 100644 index 0000000000..fe7e05da24 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/categories_request_builder.rb @@ -0,0 +1,152 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_category_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_windows_mobile_m_s_i' +require_relative './categories' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_category_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsMobileMSI + module Categories + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class CategoriesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsMobileMSI::Categories::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_category_id The unique identifier of mobileAppCategory + ## @return a mobile_app_category_item_request_builder + ## + def by_mobile_app_category_id(mobile_app_category_id) + raise StandardError, 'mobile_app_category_id cannot be null' if mobile_app_category_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsMobileMSI::Categories::Item::MobileAppCategoryItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new CategoriesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/categories{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategoryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a categories_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CategoriesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class CategoriesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/events/item/extensions/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/count/count.rb similarity index 100% rename from lib/me/calendars/item/events/item/extensions/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/count/count_request_builder.rb new file mode 100644 index 0000000000..aa7cf1ea14 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_windows_mobile_m_s_i' +require_relative '../categories' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsMobileMSI + module Categories + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/categories/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/calendar_permissions/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/item/item.rb similarity index 100% rename from lib/me/calendars/item/calendar_permissions/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/item/mobile_app_category_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/item/mobile_app_category_item_request_builder.rb new file mode 100644 index 0000000000..0578b2a280 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/categories/item/mobile_app_category_item_request_builder.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_category' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_windows_mobile_m_s_i' +require_relative '../categories' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsMobileMSI + module Categories + module Item + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class MobileAppCategoryItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/categories/{mobileAppCategory%2Did}{?%24expand,%24select}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategory.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_category_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppCategoryItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class MobileAppCategoryItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_view/calendar_view.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/content_versions.rb similarity index 100% rename from lib/me/calendar_view/calendar_view.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/content_versions.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/content_versions_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/content_versions_request_builder.rb new file mode 100644 index 0000000000..db7625def9 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/content_versions_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_content' +require_relative '../../../../../models/mobile_app_content_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_windows_mobile_m_s_i' +require_relative './content_versions' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_content_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsMobileMSI + module ContentVersions + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + class ContentVersionsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsMobileMSI::ContentVersions::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + ## @param mobile_app_content_id The unique identifier of mobileAppContent + ## @return a mobile_app_content_item_request_builder + ## + def by_mobile_app_content_id(mobile_app_content_id) + raise StandardError, 'mobile_app_content_id cannot be null' if mobile_app_content_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppContent%2Did"] = mobile_app_content_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsMobileMSI::ContentVersions::Item::MobileAppContentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new ContentVersionsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to contentVersions for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to contentVersions for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a content_versions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContentVersionsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of content versions for this app. + class ContentVersionsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/events/item/instances/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/count/count.rb similarity index 100% rename from lib/me/calendars/item/events/item/instances/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/count/count_request_builder.rb new file mode 100644 index 0000000000..330d5b92f5 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_windows_mobile_m_s_i' +require_relative '../content_versions' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsMobileMSI + module ContentVersions + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_view/item/attachments/attachments.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/contained_apps.rb similarity index 100% rename from lib/me/calendar_view/item/attachments/attachments.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/contained_apps.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/contained_apps_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/contained_apps_request_builder.rb new file mode 100644 index 0000000000..5750a18dac --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/contained_apps_request_builder.rb @@ -0,0 +1,194 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/mobile_contained_app' +require_relative '../../../../../../../models/mobile_contained_app_collection_response' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../device_app_management' +require_relative '../../../../../mobile_apps' +require_relative '../../../../item' +require_relative '../../../graph_windows_mobile_m_s_i' +require_relative '../../content_versions' +require_relative '../item' +require_relative './contained_apps' +require_relative './count/count_request_builder' +require_relative './item/mobile_contained_app_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsMobileMSI + module ContentVersions + module Item + module ContainedApps + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + class ContainedAppsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsMobileMSI::ContentVersions::Item::ContainedApps::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + ## @param mobile_contained_app_id The unique identifier of mobileContainedApp + ## @return a mobile_contained_app_item_request_builder + ## + def by_mobile_contained_app_id(mobile_contained_app_id) + raise StandardError, 'mobile_contained_app_id cannot be null' if mobile_contained_app_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileContainedApp%2Did"] = mobile_contained_app_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsMobileMSI::ContentVersions::Item::ContainedApps::Item::MobileContainedAppItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new ContainedAppsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/containedApps{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to containedApps for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to containedApps for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a contained_apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContainedAppsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of contained apps in a MobileLobApp acting as a package. + class ContainedAppsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/events/item/instances/item/attachments/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/count/count.rb similarity index 100% rename from lib/me/calendars/item/events/item/instances/item/attachments/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/count/count_request_builder.rb new file mode 100644 index 0000000000..505ca7f044 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/count/count_request_builder.rb @@ -0,0 +1,112 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_windows_mobile_m_s_i' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../contained_apps' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsMobileMSI + module ContentVersions + module Item + module ContainedApps + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/calendar_view/item/attachments/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/item/item.rb similarity index 100% rename from lib/me/calendars/item/calendar_view/item/attachments/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb new file mode 100644 index 0000000000..e6824c6102 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb @@ -0,0 +1,178 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/mobile_contained_app' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_windows_mobile_m_s_i' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../contained_apps' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsMobileMSI + module ContentVersions + module Item + module ContainedApps + module Item + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + class MobileContainedAppItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property containedApps for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property containedApps in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property containedApps for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property containedApps in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_contained_app_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileContainedAppItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of contained apps in a MobileLobApp acting as a package. + class MobileContainedAppItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/events/item/instances/item/extensions/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/count/count.rb similarity index 100% rename from lib/me/calendars/item/events/item/instances/item/extensions/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/count/count_request_builder.rb new file mode 100644 index 0000000000..dc5d3f2149 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/count/count_request_builder.rb @@ -0,0 +1,112 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_windows_mobile_m_s_i' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../files' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsMobileMSI + module ContentVersions + module Item + module Files + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/files/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_view/item/calendar/calendar.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/files.rb similarity index 100% rename from lib/me/calendar_view/item/calendar/calendar.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/files.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/files_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/files_request_builder.rb new file mode 100644 index 0000000000..587868828d --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/files_request_builder.rb @@ -0,0 +1,194 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/mobile_app_content_file' +require_relative '../../../../../../../models/mobile_app_content_file_collection_response' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../device_app_management' +require_relative '../../../../../mobile_apps' +require_relative '../../../../item' +require_relative '../../../graph_windows_mobile_m_s_i' +require_relative '../../content_versions' +require_relative '../item' +require_relative './count/count_request_builder' +require_relative './files' +require_relative './item/mobile_app_content_file_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsMobileMSI + module ContentVersions + module Item + module Files + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + class FilesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsMobileMSI::ContentVersions::Item::Files::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + ## @param mobile_app_content_file_id The unique identifier of mobileAppContentFile + ## @return a mobile_app_content_file_item_request_builder + ## + def by_mobile_app_content_file_id(mobile_app_content_file_id) + raise StandardError, 'mobile_app_content_file_id cannot be null' if mobile_app_content_file_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppContentFile%2Did"] = mobile_app_content_file_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsMobileMSI::ContentVersions::Item::Files::Item::MobileAppContentFileItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new FilesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/files{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFileCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to files for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to files for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a files_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return FilesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of files for this app content version. + class FilesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/commit/commit.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/commit/commit.rb new file mode 100644 index 0000000000..b61410499d --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/commit/commit.rb @@ -0,0 +1 @@ +require_relative 'commit_post_request_body' diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/commit/commit_post_request_body.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/commit/commit_post_request_body.rb new file mode 100644 index 0000000000..eeb8c06681 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/commit/commit_post_request_body.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/file_encryption_info' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_windows_mobile_m_s_i' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './commit' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsMobileMSI + module ContentVersions + module Item + module Files + module Item + module Commit + class CommitPostRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The fileEncryptionInfo property + @file_encryption_info + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new CommitPostRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a commit_post_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CommitPostRequestBody.new + end + ## + ## Gets the fileEncryptionInfo property value. The fileEncryptionInfo property + ## @return a file_encryption_info + ## + def file_encryption_info + return @file_encryption_info + end + ## + ## Sets the fileEncryptionInfo property value. The fileEncryptionInfo property + ## @param value Value to set for the fileEncryptionInfo property. + ## @return a void + ## + def file_encryption_info=(value) + @file_encryption_info = value + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "fileEncryptionInfo" => lambda {|n| @file_encryption_info = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::FileEncryptionInfo.create_from_discriminator_value(pn) }) }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_object_value("fileEncryptionInfo", @file_encryption_info) + writer.write_additional_data(@additional_data) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/commit/commit_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/commit/commit_request_builder.rb new file mode 100644 index 0000000000..3d9a8f4f7f --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/commit/commit_request_builder.rb @@ -0,0 +1,91 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_windows_mobile_m_s_i' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './commit' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsMobileMSI + module ContentVersions + module Item + module Files + module Item + module Commit + ## + # Provides operations to call the commit method. + class CommitRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CommitRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit") + end + ## + ## Commits a file of a given app. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Commits a file of a given app. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a commit_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CommitRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/calendar_view/item/extensions/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/item.rb similarity index 100% rename from lib/me/calendars/item/calendar_view/item/extensions/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb new file mode 100644 index 0000000000..cd7f931e7f --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb @@ -0,0 +1,190 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/mobile_app_content_file' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_windows_mobile_m_s_i' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../files' +require_relative './commit/commit_request_builder' +require_relative './item' +require_relative './renew_upload/renew_upload_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsMobileMSI + module ContentVersions + module Item + module Files + module Item + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + class MobileAppContentFileItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to call the commit method. + def commit() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsMobileMSI::ContentVersions::Item::Files::Item::Commit::CommitRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to call the renewUpload method. + def renew_upload() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsMobileMSI::ContentVersions::Item::Files::Item::RenewUpload::RenewUploadRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property files for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property files in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property files for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property files in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_content_file_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppContentFileItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of files for this app content version. + class MobileAppContentFileItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_view/item/dismiss_reminder/dismiss_reminder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/renew_upload/renew_upload.rb similarity index 100% rename from lib/me/calendar_view/item/dismiss_reminder/dismiss_reminder.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/renew_upload/renew_upload.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb new file mode 100644 index 0000000000..4cd3cc09e7 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb @@ -0,0 +1,86 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_windows_mobile_m_s_i' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './renew_upload' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsMobileMSI + module ContentVersions + module Item + module Files + module Item + module RenewUpload + ## + # Provides operations to call the renewUpload method. + class RenewUploadRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new RenewUploadRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload") + end + ## + ## Renews the SAS URI for an application file upload. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(request_configuration=nil) + request_info = self.to_post_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Renews the SAS URI for an application file upload. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a renew_upload_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RenewUploadRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/calendar_view/item/instances/item/attachments/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/item.rb similarity index 100% rename from lib/me/calendars/item/calendar_view/item/instances/item/attachments/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/mobile_app_content_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/mobile_app_content_item_request_builder.rb new file mode 100644 index 0000000000..f99dd4e309 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/content_versions/item/mobile_app_content_item_request_builder.rb @@ -0,0 +1,184 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_content' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_windows_mobile_m_s_i' +require_relative '../content_versions' +require_relative './contained_apps/contained_apps_request_builder' +require_relative './files/files_request_builder' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsMobileMSI + module ContentVersions + module Item + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + class MobileAppContentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + def contained_apps() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsMobileMSI::ContentVersions::Item::ContainedApps::ContainedAppsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + def files() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsMobileMSI::ContentVersions::Item::Files::FilesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI/contentVersions/{mobileAppContent%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property contentVersions for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property contentVersions in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property contentVersions for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property contentVersions in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_content_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppContentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of content versions for this app. + class MobileAppContentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_view/item/extensions/extensions.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/graph_windows_mobile_m_s_i.rb similarity index 100% rename from lib/me/calendar_view/item/extensions/extensions.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/graph_windows_mobile_m_s_i.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/graph_windows_mobile_m_s_i_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/graph_windows_mobile_m_s_i_request_builder.rb new file mode 100644 index 0000000000..610f2b6742 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_mobile_m_s_i/graph_windows_mobile_m_s_i_request_builder.rb @@ -0,0 +1,119 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../../models/windows_mobile_m_s_i' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../item' +require_relative './assignments/assignments_request_builder' +require_relative './categories/categories_request_builder' +require_relative './content_versions/content_versions_request_builder' +require_relative './graph_windows_mobile_m_s_i' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsMobileMSI + ## + # Casts the previous resource to windowsMobileMSI. + class GraphWindowsMobileMSIRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + def assignments() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsMobileMSI::Assignments::AssignmentsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + def categories() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsMobileMSI::Categories::CategoriesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + def content_versions() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsMobileMSI::ContentVersions::ContentVersionsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphWindowsMobileMSIRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsMobileMSI{?%24expand,%24select}") + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.windowsMobileMSI + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of windows_mobile_m_s_i + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsMobileMSI.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.windowsMobileMSI + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_windows_mobile_m_s_i_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphWindowsMobileMSIRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the item of type microsoft.graph.mobileApp as microsoft.graph.windowsMobileMSI + class GraphWindowsMobileMSIRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_view/item/instances/instances.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/assignments.rb similarity index 100% rename from lib/me/calendar_view/item/instances/instances.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/assignments.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/assignments_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/assignments_request_builder.rb new file mode 100644 index 0000000000..b714ecff0f --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/assignments_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_assignment' +require_relative '../../../../../models/mobile_app_assignment_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_windows_universal_app_x' +require_relative './assignments' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_assignment_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsUniversalAppX + module Assignments + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class AssignmentsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsUniversalAppX::Assignments::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_assignment_id The unique identifier of mobileAppAssignment + ## @return a mobile_app_assignment_item_request_builder + ## + def by_mobile_app_assignment_id(mobile_app_assignment_id) + raise StandardError, 'mobile_app_assignment_id cannot be null' if mobile_app_assignment_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsUniversalAppX::Assignments::Item::MobileAppAssignmentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new AssignmentsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class AssignmentsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/count/count.rb similarity index 100% rename from lib/me/chats/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/count/count_request_builder.rb new file mode 100644 index 0000000000..f69d4eb311 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_windows_universal_app_x' +require_relative '../assignments' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsUniversalAppX + module Assignments + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/assignments/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/calendar_view/item/instances/item/extensions/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/item/item.rb similarity index 100% rename from lib/me/calendars/item/calendar_view/item/instances/item/extensions/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/item/mobile_app_assignment_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/item/mobile_app_assignment_item_request_builder.rb new file mode 100644 index 0000000000..6fac7ce14f --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/assignments/item/mobile_app_assignment_item_request_builder.rb @@ -0,0 +1,172 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_assignment' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_windows_universal_app_x' +require_relative '../assignments' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsUniversalAppX + module Assignments + module Item + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class MobileAppAssignmentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/assignments/{mobileAppAssignment%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class MobileAppAssignmentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_view/item/instances/item/attachments/attachments.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/categories.rb similarity index 100% rename from lib/me/calendar_view/item/instances/item/attachments/attachments.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/categories.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/categories_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/categories_request_builder.rb new file mode 100644 index 0000000000..e1b20fa6da --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/categories_request_builder.rb @@ -0,0 +1,152 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_category_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_windows_universal_app_x' +require_relative './categories' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_category_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsUniversalAppX + module Categories + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class CategoriesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsUniversalAppX::Categories::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_category_id The unique identifier of mobileAppCategory + ## @return a mobile_app_category_item_request_builder + ## + def by_mobile_app_category_id(mobile_app_category_id) + raise StandardError, 'mobile_app_category_id cannot be null' if mobile_app_category_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsUniversalAppX::Categories::Item::MobileAppCategoryItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new CategoriesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/categories{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategoryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a categories_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CategoriesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class CategoriesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/installed_apps/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/count/count.rb similarity index 100% rename from lib/me/chats/item/installed_apps/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/count/count_request_builder.rb new file mode 100644 index 0000000000..605f993d3b --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_windows_universal_app_x' +require_relative '../categories' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsUniversalAppX + module Categories + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/categories/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/calendar_view/item/instances/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/item/item.rb similarity index 100% rename from lib/me/calendars/item/calendar_view/item/instances/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/item/mobile_app_category_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/item/mobile_app_category_item_request_builder.rb new file mode 100644 index 0000000000..07b8f58083 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/categories/item/mobile_app_category_item_request_builder.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_category' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_windows_universal_app_x' +require_relative '../categories' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsUniversalAppX + module Categories + module Item + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class MobileAppCategoryItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/categories/{mobileAppCategory%2Did}{?%24expand,%24select}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategory.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_category_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppCategoryItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class MobileAppCategoryItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_view/item/instances/item/calendar/calendar.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/committed_contained_apps.rb similarity index 100% rename from lib/me/calendar_view/item/instances/item/calendar/calendar.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/committed_contained_apps.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/committed_contained_apps_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/committed_contained_apps_request_builder.rb new file mode 100644 index 0000000000..f4be70057d --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/committed_contained_apps_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_contained_app' +require_relative '../../../../../models/mobile_contained_app_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_windows_universal_app_x' +require_relative './committed_contained_apps' +require_relative './count/count_request_builder' +require_relative './item/mobile_contained_app_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsUniversalAppX + module CommittedContainedApps + ## + # Provides operations to manage the committedContainedApps property of the microsoft.graph.windowsUniversalAppX entity. + class CommittedContainedAppsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsUniversalAppX::CommittedContainedApps::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the committedContainedApps property of the microsoft.graph.windowsUniversalAppX entity. + ## @param mobile_contained_app_id The unique identifier of mobileContainedApp + ## @return a mobile_contained_app_item_request_builder + ## + def by_mobile_contained_app_id(mobile_contained_app_id) + raise StandardError, 'mobile_contained_app_id cannot be null' if mobile_contained_app_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileContainedApp%2Did"] = mobile_contained_app_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsUniversalAppX::CommittedContainedApps::Item::MobileContainedAppItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new CommittedContainedAppsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/committedContainedApps{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The collection of contained apps in the committed mobileAppContent of a windowsUniversalAppX app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to committedContainedApps for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The collection of contained apps in the committed mobileAppContent of a windowsUniversalAppX app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to committedContainedApps for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a committed_contained_apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CommittedContainedAppsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of contained apps in the committed mobileAppContent of a windowsUniversalAppX app. + class CommittedContainedAppsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/members/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/count/count.rb similarity index 100% rename from lib/me/chats/item/members/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/count/count_request_builder.rb new file mode 100644 index 0000000000..45cc82cf62 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_windows_universal_app_x' +require_relative '../committed_contained_apps' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsUniversalAppX + module CommittedContainedApps + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/committedContainedApps/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/calendar_view/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/item/item.rb similarity index 100% rename from lib/me/calendars/item/calendar_view/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/item/mobile_contained_app_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/item/mobile_contained_app_item_request_builder.rb new file mode 100644 index 0000000000..57c512bc18 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/committed_contained_apps/item/mobile_contained_app_item_request_builder.rb @@ -0,0 +1,172 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_contained_app' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_windows_universal_app_x' +require_relative '../committed_contained_apps' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsUniversalAppX + module CommittedContainedApps + module Item + ## + # Provides operations to manage the committedContainedApps property of the microsoft.graph.windowsUniversalAppX entity. + class MobileContainedAppItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/committedContainedApps/{mobileContainedApp%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property committedContainedApps for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The collection of contained apps in the committed mobileAppContent of a windowsUniversalAppX app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property committedContainedApps in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property committedContainedApps for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The collection of contained apps in the committed mobileAppContent of a windowsUniversalAppX app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property committedContainedApps in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_contained_app_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileContainedAppItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of contained apps in the committed mobileAppContent of a windowsUniversalAppX app. + class MobileContainedAppItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/content_versions.rb similarity index 100% rename from lib/me/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/content_versions.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/content_versions_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/content_versions_request_builder.rb new file mode 100644 index 0000000000..ce31e27c3e --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/content_versions_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_content' +require_relative '../../../../../models/mobile_app_content_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_windows_universal_app_x' +require_relative './content_versions' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_content_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsUniversalAppX + module ContentVersions + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + class ContentVersionsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsUniversalAppX::ContentVersions::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + ## @param mobile_app_content_id The unique identifier of mobileAppContent + ## @return a mobile_app_content_item_request_builder + ## + def by_mobile_app_content_id(mobile_app_content_id) + raise StandardError, 'mobile_app_content_id cannot be null' if mobile_app_content_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppContent%2Did"] = mobile_app_content_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsUniversalAppX::ContentVersions::Item::MobileAppContentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new ContentVersionsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to contentVersions for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to contentVersions for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a content_versions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContentVersionsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of content versions for this app. + class ContentVersionsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/messages/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/count/count.rb similarity index 100% rename from lib/me/chats/item/messages/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/count/count_request_builder.rb new file mode 100644 index 0000000000..7761d14895 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_windows_universal_app_x' +require_relative '../content_versions' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsUniversalAppX + module ContentVersions + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendar_view/item/instances/item/extensions/extensions.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/contained_apps.rb similarity index 100% rename from lib/me/calendar_view/item/instances/item/extensions/extensions.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/contained_apps.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/contained_apps_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/contained_apps_request_builder.rb new file mode 100644 index 0000000000..feef831c50 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/contained_apps_request_builder.rb @@ -0,0 +1,194 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/mobile_contained_app' +require_relative '../../../../../../../models/mobile_contained_app_collection_response' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../device_app_management' +require_relative '../../../../../mobile_apps' +require_relative '../../../../item' +require_relative '../../../graph_windows_universal_app_x' +require_relative '../../content_versions' +require_relative '../item' +require_relative './contained_apps' +require_relative './count/count_request_builder' +require_relative './item/mobile_contained_app_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsUniversalAppX + module ContentVersions + module Item + module ContainedApps + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + class ContainedAppsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsUniversalAppX::ContentVersions::Item::ContainedApps::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + ## @param mobile_contained_app_id The unique identifier of mobileContainedApp + ## @return a mobile_contained_app_item_request_builder + ## + def by_mobile_contained_app_id(mobile_contained_app_id) + raise StandardError, 'mobile_contained_app_id cannot be null' if mobile_contained_app_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileContainedApp%2Did"] = mobile_contained_app_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsUniversalAppX::ContentVersions::Item::ContainedApps::Item::MobileContainedAppItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new ContainedAppsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/containedApps{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to containedApps for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to containedApps for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a contained_apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContainedAppsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of contained apps in a MobileLobApp acting as a package. + class ContainedAppsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/messages/item/hosted_contents/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/count/count.rb similarity index 100% rename from lib/me/chats/item/messages/item/hosted_contents/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/count/count_request_builder.rb new file mode 100644 index 0000000000..be939ce037 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/count/count_request_builder.rb @@ -0,0 +1,112 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_windows_universal_app_x' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../contained_apps' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsUniversalAppX + module ContentVersions + module Item + module ContainedApps + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/containedApps/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/events/item/attachments/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/item/item.rb similarity index 100% rename from lib/me/calendars/item/events/item/attachments/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb new file mode 100644 index 0000000000..97c5488536 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/contained_apps/item/mobile_contained_app_item_request_builder.rb @@ -0,0 +1,178 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/mobile_contained_app' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_windows_universal_app_x' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../contained_apps' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsUniversalAppX + module ContentVersions + module Item + module ContainedApps + module Item + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + class MobileContainedAppItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileContainedAppItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/containedApps/{mobileContainedApp%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property containedApps for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property containedApps in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_contained_app + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileContainedApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property containedApps for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The collection of contained apps in a MobileLobApp acting as a package. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property containedApps in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_contained_app_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileContainedAppItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of contained apps in a MobileLobApp acting as a package. + class MobileContainedAppItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/messages/item/replies/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/count/count.rb similarity index 100% rename from lib/me/chats/item/messages/item/replies/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/count/count_request_builder.rb new file mode 100644 index 0000000000..e43c235ad9 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/count/count_request_builder.rb @@ -0,0 +1,112 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_windows_universal_app_x' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../files' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsUniversalAppX + module ContentVersions + module Item + module Files + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/files/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/calendars.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/files.rb similarity index 100% rename from lib/me/calendars/calendars.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/files.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/files_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/files_request_builder.rb new file mode 100644 index 0000000000..2c1826c046 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/files_request_builder.rb @@ -0,0 +1,194 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/mobile_app_content_file' +require_relative '../../../../../../../models/mobile_app_content_file_collection_response' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../device_app_management' +require_relative '../../../../../mobile_apps' +require_relative '../../../../item' +require_relative '../../../graph_windows_universal_app_x' +require_relative '../../content_versions' +require_relative '../item' +require_relative './count/count_request_builder' +require_relative './files' +require_relative './item/mobile_app_content_file_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsUniversalAppX + module ContentVersions + module Item + module Files + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + class FilesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsUniversalAppX::ContentVersions::Item::Files::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + ## @param mobile_app_content_file_id The unique identifier of mobileAppContentFile + ## @return a mobile_app_content_file_item_request_builder + ## + def by_mobile_app_content_file_id(mobile_app_content_file_id) + raise StandardError, 'mobile_app_content_file_id cannot be null' if mobile_app_content_file_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppContentFile%2Did"] = mobile_app_content_file_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsUniversalAppX::ContentVersions::Item::Files::Item::MobileAppContentFileItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new FilesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/files{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFileCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to files for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to files for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a files_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return FilesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of files for this app content version. + class FilesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/commit/commit.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/commit/commit.rb new file mode 100644 index 0000000000..b61410499d --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/commit/commit.rb @@ -0,0 +1 @@ +require_relative 'commit_post_request_body' diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/commit/commit_post_request_body.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/commit/commit_post_request_body.rb new file mode 100644 index 0000000000..162f94b5fd --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/commit/commit_post_request_body.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/file_encryption_info' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_windows_universal_app_x' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './commit' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsUniversalAppX + module ContentVersions + module Item + module Files + module Item + module Commit + class CommitPostRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The fileEncryptionInfo property + @file_encryption_info + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new CommitPostRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a commit_post_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CommitPostRequestBody.new + end + ## + ## Gets the fileEncryptionInfo property value. The fileEncryptionInfo property + ## @return a file_encryption_info + ## + def file_encryption_info + return @file_encryption_info + end + ## + ## Sets the fileEncryptionInfo property value. The fileEncryptionInfo property + ## @param value Value to set for the fileEncryptionInfo property. + ## @return a void + ## + def file_encryption_info=(value) + @file_encryption_info = value + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "fileEncryptionInfo" => lambda {|n| @file_encryption_info = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::FileEncryptionInfo.create_from_discriminator_value(pn) }) }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_object_value("fileEncryptionInfo", @file_encryption_info) + writer.write_additional_data(@additional_data) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/commit/commit_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/commit/commit_request_builder.rb new file mode 100644 index 0000000000..d179e340f8 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/commit/commit_request_builder.rb @@ -0,0 +1,91 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_windows_universal_app_x' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './commit' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsUniversalAppX + module ContentVersions + module Item + module Files + module Item + module Commit + ## + # Provides operations to call the commit method. + class CommitRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CommitRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/commit") + end + ## + ## Commits a file of a given app. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Commits a file of a given app. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a commit_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CommitRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/events/item/extensions/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/item.rb similarity index 100% rename from lib/me/calendars/item/events/item/extensions/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb new file mode 100644 index 0000000000..3a21aabc47 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/mobile_app_content_file_item_request_builder.rb @@ -0,0 +1,190 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/mobile_app_content_file' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_app_management' +require_relative '../../../../../../mobile_apps' +require_relative '../../../../../item' +require_relative '../../../../graph_windows_universal_app_x' +require_relative '../../../content_versions' +require_relative '../../item' +require_relative '../files' +require_relative './commit/commit_request_builder' +require_relative './item' +require_relative './renew_upload/renew_upload_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsUniversalAppX + module ContentVersions + module Item + module Files + module Item + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + class MobileAppContentFileItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to call the commit method. + def commit() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsUniversalAppX::ContentVersions::Item::Files::Item::Commit::CommitRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to call the renewUpload method. + def renew_upload() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsUniversalAppX::ContentVersions::Item::Files::Item::RenewUpload::RenewUploadRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new MobileAppContentFileItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property files for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property files in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content_file + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContentFile.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property files for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of files for this app content version. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property files in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_content_file_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppContentFileItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of files for this app content version. + class MobileAppContentFileItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/calendar_permissions/calendar_permissions.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/renew_upload/renew_upload.rb similarity index 100% rename from lib/me/calendars/item/calendar_permissions/calendar_permissions.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/renew_upload/renew_upload.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb new file mode 100644 index 0000000000..59ed6d1001 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/files/item/renew_upload/renew_upload_request_builder.rb @@ -0,0 +1,86 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../device_app_management' +require_relative '../../../../../../../mobile_apps' +require_relative '../../../../../../item' +require_relative '../../../../../graph_windows_universal_app_x' +require_relative '../../../../content_versions' +require_relative '../../../item' +require_relative '../../files' +require_relative '../item' +require_relative './renew_upload' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsUniversalAppX + module ContentVersions + module Item + module Files + module Item + module RenewUpload + ## + # Provides operations to call the renewUpload method. + class RenewUploadRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new RenewUploadRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}/files/{mobileAppContentFile%2Did}/renewUpload") + end + ## + ## Renews the SAS URI for an application file upload. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(request_configuration=nil) + request_info = self.to_post_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Renews the SAS URI for an application file upload. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a renew_upload_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RenewUploadRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/events/item/instances/item/attachments/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/item.rb similarity index 100% rename from lib/me/calendars/item/events/item/instances/item/attachments/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/mobile_app_content_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/mobile_app_content_item_request_builder.rb new file mode 100644 index 0000000000..566b8a5593 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/content_versions/item/mobile_app_content_item_request_builder.rb @@ -0,0 +1,184 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_content' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_windows_universal_app_x' +require_relative '../content_versions' +require_relative './contained_apps/contained_apps_request_builder' +require_relative './files/files_request_builder' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsUniversalAppX + module ContentVersions + module Item + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + class MobileAppContentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the containedApps property of the microsoft.graph.mobileAppContent entity. + def contained_apps() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsUniversalAppX::ContentVersions::Item::ContainedApps::ContainedAppsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the files property of the microsoft.graph.mobileAppContent entity. + def files() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsUniversalAppX::ContentVersions::Item::Files::FilesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new MobileAppContentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX/contentVersions/{mobileAppContent%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property contentVersions for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property contentVersions in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_content + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppContent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property contentVersions for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of content versions for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property contentVersions in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_content_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppContentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of content versions for this app. + class MobileAppContentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/calendar_view/calendar_view.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/graph_windows_universal_app_x.rb similarity index 100% rename from lib/me/calendars/item/calendar_view/calendar_view.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/graph_windows_universal_app_x.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/graph_windows_universal_app_x_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/graph_windows_universal_app_x_request_builder.rb new file mode 100644 index 0000000000..478a519d8b --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_universal_app_x/graph_windows_universal_app_x_request_builder.rb @@ -0,0 +1,125 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../../models/windows_universal_app_x' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../item' +require_relative './assignments/assignments_request_builder' +require_relative './categories/categories_request_builder' +require_relative './committed_contained_apps/committed_contained_apps_request_builder' +require_relative './content_versions/content_versions_request_builder' +require_relative './graph_windows_universal_app_x' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsUniversalAppX + ## + # Casts the previous resource to windowsUniversalAppX. + class GraphWindowsUniversalAppXRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + def assignments() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsUniversalAppX::Assignments::AssignmentsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + def categories() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsUniversalAppX::Categories::CategoriesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the committedContainedApps property of the microsoft.graph.windowsUniversalAppX entity. + def committed_contained_apps() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsUniversalAppX::CommittedContainedApps::CommittedContainedAppsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the contentVersions property of the microsoft.graph.mobileLobApp entity. + def content_versions() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsUniversalAppX::ContentVersions::ContentVersionsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphWindowsUniversalAppXRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsUniversalAppX{?%24expand,%24select}") + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.windowsUniversalAppX + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of windows_universal_app_x + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsUniversalAppX.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.windowsUniversalAppX + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_windows_universal_app_x_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphWindowsUniversalAppXRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the item of type microsoft.graph.mobileApp as microsoft.graph.windowsUniversalAppX + class GraphWindowsUniversalAppXRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/calendar_view/item/attachments/attachments.rb b/lib/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/assignments.rb similarity index 100% rename from lib/me/calendars/item/calendar_view/item/attachments/attachments.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/assignments.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/assignments_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/assignments_request_builder.rb new file mode 100644 index 0000000000..ba4f08be20 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/assignments_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_assignment' +require_relative '../../../../../models/mobile_app_assignment_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_windows_web_app' +require_relative './assignments' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_assignment_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsWebApp + module Assignments + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class AssignmentsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsWebApp::Assignments::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_assignment_id The unique identifier of mobileAppAssignment + ## @return a mobile_app_assignment_item_request_builder + ## + def by_mobile_app_assignment_id(mobile_app_assignment_id) + raise StandardError, 'mobile_app_assignment_id cannot be null' if mobile_app_assignment_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppAssignment%2Did"] = mobile_app_assignment_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsWebApp::Assignments::Item::MobileAppAssignmentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new AssignmentsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to assignments for deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class AssignmentsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/messages/item/replies/item/hosted_contents/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/count/count.rb similarity index 100% rename from lib/me/chats/item/messages/item/replies/item/hosted_contents/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/count/count_request_builder.rb new file mode 100644 index 0000000000..85c4279531 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_windows_web_app' +require_relative '../assignments' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsWebApp + module Assignments + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/assignments/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/events/item/instances/item/extensions/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/item/item.rb similarity index 100% rename from lib/me/calendars/item/events/item/instances/item/extensions/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/item/mobile_app_assignment_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/item/mobile_app_assignment_item_request_builder.rb new file mode 100644 index 0000000000..7a37ef434e --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_web_app/assignments/item/mobile_app_assignment_item_request_builder.rb @@ -0,0 +1,172 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_assignment' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_windows_web_app' +require_relative '../assignments' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsWebApp + module Assignments + module Item + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + class MobileAppAssignmentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppAssignmentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/assignments/{mobileAppAssignment%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_assignment + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property assignments for deviceAppManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The list of group assignments for this mobile app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property assignments in deviceAppManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of group assignments for this mobile app. + class MobileAppAssignmentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/calendar_view/item/calendar/calendar.rb b/lib/device_app_management/mobile_apps/item/graph_windows_web_app/categories/categories.rb similarity index 100% rename from lib/me/calendars/item/calendar_view/item/calendar/calendar.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_web_app/categories/categories.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_web_app/categories/categories_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_web_app/categories/categories_request_builder.rb new file mode 100644 index 0000000000..83688784a4 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_web_app/categories/categories_request_builder.rb @@ -0,0 +1,152 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/mobile_app_category_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_app_management' +require_relative '../../../mobile_apps' +require_relative '../../item' +require_relative '../graph_windows_web_app' +require_relative './categories' +require_relative './count/count_request_builder' +require_relative './item/mobile_app_category_item_request_builder' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsWebApp + module Categories + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class CategoriesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsWebApp::Categories::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + ## @param mobile_app_category_id The unique identifier of mobileAppCategory + ## @return a mobile_app_category_item_request_builder + ## + def by_mobile_app_category_id(mobile_app_category_id) + raise StandardError, 'mobile_app_category_id cannot be null' if mobile_app_category_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["mobileAppCategory%2Did"] = mobile_app_category_id + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsWebApp::Categories::Item::MobileAppCategoryItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new CategoriesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/categories{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategoryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a categories_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CategoriesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class CategoriesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/permission_grants/count/count.rb b/lib/device_app_management/mobile_apps/item/graph_windows_web_app/categories/count/count.rb similarity index 100% rename from lib/me/chats/item/permission_grants/count/count.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_web_app/categories/count/count.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_web_app/categories/count/count_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_web_app/categories/count/count_request_builder.rb new file mode 100644 index 0000000000..e483dfde4c --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_web_app/categories/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_windows_web_app' +require_relative '../categories' +require_relative './count' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsWebApp + module Categories + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/categories/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/events/item/instances/item/item.rb b/lib/device_app_management/mobile_apps/item/graph_windows_web_app/categories/item/item.rb similarity index 100% rename from lib/me/calendars/item/events/item/instances/item/item.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_web_app/categories/item/item.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_web_app/categories/item/mobile_app_category_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_web_app/categories/item/mobile_app_category_item_request_builder.rb new file mode 100644 index 0000000000..f0c6986727 --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_web_app/categories/item/mobile_app_category_item_request_builder.rb @@ -0,0 +1,107 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/mobile_app_category' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_app_management' +require_relative '../../../../mobile_apps' +require_relative '../../../item' +require_relative '../../graph_windows_web_app' +require_relative '../categories' +require_relative './item' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsWebApp + module Categories + module Item + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + class MobileAppCategoryItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MobileAppCategoryItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp/categories/{mobileAppCategory%2Did}{?%24expand,%24select}") + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mobile_app_category + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCategory.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The list of categories for this app. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_category_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppCategoryItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The list of categories for this app. + class MobileAppCategoryItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/calendar_view/item/dismiss_reminder/dismiss_reminder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_web_app/graph_windows_web_app.rb similarity index 100% rename from lib/me/calendars/item/calendar_view/item/dismiss_reminder/dismiss_reminder.rb rename to lib/device_app_management/mobile_apps/item/graph_windows_web_app/graph_windows_web_app.rb diff --git a/lib/device_app_management/mobile_apps/item/graph_windows_web_app/graph_windows_web_app_request_builder.rb b/lib/device_app_management/mobile_apps/item/graph_windows_web_app/graph_windows_web_app_request_builder.rb new file mode 100644 index 0000000000..4e0b99b50a --- /dev/null +++ b/lib/device_app_management/mobile_apps/item/graph_windows_web_app/graph_windows_web_app_request_builder.rb @@ -0,0 +1,113 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../../models/windows_web_app' +require_relative '../../../device_app_management' +require_relative '../../mobile_apps' +require_relative '../item' +require_relative './assignments/assignments_request_builder' +require_relative './categories/categories_request_builder' +require_relative './graph_windows_web_app' + +module MicrosoftGraph + module DeviceAppManagement + module MobileApps + module Item + module GraphWindowsWebApp + ## + # Casts the previous resource to windowsWebApp. + class GraphWindowsWebAppRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the assignments property of the microsoft.graph.mobileApp entity. + def assignments() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsWebApp::Assignments::AssignmentsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the categories property of the microsoft.graph.mobileApp entity. + def categories() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsWebApp::Categories::CategoriesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new GraphWindowsWebAppRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}/graph.windowsWebApp{?%24expand,%24select}") + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.windowsWebApp + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of windows_web_app + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsWebApp.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the item of type microsoft.graph.mobileApp as microsoft.graph.windowsWebApp + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_windows_web_app_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphWindowsWebAppRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the item of type microsoft.graph.mobileApp as microsoft.graph.windowsWebApp + class GraphWindowsWebAppRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/device_app_management/mobile_apps/item/mobile_app_item_request_builder.rb b/lib/device_app_management/mobile_apps/item/mobile_app_item_request_builder.rb index 3532632387..82ba379cde 100644 --- a/lib/device_app_management/mobile_apps/item/mobile_app_item_request_builder.rb +++ b/lib/device_app_management/mobile_apps/item/mobile_app_item_request_builder.rb @@ -7,8 +7,22 @@ require_relative './assign/assign_request_builder' require_relative './assignments/assignments_request_builder' require_relative './categories/categories_request_builder' +require_relative './graph_android_lob_app/graph_android_lob_app_request_builder' +require_relative './graph_android_store_app/graph_android_store_app_request_builder' +require_relative './graph_ios_lob_app/graph_ios_lob_app_request_builder' +require_relative './graph_ios_store_app/graph_ios_store_app_request_builder' +require_relative './graph_ios_vpp_app/graph_ios_vpp_app_request_builder' +require_relative './graph_mac_o_s_dmg_app/graph_mac_o_s_dmg_app_request_builder' +require_relative './graph_mac_o_s_lob_app/graph_mac_o_s_lob_app_request_builder' +require_relative './graph_managed_android_lob_app/graph_managed_android_lob_app_request_builder' +require_relative './graph_managed_i_o_s_lob_app/graph_managed_i_o_s_lob_app_request_builder' require_relative './graph_managed_mobile_lob_app/graph_managed_mobile_lob_app_request_builder' -require_relative './graph_mobile_lob_app/graph_mobile_lob_app_request_builder' +require_relative './graph_microsoft_store_for_business_app/graph_microsoft_store_for_business_app_request_builder' +require_relative './graph_win32_lob_app/graph_win32_lob_app_request_builder' +require_relative './graph_windows_app_x/graph_windows_app_x_request_builder' +require_relative './graph_windows_mobile_m_s_i/graph_windows_mobile_m_s_i_request_builder' +require_relative './graph_windows_universal_app_x/graph_windows_universal_app_x_request_builder' +require_relative './graph_windows_web_app/graph_windows_web_app_request_builder' require_relative './item' module MicrosoftGraph @@ -35,14 +49,84 @@ def categories() return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::Categories::CategoriesRequestBuilder.new(@path_parameters, @request_adapter) end ## + # Casts the previous resource to androidLobApp. + def graph_android_lob_app() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphAndroidLobApp::GraphAndroidLobAppRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to androidStoreApp. + def graph_android_store_app() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphAndroidStoreApp::GraphAndroidStoreAppRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to iosLobApp. + def graph_ios_lob_app() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosLobApp::GraphIosLobAppRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to iosStoreApp. + def graph_ios_store_app() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosStoreApp::GraphIosStoreAppRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to iosVppApp. + def graph_ios_vpp_app() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphIosVppApp::GraphIosVppAppRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to macOSDmgApp. + def graph_mac_o_s_dmg_app() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSDmgApp::GraphMacOSDmgAppRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to macOSLobApp. + def graph_mac_o_s_lob_app() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMacOSLobApp::GraphMacOSLobAppRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to managedAndroidLobApp. + def graph_managed_android_lob_app() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedAndroidLobApp::GraphManagedAndroidLobAppRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to managedIOSLobApp. + def graph_managed_i_o_s_lob_app() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedIOSLobApp::GraphManagedIOSLobAppRequestBuilder.new(@path_parameters, @request_adapter) + end + ## # Casts the previous resource to managedMobileLobApp. def graph_managed_mobile_lob_app() return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphManagedMobileLobApp::GraphManagedMobileLobAppRequestBuilder.new(@path_parameters, @request_adapter) end ## - # Casts the previous resource to mobileLobApp. - def graph_mobile_lob_app() - return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMobileLobApp::GraphMobileLobAppRequestBuilder.new(@path_parameters, @request_adapter) + # Casts the previous resource to microsoftStoreForBusinessApp. + def graph_microsoft_store_for_business_app() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphMicrosoftStoreForBusinessApp::GraphMicrosoftStoreForBusinessAppRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to win32LobApp. + def graph_win32_lob_app() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWin32LobApp::GraphWin32LobAppRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to windowsAppX. + def graph_windows_app_x() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsAppX::GraphWindowsAppXRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to windowsMobileMSI. + def graph_windows_mobile_m_s_i() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsMobileMSI::GraphWindowsMobileMSIRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to windowsUniversalAppX. + def graph_windows_universal_app_x() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsUniversalAppX::GraphWindowsUniversalAppXRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to windowsWebApp. + def graph_windows_web_app() + return MicrosoftGraph::DeviceAppManagement::MobileApps::Item::GraphWindowsWebApp::GraphWindowsWebAppRequestBuilder.new(@path_parameters, @request_adapter) end ## ## Instantiates a new MobileAppItemRequestBuilder and sets the default values. @@ -51,10 +135,10 @@ def graph_mobile_lob_app() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps/{mobileApp%2Did}{?%24expand,%24select}") end ## - ## Deletes a iosLobApp. + ## Deletes a iosiPadOSWebClip. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void ## @@ -63,12 +147,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Read properties and relationships of the windowsMicrosoftEdgeApp object. + ## Read properties and relationships of the iosLobApp object. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of mobile_app ## @@ -77,12 +160,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileApp.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Update the properties of a macOSLobApp object. + ## Update the properties of a iosVppApp object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of mobile_app @@ -93,46 +175,46 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileApp.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Deletes a iosLobApp. + ## Deletes a iosiPadOSWebClip. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Read properties and relationships of the windowsMicrosoftEdgeApp object. + ## Read properties and relationships of the iosLobApp object. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Update the properties of a macOSLobApp object. + ## Update the properties of a iosVppApp object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -140,20 +222,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Read properties and relationships of the windowsMicrosoftEdgeApp object. + # Read properties and relationships of the iosLobApp object. class MobileAppItemRequestBuilderGetQueryParameters ## diff --git a/lib/device_app_management/mobile_apps/mobile_apps_request_builder.rb b/lib/device_app_management/mobile_apps/mobile_apps_request_builder.rb index aa7bf6f5f5..9037161376 100644 --- a/lib/device_app_management/mobile_apps/mobile_apps_request_builder.rb +++ b/lib/device_app_management/mobile_apps/mobile_apps_request_builder.rb @@ -5,8 +5,22 @@ require_relative '../../models/o_data_errors_o_data_error' require_relative '../device_app_management' require_relative './count/count_request_builder' +require_relative './graph_android_lob_app/graph_android_lob_app_request_builder' +require_relative './graph_android_store_app/graph_android_store_app_request_builder' +require_relative './graph_ios_lob_app/graph_ios_lob_app_request_builder' +require_relative './graph_ios_store_app/graph_ios_store_app_request_builder' +require_relative './graph_ios_vpp_app/graph_ios_vpp_app_request_builder' +require_relative './graph_mac_o_s_dmg_app/graph_mac_o_s_dmg_app_request_builder' +require_relative './graph_mac_o_s_lob_app/graph_mac_o_s_lob_app_request_builder' +require_relative './graph_managed_android_lob_app/graph_managed_android_lob_app_request_builder' +require_relative './graph_managed_i_o_s_lob_app/graph_managed_i_o_s_lob_app_request_builder' require_relative './graph_managed_mobile_lob_app/graph_managed_mobile_lob_app_request_builder' -require_relative './graph_mobile_lob_app/graph_mobile_lob_app_request_builder' +require_relative './graph_microsoft_store_for_business_app/graph_microsoft_store_for_business_app_request_builder' +require_relative './graph_win32_lob_app/graph_win32_lob_app_request_builder' +require_relative './graph_windows_app_x/graph_windows_app_x_request_builder' +require_relative './graph_windows_mobile_m_s_i/graph_windows_mobile_m_s_i_request_builder' +require_relative './graph_windows_universal_app_x/graph_windows_universal_app_x_request_builder' +require_relative './graph_windows_web_app/graph_windows_web_app_request_builder' require_relative './item/mobile_app_item_request_builder' require_relative './mobile_apps' @@ -23,14 +37,84 @@ def count() return MicrosoftGraph::DeviceAppManagement::MobileApps::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) end ## + # Casts the previous resource to androidLobApp. + def graph_android_lob_app() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphAndroidLobApp::GraphAndroidLobAppRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to androidStoreApp. + def graph_android_store_app() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphAndroidStoreApp::GraphAndroidStoreAppRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to iosLobApp. + def graph_ios_lob_app() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphIosLobApp::GraphIosLobAppRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to iosStoreApp. + def graph_ios_store_app() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphIosStoreApp::GraphIosStoreAppRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to iosVppApp. + def graph_ios_vpp_app() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphIosVppApp::GraphIosVppAppRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to macOSDmgApp. + def graph_mac_o_s_dmg_app() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphMacOSDmgApp::GraphMacOSDmgAppRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to macOSLobApp. + def graph_mac_o_s_lob_app() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphMacOSLobApp::GraphMacOSLobAppRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to managedAndroidLobApp. + def graph_managed_android_lob_app() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphManagedAndroidLobApp::GraphManagedAndroidLobAppRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to managedIOSLobApp. + def graph_managed_i_o_s_lob_app() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphManagedIOSLobApp::GraphManagedIOSLobAppRequestBuilder.new(@path_parameters, @request_adapter) + end + ## # Casts the previous resource to managedMobileLobApp. def graph_managed_mobile_lob_app() return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphManagedMobileLobApp::GraphManagedMobileLobAppRequestBuilder.new(@path_parameters, @request_adapter) end ## - # Casts the previous resource to mobileLobApp. - def graph_mobile_lob_app() - return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphMobileLobApp::GraphMobileLobAppRequestBuilder.new(@path_parameters, @request_adapter) + # Casts the previous resource to microsoftStoreForBusinessApp. + def graph_microsoft_store_for_business_app() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphMicrosoftStoreForBusinessApp::GraphMicrosoftStoreForBusinessAppRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to win32LobApp. + def graph_win32_lob_app() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphWin32LobApp::GraphWin32LobAppRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to windowsAppX. + def graph_windows_app_x() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphWindowsAppX::GraphWindowsAppXRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to windowsMobileMSI. + def graph_windows_mobile_m_s_i() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphWindowsMobileMSI::GraphWindowsMobileMSIRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to windowsUniversalAppX. + def graph_windows_universal_app_x() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphWindowsUniversalAppX::GraphWindowsUniversalAppXRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Casts the previous resource to windowsWebApp. + def graph_windows_web_app() + return MicrosoftGraph::DeviceAppManagement::MobileApps::GraphWindowsWebApp::GraphWindowsWebAppRequestBuilder.new(@path_parameters, @request_adapter) end ## ## Provides operations to manage the mobileApps property of the microsoft.graph.deviceAppManagement entity. @@ -50,10 +134,10 @@ def by_mobile_app_id(mobile_app_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/mobileApps{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## List properties and relationships of the androidLobApp objects. + ## List properties and relationships of the macOSLobApp objects. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of mobile_app_collection_response ## @@ -62,12 +146,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Create a new microsoftStoreForBusinessApp object. + ## Create a new macOSLobApp object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of mobile_app @@ -78,30 +161,29 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileApp.create_from_discriminator_value(pn) }, error_mapping) end ## - ## List properties and relationships of the androidLobApp objects. + ## List properties and relationships of the macOSLobApp objects. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Create a new microsoftStoreForBusinessApp object. + ## Create a new macOSLobApp object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -109,20 +191,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppsRequestBuilder.new(raw_url, @request_adapter) + end ## - # List properties and relationships of the androidLobApp objects. + # List properties and relationships of the macOSLobApp objects. class MobileAppsRequestBuilderGetQueryParameters ## diff --git a/lib/device_app_management/sync_microsoft_store_for_business_apps/sync_microsoft_store_for_business_apps_request_builder.rb b/lib/device_app_management/sync_microsoft_store_for_business_apps/sync_microsoft_store_for_business_apps_request_builder.rb index 60ef801345..d427c62c7e 100644 --- a/lib/device_app_management/sync_microsoft_store_for_business_apps/sync_microsoft_store_for_business_apps_request_builder.rb +++ b/lib/device_app_management/sync_microsoft_store_for_business_apps/sync_microsoft_store_for_business_apps_request_builder.rb @@ -30,8 +30,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -41,15 +40,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a sync_microsoft_store_for_business_apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SyncMicrosoftStoreForBusinessAppsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_app_management/targeted_managed_app_configurations/count/count_request_builder.rb b/lib/device_app_management/targeted_managed_app_configurations/count/count_request_builder.rb index a4c8d9a234..b9dcee8522 100644 --- a/lib/device_app_management/targeted_managed_app_configurations/count/count_request_builder.rb +++ b/lib/device_app_management/targeted_managed_app_configurations/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/targetedManagedAppConfigurations/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/targetedManagedAppConfigurations/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/targeted_managed_app_configurations/item/apps/apps_request_builder.rb b/lib/device_app_management/targeted_managed_app_configurations/item/apps/apps_request_builder.rb index faf06678ee..d14371db10 100644 --- a/lib/device_app_management/targeted_managed_app_configurations/item/apps/apps_request_builder.rb +++ b/lib/device_app_management/targeted_managed_app_configurations/item/apps/apps_request_builder.rb @@ -42,7 +42,7 @@ def by_managed_mobile_app_id(managed_mobile_app_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/targetedManagedAppConfigurations/{targetedManagedAppConfiguration%2Did}/apps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/targetedManagedAppConfigurations/{targetedManagedAppConfiguration%2Did}/apps{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List of apps to which the policy is deployed. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedMobileAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedMobileApp.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AppsRequestBuilder.new(raw_url, @request_adapter) + end ## # List of apps to which the policy is deployed. diff --git a/lib/device_app_management/targeted_managed_app_configurations/item/apps/count/count_request_builder.rb b/lib/device_app_management/targeted_managed_app_configurations/item/apps/count/count_request_builder.rb index 7c956bb2dc..71adcabf62 100644 --- a/lib/device_app_management/targeted_managed_app_configurations/item/apps/count/count_request_builder.rb +++ b/lib/device_app_management/targeted_managed_app_configurations/item/apps/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/targetedManagedAppConfigurations/{targetedManagedAppConfiguration%2Did}/apps/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/targetedManagedAppConfigurations/{targetedManagedAppConfiguration%2Did}/apps/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/targeted_managed_app_configurations/item/apps/item/managed_mobile_app_item_request_builder.rb b/lib/device_app_management/targeted_managed_app_configurations/item/apps/item/managed_mobile_app_item_request_builder.rb index ded6730643..c52420c692 100644 --- a/lib/device_app_management/targeted_managed_app_configurations/item/apps/item/managed_mobile_app_item_request_builder.rb +++ b/lib/device_app_management/targeted_managed_app_configurations/item/apps/item/managed_mobile_app_item_request_builder.rb @@ -25,7 +25,7 @@ class ManagedMobileAppItemRequestBuilder < MicrosoftKiotaAbstractions::BaseReque ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/targetedManagedAppConfigurations/{targetedManagedAppConfiguration%2Did}/apps/{managedMobileApp%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/targetedManagedAppConfigurations/{targetedManagedAppConfiguration%2Did}/apps/{managedMobileApp%2Did}{?%24expand,%24select}") end ## ## Delete navigation property apps for deviceAppManagement @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedMobileApp.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedMobileApp.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a managed_mobile_app_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagedMobileAppItemRequestBuilder.new(raw_url, @request_adapter) + end ## # List of apps to which the policy is deployed. diff --git a/lib/device_app_management/targeted_managed_app_configurations/item/assign/assign_post_request_body.rb b/lib/device_app_management/targeted_managed_app_configurations/item/assign/assign_post_request_body.rb index 08ff75920f..b6b0238c63 100644 --- a/lib/device_app_management/targeted_managed_app_configurations/item/assign/assign_post_request_body.rb +++ b/lib/device_app_management/targeted_managed_app_configurations/item/assign/assign_post_request_body.rb @@ -20,15 +20,15 @@ class AssignPostRequestBody # The assignments property @assignments ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -50,7 +50,7 @@ def assignments=(value) @assignments = value end ## - ## Instantiates a new assignPostRequestBody and sets the default values. + ## Instantiates a new AssignPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_app_management/targeted_managed_app_configurations/item/assign/assign_request_builder.rb b/lib/device_app_management/targeted_managed_app_configurations/item/assign/assign_request_builder.rb index 807ff5fd22..94cf105741 100644 --- a/lib/device_app_management/targeted_managed_app_configurations/item/assign/assign_request_builder.rb +++ b/lib/device_app_management/targeted_managed_app_configurations/item/assign/assign_request_builder.rb @@ -36,8 +36,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assign_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_app_management/targeted_managed_app_configurations/item/assignments/assignments_request_builder.rb b/lib/device_app_management/targeted_managed_app_configurations/item/assignments/assignments_request_builder.rb index 4f0ff60246..8e376015c6 100644 --- a/lib/device_app_management/targeted_managed_app_configurations/item/assignments/assignments_request_builder.rb +++ b/lib/device_app_management/targeted_managed_app_configurations/item/assignments/assignments_request_builder.rb @@ -42,7 +42,7 @@ def by_targeted_managed_app_policy_assignment_id(targeted_managed_app_policy_ass ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/targetedManagedAppConfigurations/{targetedManagedAppConfiguration%2Did}/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/targetedManagedAppConfigurations/{targetedManagedAppConfiguration%2Did}/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Navigation property to list of inclusion and exclusion groups to which the policy is deployed. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TargetedManagedAppPolicyAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TargetedManagedAppPolicyAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end ## # Navigation property to list of inclusion and exclusion groups to which the policy is deployed. diff --git a/lib/device_app_management/targeted_managed_app_configurations/item/assignments/count/count_request_builder.rb b/lib/device_app_management/targeted_managed_app_configurations/item/assignments/count/count_request_builder.rb index 44387851d0..6a49516911 100644 --- a/lib/device_app_management/targeted_managed_app_configurations/item/assignments/count/count_request_builder.rb +++ b/lib/device_app_management/targeted_managed_app_configurations/item/assignments/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/targetedManagedAppConfigurations/{targetedManagedAppConfiguration%2Did}/assignments/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/targetedManagedAppConfigurations/{targetedManagedAppConfiguration%2Did}/assignments/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/targeted_managed_app_configurations/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.rb b/lib/device_app_management/targeted_managed_app_configurations/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.rb index 01d4a42b76..badc874529 100644 --- a/lib/device_app_management/targeted_managed_app_configurations/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.rb +++ b/lib/device_app_management/targeted_managed_app_configurations/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.rb @@ -25,7 +25,7 @@ class TargetedManagedAppPolicyAssignmentItemRequestBuilder < MicrosoftKiotaAbstr ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/targetedManagedAppConfigurations/{targetedManagedAppConfiguration%2Did}/assignments/{targetedManagedAppPolicyAssignment%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/targetedManagedAppConfigurations/{targetedManagedAppConfiguration%2Did}/assignments/{targetedManagedAppPolicyAssignment%2Did}{?%24expand,%24select}") end ## ## Delete navigation property assignments for deviceAppManagement @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TargetedManagedAppPolicyAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TargetedManagedAppPolicyAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a targeted_managed_app_policy_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TargetedManagedAppPolicyAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Navigation property to list of inclusion and exclusion groups to which the policy is deployed. diff --git a/lib/device_app_management/targeted_managed_app_configurations/item/deployment_summary/deployment_summary_request_builder.rb b/lib/device_app_management/targeted_managed_app_configurations/item/deployment_summary/deployment_summary_request_builder.rb index 19eb53007e..dc48057d17 100644 --- a/lib/device_app_management/targeted_managed_app_configurations/item/deployment_summary/deployment_summary_request_builder.rb +++ b/lib/device_app_management/targeted_managed_app_configurations/item/deployment_summary/deployment_summary_request_builder.rb @@ -23,7 +23,7 @@ class DeploymentSummaryRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestB ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/targetedManagedAppConfigurations/{targetedManagedAppConfiguration%2Did}/deploymentSummary{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/targetedManagedAppConfigurations/{targetedManagedAppConfiguration%2Did}/deploymentSummary{?%24expand,%24select}") end ## ## Delete navigation property deploymentSummary for deviceAppManagement @@ -35,8 +35,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppPolicyDeploymentSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -65,8 +63,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedAppPolicyDeploymentSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,13 +73,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -92,15 +90,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,17 +110,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a deployment_summary_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeploymentSummaryRequestBuilder.new(raw_url, @request_adapter) + end ## # Navigation property to deployment summary of the configuration. diff --git a/lib/device_app_management/targeted_managed_app_configurations/item/target_apps/target_apps_post_request_body.rb b/lib/device_app_management/targeted_managed_app_configurations/item/target_apps/target_apps_post_request_body.rb index a212b85a27..27f25491c6 100644 --- a/lib/device_app_management/targeted_managed_app_configurations/item/target_apps/target_apps_post_request_body.rb +++ b/lib/device_app_management/targeted_managed_app_configurations/item/target_apps/target_apps_post_request_body.rb @@ -24,15 +24,15 @@ class TargetAppsPostRequestBody # The apps property @apps ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -69,7 +69,7 @@ def apps=(value) @apps = value end ## - ## Instantiates a new targetAppsPostRequestBody and sets the default values. + ## Instantiates a new TargetAppsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_app_management/targeted_managed_app_configurations/item/target_apps/target_apps_request_builder.rb b/lib/device_app_management/targeted_managed_app_configurations/item/target_apps/target_apps_request_builder.rb index 3d95d4f7c3..53bd787567 100644 --- a/lib/device_app_management/targeted_managed_app_configurations/item/target_apps/target_apps_request_builder.rb +++ b/lib/device_app_management/targeted_managed_app_configurations/item/target_apps/target_apps_request_builder.rb @@ -36,8 +36,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a target_apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TargetAppsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_app_management/targeted_managed_app_configurations/item/targeted_managed_app_configuration_item_request_builder.rb b/lib/device_app_management/targeted_managed_app_configurations/item/targeted_managed_app_configuration_item_request_builder.rb index 28b73b689d..a1505d9100 100644 --- a/lib/device_app_management/targeted_managed_app_configurations/item/targeted_managed_app_configuration_item_request_builder.rb +++ b/lib/device_app_management/targeted_managed_app_configurations/item/targeted_managed_app_configuration_item_request_builder.rb @@ -51,7 +51,7 @@ def target_apps() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/targetedManagedAppConfigurations/{targetedManagedAppConfiguration%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/targetedManagedAppConfigurations/{targetedManagedAppConfiguration%2Did}{?%24expand,%24select}") end ## ## Deletes a targetedManagedAppConfiguration. @@ -63,8 +63,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -77,8 +76,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TargetedManagedAppConfiguration.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -93,8 +91,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TargetedManagedAppConfiguration.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -104,13 +101,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -120,15 +118,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -140,17 +138,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a targeted_managed_app_configuration_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TargetedManagedAppConfigurationItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the targetedManagedAppConfiguration object. diff --git a/lib/device_app_management/targeted_managed_app_configurations/targeted_managed_app_configurations_request_builder.rb b/lib/device_app_management/targeted_managed_app_configurations/targeted_managed_app_configurations_request_builder.rb index 551c485432..23c2a687eb 100644 --- a/lib/device_app_management/targeted_managed_app_configurations/targeted_managed_app_configurations_request_builder.rb +++ b/lib/device_app_management/targeted_managed_app_configurations/targeted_managed_app_configurations_request_builder.rb @@ -38,7 +38,7 @@ def by_targeted_managed_app_configuration_id(targeted_managed_app_configuration_ ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/targetedManagedAppConfigurations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/targetedManagedAppConfigurations{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the targetedManagedAppConfiguration objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TargetedManagedAppConfigurationCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TargetedManagedAppConfiguration.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a targeted_managed_app_configurations_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TargetedManagedAppConfigurationsRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the targetedManagedAppConfiguration objects. diff --git a/lib/device_app_management/vpp_tokens/count/count_request_builder.rb b/lib/device_app_management/vpp_tokens/count/count_request_builder.rb index ccffc68539..3ccf340c88 100644 --- a/lib/device_app_management/vpp_tokens/count/count_request_builder.rb +++ b/lib/device_app_management/vpp_tokens/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/vppTokens/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/vppTokens/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/vpp_tokens/item/sync_licenses/sync_licenses_request_builder.rb b/lib/device_app_management/vpp_tokens/item/sync_licenses/sync_licenses_request_builder.rb index 26fa6f40f6..8faf79abd7 100644 --- a/lib/device_app_management/vpp_tokens/item/sync_licenses/sync_licenses_request_builder.rb +++ b/lib/device_app_management/vpp_tokens/item/sync_licenses/sync_licenses_request_builder.rb @@ -35,8 +35,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::VppToken.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -46,16 +45,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a sync_licenses_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SyncLicensesRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_app_management/vpp_tokens/item/vpp_token_item_request_builder.rb b/lib/device_app_management/vpp_tokens/item/vpp_token_item_request_builder.rb index 234f91d12a..1a948b6e6c 100644 --- a/lib/device_app_management/vpp_tokens/item/vpp_token_item_request_builder.rb +++ b/lib/device_app_management/vpp_tokens/item/vpp_token_item_request_builder.rb @@ -27,7 +27,7 @@ def sync_licenses() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/vppTokens/{vppToken%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/vppTokens/{vppToken%2Did}{?%24expand,%24select}") end ## ## Deletes a vppToken. @@ -39,8 +39,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -53,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::VppToken.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -69,8 +67,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::VppToken.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -80,13 +77,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -96,15 +94,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -116,17 +114,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a vpp_token_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return VppTokenItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the vppToken object. diff --git a/lib/device_app_management/vpp_tokens/vpp_tokens_request_builder.rb b/lib/device_app_management/vpp_tokens/vpp_tokens_request_builder.rb index 93038cd0cf..fd258281ab 100644 --- a/lib/device_app_management/vpp_tokens/vpp_tokens_request_builder.rb +++ b/lib/device_app_management/vpp_tokens/vpp_tokens_request_builder.rb @@ -38,7 +38,7 @@ def by_vpp_token_id(vpp_token_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/vppTokens{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/vppTokens{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the vppToken objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::VppTokenCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::VppToken.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a vpp_tokens_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return VppTokensRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the vppToken objects. diff --git a/lib/device_app_management/windows_information_protection_policies/count/count_request_builder.rb b/lib/device_app_management/windows_information_protection_policies/count/count_request_builder.rb index 03ec6b74a8..9df084f754 100644 --- a/lib/device_app_management/windows_information_protection_policies/count/count_request_builder.rb +++ b/lib/device_app_management/windows_information_protection_policies/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/windows_information_protection_policies/item/assignments/assignments_request_builder.rb b/lib/device_app_management/windows_information_protection_policies/item/assignments/assignments_request_builder.rb index afb5020786..4b98053163 100644 --- a/lib/device_app_management/windows_information_protection_policies/item/assignments/assignments_request_builder.rb +++ b/lib/device_app_management/windows_information_protection_policies/item/assignments/assignments_request_builder.rb @@ -42,7 +42,7 @@ def by_targeted_managed_app_policy_assignment_id(targeted_managed_app_policy_ass ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Navigation property to list of security groups targeted for policy. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TargetedManagedAppPolicyAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TargetedManagedAppPolicyAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end ## # Navigation property to list of security groups targeted for policy. diff --git a/lib/device_app_management/windows_information_protection_policies/item/assignments/count/count_request_builder.rb b/lib/device_app_management/windows_information_protection_policies/item/assignments/count/count_request_builder.rb index 8a3d872adc..c3a15e02f3 100644 --- a/lib/device_app_management/windows_information_protection_policies/item/assignments/count/count_request_builder.rb +++ b/lib/device_app_management/windows_information_protection_policies/item/assignments/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/assignments/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/assignments/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/windows_information_protection_policies/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.rb b/lib/device_app_management/windows_information_protection_policies/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.rb index aebb171966..7bde7aed6f 100644 --- a/lib/device_app_management/windows_information_protection_policies/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.rb +++ b/lib/device_app_management/windows_information_protection_policies/item/assignments/item/targeted_managed_app_policy_assignment_item_request_builder.rb @@ -25,7 +25,7 @@ class TargetedManagedAppPolicyAssignmentItemRequestBuilder < MicrosoftKiotaAbstr ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/assignments/{targetedManagedAppPolicyAssignment%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/assignments/{targetedManagedAppPolicyAssignment%2Did}{?%24expand,%24select}") end ## ## Delete navigation property assignments for deviceAppManagement @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TargetedManagedAppPolicyAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TargetedManagedAppPolicyAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a targeted_managed_app_policy_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TargetedManagedAppPolicyAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Navigation property to list of security groups targeted for policy. diff --git a/lib/device_app_management/windows_information_protection_policies/item/exempt_app_locker_files/count/count_request_builder.rb b/lib/device_app_management/windows_information_protection_policies/item/exempt_app_locker_files/count/count_request_builder.rb index 71b8190af9..8760bc8317 100644 --- a/lib/device_app_management/windows_information_protection_policies/item/exempt_app_locker_files/count/count_request_builder.rb +++ b/lib/device_app_management/windows_information_protection_policies/item/exempt_app_locker_files/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/exemptAppLockerFiles/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/exemptAppLockerFiles/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/windows_information_protection_policies/item/exempt_app_locker_files/exempt_app_locker_files_request_builder.rb b/lib/device_app_management/windows_information_protection_policies/item/exempt_app_locker_files/exempt_app_locker_files_request_builder.rb index 1f09e3d2ae..ded03a4863 100644 --- a/lib/device_app_management/windows_information_protection_policies/item/exempt_app_locker_files/exempt_app_locker_files_request_builder.rb +++ b/lib/device_app_management/windows_information_protection_policies/item/exempt_app_locker_files/exempt_app_locker_files_request_builder.rb @@ -42,10 +42,10 @@ def by_windows_information_protection_app_locker_file_id(windows_information_pro ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/exemptAppLockerFiles{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/exemptAppLockerFiles{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Another way to input exempt apps through xml files + ## List properties and relationships of the windowsInformationProtectionAppLockerFile objects. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of windows_information_protection_app_locker_file_collection_response ## @@ -54,12 +54,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionAppLockerFileCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Create new navigation property to exemptAppLockerFiles for deviceAppManagement + ## Create a new windowsInformationProtectionAppLockerFile object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of windows_information_protection_app_locker_file @@ -70,30 +69,29 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionAppLockerFile.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Another way to input exempt apps through xml files + ## List properties and relationships of the windowsInformationProtectionAppLockerFile objects. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Create new navigation property to exemptAppLockerFiles for deviceAppManagement + ## Create a new windowsInformationProtectionAppLockerFile object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -101,20 +99,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a exempt_app_locker_files_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ExemptAppLockerFilesRequestBuilder.new(raw_url, @request_adapter) + end ## - # Another way to input exempt apps through xml files + # List properties and relationships of the windowsInformationProtectionAppLockerFile objects. class ExemptAppLockerFilesRequestBuilderGetQueryParameters ## diff --git a/lib/device_app_management/windows_information_protection_policies/item/exempt_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.rb b/lib/device_app_management/windows_information_protection_policies/item/exempt_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.rb index a111f1cc1a..f55fd36fab 100644 --- a/lib/device_app_management/windows_information_protection_policies/item/exempt_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.rb +++ b/lib/device_app_management/windows_information_protection_policies/item/exempt_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.rb @@ -25,10 +25,10 @@ class WindowsInformationProtectionAppLockerFileItemRequestBuilder < MicrosoftKio ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/exemptAppLockerFiles/{windowsInformationProtectionAppLockerFile%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/exemptAppLockerFiles/{windowsInformationProtectionAppLockerFile%2Did}{?%24expand,%24select}") end ## - ## Delete navigation property exemptAppLockerFiles for deviceAppManagement + ## Deletes a windowsInformationProtectionAppLockerFile. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void ## @@ -37,12 +37,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Another way to input exempt apps through xml files + ## Read properties and relationships of the windowsInformationProtectionAppLockerFile object. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of windows_information_protection_app_locker_file ## @@ -51,12 +50,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionAppLockerFile.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Update the navigation property exemptAppLockerFiles in deviceAppManagement + ## Update the properties of a windowsInformationProtectionAppLockerFile object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of windows_information_protection_app_locker_file @@ -67,46 +65,46 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionAppLockerFile.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Delete navigation property exemptAppLockerFiles for deviceAppManagement + ## Deletes a windowsInformationProtectionAppLockerFile. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Another way to input exempt apps through xml files + ## Read properties and relationships of the windowsInformationProtectionAppLockerFile object. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Update the navigation property exemptAppLockerFiles in deviceAppManagement + ## Update the properties of a windowsInformationProtectionAppLockerFile object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -114,20 +112,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a windows_information_protection_app_locker_file_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return WindowsInformationProtectionAppLockerFileItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Another way to input exempt apps through xml files + # Read properties and relationships of the windowsInformationProtectionAppLockerFile object. class WindowsInformationProtectionAppLockerFileItemRequestBuilderGetQueryParameters ## diff --git a/lib/device_app_management/windows_information_protection_policies/item/protected_app_locker_files/count/count_request_builder.rb b/lib/device_app_management/windows_information_protection_policies/item/protected_app_locker_files/count/count_request_builder.rb index 97c889ae1e..5a8c383ade 100644 --- a/lib/device_app_management/windows_information_protection_policies/item/protected_app_locker_files/count/count_request_builder.rb +++ b/lib/device_app_management/windows_information_protection_policies/item/protected_app_locker_files/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/protectedAppLockerFiles/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/protectedAppLockerFiles/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_app_management/windows_information_protection_policies/item/protected_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.rb b/lib/device_app_management/windows_information_protection_policies/item/protected_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.rb index e9cda569f1..8a4dc3ea11 100644 --- a/lib/device_app_management/windows_information_protection_policies/item/protected_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.rb +++ b/lib/device_app_management/windows_information_protection_policies/item/protected_app_locker_files/item/windows_information_protection_app_locker_file_item_request_builder.rb @@ -25,7 +25,7 @@ class WindowsInformationProtectionAppLockerFileItemRequestBuilder < MicrosoftKio ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/protectedAppLockerFiles/{windowsInformationProtectionAppLockerFile%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/protectedAppLockerFiles/{windowsInformationProtectionAppLockerFile%2Did}{?%24expand,%24select}") end ## ## Delete navigation property protectedAppLockerFiles for deviceAppManagement @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionAppLockerFile.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionAppLockerFile.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a windows_information_protection_app_locker_file_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return WindowsInformationProtectionAppLockerFileItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Another way to input protected apps through xml files diff --git a/lib/device_app_management/windows_information_protection_policies/item/protected_app_locker_files/protected_app_locker_files_request_builder.rb b/lib/device_app_management/windows_information_protection_policies/item/protected_app_locker_files/protected_app_locker_files_request_builder.rb index 8e6191c150..f1c3b7c85f 100644 --- a/lib/device_app_management/windows_information_protection_policies/item/protected_app_locker_files/protected_app_locker_files_request_builder.rb +++ b/lib/device_app_management/windows_information_protection_policies/item/protected_app_locker_files/protected_app_locker_files_request_builder.rb @@ -42,7 +42,7 @@ def by_windows_information_protection_app_locker_file_id(windows_information_pro ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/protectedAppLockerFiles{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}/protectedAppLockerFiles{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Another way to input protected apps through xml files @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionAppLockerFileCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionAppLockerFile.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a protected_app_locker_files_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ProtectedAppLockerFilesRequestBuilder.new(raw_url, @request_adapter) + end ## # Another way to input protected apps through xml files diff --git a/lib/device_app_management/windows_information_protection_policies/item/windows_information_protection_policy_item_request_builder.rb b/lib/device_app_management/windows_information_protection_policies/item/windows_information_protection_policy_item_request_builder.rb index 5057caf48b..059b7b0713 100644 --- a/lib/device_app_management/windows_information_protection_policies/item/windows_information_protection_policy_item_request_builder.rb +++ b/lib/device_app_management/windows_information_protection_policies/item/windows_information_protection_policy_item_request_builder.rb @@ -39,7 +39,7 @@ def protected_app_locker_files() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies/{windowsInformationProtectionPolicy%2Did}{?%24expand,%24select}") end ## ## Deletes a windowsInformationProtectionPolicy. @@ -51,8 +51,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -65,8 +64,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionPolicy.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,8 +79,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionPolicy.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -92,13 +89,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -108,15 +106,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -128,17 +126,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a windows_information_protection_policy_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return WindowsInformationProtectionPolicyItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the windowsInformationProtectionPolicy object. diff --git a/lib/device_app_management/windows_information_protection_policies/windows_information_protection_policies_request_builder.rb b/lib/device_app_management/windows_information_protection_policies/windows_information_protection_policies_request_builder.rb index 6585c9b65f..ea0fac44a1 100644 --- a/lib/device_app_management/windows_information_protection_policies/windows_information_protection_policies_request_builder.rb +++ b/lib/device_app_management/windows_information_protection_policies/windows_information_protection_policies_request_builder.rb @@ -38,7 +38,7 @@ def by_windows_information_protection_policy_id(windows_information_protection_p ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceAppManagement/windowsInformationProtectionPolicies{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the windowsInformationProtectionPolicy objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionPolicyCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionPolicy.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a windows_information_protection_policies_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return WindowsInformationProtectionPoliciesRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the windowsInformationProtectionPolicy objects. diff --git a/lib/device_management/apple_push_notification_certificate/apple_push_notification_certificate_request_builder.rb b/lib/device_management/apple_push_notification_certificate/apple_push_notification_certificate_request_builder.rb index 96567b4459..61881e4c31 100644 --- a/lib/device_management/apple_push_notification_certificate/apple_push_notification_certificate_request_builder.rb +++ b/lib/device_management/apple_push_notification_certificate/apple_push_notification_certificate_request_builder.rb @@ -25,7 +25,7 @@ def download_apple_push_notification_certificate_signing_request() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/applePushNotificationCertificate{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/applePushNotificationCertificate{?%24expand,%24select}") end ## ## Delete navigation property applePushNotificationCertificate for deviceManagement @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ApplePushNotificationCertificate.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ApplePushNotificationCertificate.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a apple_push_notification_certificate_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ApplePushNotificationCertificateRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the applePushNotificationCertificate object. diff --git a/lib/device_management/apple_push_notification_certificate/download_apple_push_notification_certificate_signing_request/download_apple_push_notification_certificate_signing_request.rb b/lib/device_management/apple_push_notification_certificate/download_apple_push_notification_certificate_signing_request/download_apple_push_notification_certificate_signing_request.rb index f52678333c..4c732f2c3d 100644 --- a/lib/device_management/apple_push_notification_certificate/download_apple_push_notification_certificate_signing_request/download_apple_push_notification_certificate_signing_request.rb +++ b/lib/device_management/apple_push_notification_certificate/download_apple_push_notification_certificate_signing_request/download_apple_push_notification_certificate_signing_request.rb @@ -1 +1 @@ -require_relative 'download_apple_push_notification_certificate_signing_request_response' +require_relative 'download_apple_push_notification_certificate_signing_request_get_response' diff --git a/lib/device_management/apple_push_notification_certificate/download_apple_push_notification_certificate_signing_request/download_apple_push_notification_certificate_signing_request_get_response.rb b/lib/device_management/apple_push_notification_certificate/download_apple_push_notification_certificate_signing_request/download_apple_push_notification_certificate_signing_request_get_response.rb new file mode 100644 index 0000000000..2574995bbb --- /dev/null +++ b/lib/device_management/apple_push_notification_certificate/download_apple_push_notification_certificate_signing_request/download_apple_push_notification_certificate_signing_request_get_response.rb @@ -0,0 +1,88 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../device_management' +require_relative '../apple_push_notification_certificate' +require_relative './download_apple_push_notification_certificate_signing_request' + +module MicrosoftGraph + module DeviceManagement + module ApplePushNotificationCertificate + module DownloadApplePushNotificationCertificateSigningRequest + class DownloadApplePushNotificationCertificateSigningRequestGetResponse + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The value property + @value + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new DownloadApplePushNotificationCertificateSigningRequestGetResponse and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a download_apple_push_notification_certificate_signing_request_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return DownloadApplePushNotificationCertificateSigningRequestGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "value" => lambda {|n| @value = n.get_string_value() }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_string_value("value", @value) + writer.write_additional_data(@additional_data) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/device_management/apple_push_notification_certificate/download_apple_push_notification_certificate_signing_request/download_apple_push_notification_certificate_signing_request_request_builder.rb b/lib/device_management/apple_push_notification_certificate/download_apple_push_notification_certificate_signing_request/download_apple_push_notification_certificate_signing_request_request_builder.rb index 576c1af66c..8e6655a55e 100644 --- a/lib/device_management/apple_push_notification_certificate/download_apple_push_notification_certificate_signing_request/download_apple_push_notification_certificate_signing_request_request_builder.rb +++ b/lib/device_management/apple_push_notification_certificate/download_apple_push_notification_certificate_signing_request/download_apple_push_notification_certificate_signing_request_request_builder.rb @@ -25,16 +25,15 @@ def initialize(path_parameters, request_adapter) ## ## Download Apple push notification certificate signing request ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of download_apple_push_notification_certificate_signing_request_response + ## @return a Fiber of download_apple_push_notification_certificate_signing_request_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceManagement::ApplePushNotificationCertificate::DownloadApplePushNotificationCertificateSigningRequest::DownloadApplePushNotificationCertificateSigningRequestResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceManagement::ApplePushNotificationCertificate::DownloadApplePushNotificationCertificateSigningRequest::DownloadApplePushNotificationCertificateSigningRequestGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Download Apple push notification certificate signing request @@ -43,16 +42,25 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a download_apple_push_notification_certificate_signing_request_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DownloadApplePushNotificationCertificateSigningRequestRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/apple_push_notification_certificate/download_apple_push_notification_certificate_signing_request/download_apple_push_notification_certificate_signing_request_response.rb b/lib/device_management/apple_push_notification_certificate/download_apple_push_notification_certificate_signing_request/download_apple_push_notification_certificate_signing_request_response.rb deleted file mode 100644 index 99b751f1e0..0000000000 --- a/lib/device_management/apple_push_notification_certificate/download_apple_push_notification_certificate_signing_request/download_apple_push_notification_certificate_signing_request_response.rb +++ /dev/null @@ -1,88 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../device_management' -require_relative '../apple_push_notification_certificate' -require_relative './download_apple_push_notification_certificate_signing_request' - -module MicrosoftGraph - module DeviceManagement - module ApplePushNotificationCertificate - module DownloadApplePushNotificationCertificateSigningRequest - class DownloadApplePushNotificationCertificateSigningRequestResponse - include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable - ## - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - @additional_data - ## - # The value property - @value - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @return a i_dictionary - ## - def additional_data - return @additional_data - end - ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. - ## @return a void - ## - def additional_data=(value) - @additional_data = value - end - ## - ## Instantiates a new downloadApplePushNotificationCertificateSigningRequestResponse and sets the default values. - ## @return a void - ## - def initialize() - @additional_data = Hash.new - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a download_apple_push_notification_certificate_signing_request_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return DownloadApplePushNotificationCertificateSigningRequestResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return { - "value" => lambda {|n| @value = n.get_string_value() }, - } - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_string_value("value", @value) - writer.write_additional_data(@additional_data) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/device_management/audit_events/audit_events_request_builder.rb b/lib/device_management/audit_events/audit_events_request_builder.rb index 6a8ce05a03..3c32e5bb77 100644 --- a/lib/device_management/audit_events/audit_events_request_builder.rb +++ b/lib/device_management/audit_events/audit_events_request_builder.rb @@ -45,7 +45,7 @@ def by_audit_event_id(audit_event_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/auditEvents{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/auditEvents{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the auditEvent objects. @@ -57,8 +57,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AuditEventCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -82,8 +81,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AuditEvent.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -93,15 +91,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -113,17 +111,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a audit_events_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AuditEventsRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the auditEvent objects. diff --git a/lib/device_management/audit_events/count/count_request_builder.rb b/lib/device_management/audit_events/count/count_request_builder.rb index 09501c49f2..e41543003d 100644 --- a/lib/device_management/audit_events/count/count_request_builder.rb +++ b/lib/device_management/audit_events/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/auditEvents/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/auditEvents/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category.rb b/lib/device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category.rb index 577306ad27..55b46640ab 100644 --- a/lib/device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category.rb +++ b/lib/device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category.rb @@ -1 +1 @@ -require_relative 'get_audit_activity_types_with_category_response' +require_relative 'get_audit_activity_types_with_category_get_response' diff --git a/lib/device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category_get_response.rb b/lib/device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category_get_response.rb new file mode 100644 index 0000000000..73363cc5dc --- /dev/null +++ b/lib/device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category_get_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../device_management' +require_relative '../audit_events' +require_relative './get_audit_activity_types_with_category' + +module MicrosoftGraph + module DeviceManagement + module AuditEvents + module GetAuditActivityTypesWithCategory + class GetAuditActivityTypesWithCategoryGetResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetAuditActivityTypesWithCategoryGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_audit_activity_types_with_category_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetAuditActivityTypesWithCategoryGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category_request_builder.rb b/lib/device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category_request_builder.rb index aaa0cda9b1..4bd849fcfa 100644 --- a/lib/device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category_request_builder.rb +++ b/lib/device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category_request_builder.rb @@ -21,21 +21,20 @@ class GetAuditActivityTypesWithCategoryRequestBuilder < MicrosoftKiotaAbstractio ## @return a void ## def initialize(path_parameters, request_adapter, category=nil) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/auditEvents/getAuditActivityTypes(category='{category}'){?%24top,%24skip,%24search,%24filter,%24count}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/auditEvents/getAuditActivityTypes(category='{category}'){?%24count,%24filter,%24search,%24skip,%24top}") end ## ## Invoke function getAuditActivityTypes ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_audit_activity_types_with_category_response + ## @return a Fiber of get_audit_activity_types_with_category_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceManagement::AuditEvents::GetAuditActivityTypesWithCategory::GetAuditActivityTypesWithCategoryResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceManagement::AuditEvents::GetAuditActivityTypesWithCategory::GetAuditActivityTypesWithCategoryGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Invoke function getAuditActivityTypes @@ -44,17 +43,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_audit_activity_types_with_category_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetAuditActivityTypesWithCategoryRequestBuilder.new(raw_url, @request_adapter) + end ## # Invoke function getAuditActivityTypes diff --git a/lib/device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category_response.rb b/lib/device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category_response.rb deleted file mode 100644 index ed291bade9..0000000000 --- a/lib/device_management/audit_events/get_audit_activity_types_with_category/get_audit_activity_types_with_category_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../device_management' -require_relative '../audit_events' -require_relative './get_audit_activity_types_with_category' - -module MicrosoftGraph - module DeviceManagement - module AuditEvents - module GetAuditActivityTypesWithCategory - class GetAuditActivityTypesWithCategoryResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getAuditActivityTypesWithCategoryResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_audit_activity_types_with_category_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetAuditActivityTypesWithCategoryResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/device_management/audit_events/get_audit_categories/get_audit_categories.rb b/lib/device_management/audit_events/get_audit_categories/get_audit_categories.rb index 61c8733215..5b49d7efb7 100644 --- a/lib/device_management/audit_events/get_audit_categories/get_audit_categories.rb +++ b/lib/device_management/audit_events/get_audit_categories/get_audit_categories.rb @@ -1 +1 @@ -require_relative 'get_audit_categories_response' +require_relative 'get_audit_categories_get_response' diff --git a/lib/device_management/audit_events/get_audit_categories/get_audit_categories_get_response.rb b/lib/device_management/audit_events/get_audit_categories/get_audit_categories_get_response.rb new file mode 100644 index 0000000000..7d78f7deb8 --- /dev/null +++ b/lib/device_management/audit_events/get_audit_categories/get_audit_categories_get_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../device_management' +require_relative '../audit_events' +require_relative './get_audit_categories' + +module MicrosoftGraph + module DeviceManagement + module AuditEvents + module GetAuditCategories + class GetAuditCategoriesGetResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetAuditCategoriesGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_audit_categories_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetAuditCategoriesGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/device_management/audit_events/get_audit_categories/get_audit_categories_request_builder.rb b/lib/device_management/audit_events/get_audit_categories/get_audit_categories_request_builder.rb index 5ac773c7c9..0751bf2574 100644 --- a/lib/device_management/audit_events/get_audit_categories/get_audit_categories_request_builder.rb +++ b/lib/device_management/audit_events/get_audit_categories/get_audit_categories_request_builder.rb @@ -20,43 +20,51 @@ class GetAuditCategoriesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequest ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/auditEvents/getAuditCategories(){?%24top,%24skip,%24search,%24filter,%24count}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/auditEvents/getAuditCategories(){?%24count,%24filter,%24search,%24skip,%24top}") end ## - ## Invoke function getAuditCategories + ## Not yet documented ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_audit_categories_response + ## @return a Fiber of get_audit_categories_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceManagement::AuditEvents::GetAuditCategories::GetAuditCategoriesResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceManagement::AuditEvents::GetAuditCategories::GetAuditCategoriesGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Invoke function getAuditCategories + ## Not yet documented ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_audit_categories_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetAuditCategoriesRequestBuilder.new(raw_url, @request_adapter) + end ## - # Invoke function getAuditCategories + # Not yet documented class GetAuditCategoriesRequestBuilderGetQueryParameters ## diff --git a/lib/device_management/audit_events/get_audit_categories/get_audit_categories_response.rb b/lib/device_management/audit_events/get_audit_categories/get_audit_categories_response.rb deleted file mode 100644 index 660382f62d..0000000000 --- a/lib/device_management/audit_events/get_audit_categories/get_audit_categories_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../device_management' -require_relative '../audit_events' -require_relative './get_audit_categories' - -module MicrosoftGraph - module DeviceManagement - module AuditEvents - module GetAuditCategories - class GetAuditCategoriesResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getAuditCategoriesResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_audit_categories_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetAuditCategoriesResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/device_management/audit_events/item/audit_event_item_request_builder.rb b/lib/device_management/audit_events/item/audit_event_item_request_builder.rb index af5e6255a4..4112b40fe6 100644 --- a/lib/device_management/audit_events/item/audit_event_item_request_builder.rb +++ b/lib/device_management/audit_events/item/audit_event_item_request_builder.rb @@ -21,7 +21,7 @@ class AuditEventItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuil ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/auditEvents/{auditEvent%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/auditEvents/{auditEvent%2Did}{?%24expand,%24select}") end ## ## Deletes a auditEvent. @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AuditEvent.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AuditEvent.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a audit_event_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AuditEventItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the auditEvent object. diff --git a/lib/device_management/compliance_management_partners/compliance_management_partners_request_builder.rb b/lib/device_management/compliance_management_partners/compliance_management_partners_request_builder.rb index 08ae776e70..d355088a42 100644 --- a/lib/device_management/compliance_management_partners/compliance_management_partners_request_builder.rb +++ b/lib/device_management/compliance_management_partners/compliance_management_partners_request_builder.rb @@ -38,7 +38,7 @@ def by_compliance_management_partner_id(compliance_management_partner_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/complianceManagementPartners{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/complianceManagementPartners{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the complianceManagementPartner objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ComplianceManagementPartnerCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ComplianceManagementPartner.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a compliance_management_partners_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ComplianceManagementPartnersRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the complianceManagementPartner objects. diff --git a/lib/device_management/compliance_management_partners/count/count_request_builder.rb b/lib/device_management/compliance_management_partners/count/count_request_builder.rb index 17c3b0f4f3..6ed36ad02a 100644 --- a/lib/device_management/compliance_management_partners/count/count_request_builder.rb +++ b/lib/device_management/compliance_management_partners/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/complianceManagementPartners/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/complianceManagementPartners/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/compliance_management_partners/item/compliance_management_partner_item_request_builder.rb b/lib/device_management/compliance_management_partners/item/compliance_management_partner_item_request_builder.rb index 261c4f08a4..c0ac024868 100644 --- a/lib/device_management/compliance_management_partners/item/compliance_management_partner_item_request_builder.rb +++ b/lib/device_management/compliance_management_partners/item/compliance_management_partner_item_request_builder.rb @@ -21,7 +21,7 @@ class ComplianceManagementPartnerItemRequestBuilder < MicrosoftKiotaAbstractions ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/complianceManagementPartners/{complianceManagementPartner%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/complianceManagementPartners/{complianceManagementPartner%2Did}{?%24expand,%24select}") end ## ## Deletes a complianceManagementPartner. @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ComplianceManagementPartner.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ComplianceManagementPartner.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a compliance_management_partner_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ComplianceManagementPartnerItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the complianceManagementPartner object. diff --git a/lib/device_management/conditional_access_settings/conditional_access_settings_request_builder.rb b/lib/device_management/conditional_access_settings/conditional_access_settings_request_builder.rb index 66d63f4815..5280a75964 100644 --- a/lib/device_management/conditional_access_settings/conditional_access_settings_request_builder.rb +++ b/lib/device_management/conditional_access_settings/conditional_access_settings_request_builder.rb @@ -19,7 +19,7 @@ class ConditionalAccessSettingsRequestBuilder < MicrosoftKiotaAbstractions::Base ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/conditionalAccessSettings{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/conditionalAccessSettings{?%24expand,%24select}") end ## ## Delete navigation property conditionalAccessSettings for deviceManagement @@ -31,8 +31,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,8 +44,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::OnPremisesConditionalAccessSettings.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -61,8 +59,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::OnPremisesConditionalAccessSettings.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -72,13 +69,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -88,15 +86,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -108,17 +106,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a conditional_access_settings_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ConditionalAccessSettingsRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the onPremisesConditionalAccessSettings object. diff --git a/lib/device_management/detected_apps/count/count_request_builder.rb b/lib/device_management/detected_apps/count/count_request_builder.rb index ab09e49c42..3e4b962197 100644 --- a/lib/device_management/detected_apps/count/count_request_builder.rb +++ b/lib/device_management/detected_apps/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/detectedApps/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/detectedApps/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/detected_apps/detected_apps_request_builder.rb b/lib/device_management/detected_apps/detected_apps_request_builder.rb index 4f2bb3705c..4f28d92428 100644 --- a/lib/device_management/detected_apps/detected_apps_request_builder.rb +++ b/lib/device_management/detected_apps/detected_apps_request_builder.rb @@ -38,7 +38,7 @@ def by_detected_app_id(detected_app_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/detectedApps{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/detectedApps{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the detectedApp objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DetectedAppCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DetectedApp.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a detected_apps_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DetectedAppsRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the detectedApp objects. diff --git a/lib/device_management/detected_apps/item/detected_app_item_request_builder.rb b/lib/device_management/detected_apps/item/detected_app_item_request_builder.rb index 0d27526423..b9794d14ab 100644 --- a/lib/device_management/detected_apps/item/detected_app_item_request_builder.rb +++ b/lib/device_management/detected_apps/item/detected_app_item_request_builder.rb @@ -27,7 +27,7 @@ def managed_devices() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/detectedApps/{detectedApp%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/detectedApps/{detectedApp%2Did}{?%24expand,%24select}") end ## ## Deletes a detectedApp. @@ -39,8 +39,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -53,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DetectedApp.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -69,8 +67,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DetectedApp.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -80,13 +77,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -96,15 +94,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -116,17 +114,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a detected_app_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DetectedAppItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the detectedApp object. diff --git a/lib/device_management/detected_apps/item/managed_devices/count/count_request_builder.rb b/lib/device_management/detected_apps/item/managed_devices/count/count_request_builder.rb index f60a072953..2d92166d04 100644 --- a/lib/device_management/detected_apps/item/managed_devices/count/count_request_builder.rb +++ b/lib/device_management/detected_apps/item/managed_devices/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/detectedApps/{detectedApp%2Did}/managedDevices/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/detectedApps/{detectedApp%2Did}/managedDevices/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/detected_apps/item/managed_devices/item/managed_device_item_request_builder.rb b/lib/device_management/detected_apps/item/managed_devices/item/managed_device_item_request_builder.rb index 2e66120f34..b497678c37 100644 --- a/lib/device_management/detected_apps/item/managed_devices/item/managed_device_item_request_builder.rb +++ b/lib/device_management/detected_apps/item/managed_devices/item/managed_device_item_request_builder.rb @@ -25,7 +25,7 @@ class ManagedDeviceItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestB ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/detectedApps/{detectedApp%2Did}/managedDevices/{managedDevice%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/detectedApps/{detectedApp%2Did}/managedDevices/{managedDevice%2Did}{?%24expand,%24select}") end ## ## The devices that have the discovered application installed @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDevice.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a managed_device_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagedDeviceItemRequestBuilder.new(raw_url, @request_adapter) + end ## # The devices that have the discovered application installed diff --git a/lib/device_management/detected_apps/item/managed_devices/managed_devices_request_builder.rb b/lib/device_management/detected_apps/item/managed_devices/managed_devices_request_builder.rb index ff38ed8c96..34fad2e081 100644 --- a/lib/device_management/detected_apps/item/managed_devices/managed_devices_request_builder.rb +++ b/lib/device_management/detected_apps/item/managed_devices/managed_devices_request_builder.rb @@ -41,7 +41,7 @@ def by_managed_device_id(managed_device_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/detectedApps/{detectedApp%2Did}/managedDevices{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/detectedApps/{detectedApp%2Did}/managedDevices{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## The devices that have the discovered application installed @@ -53,8 +53,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDeviceCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -64,17 +63,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a managed_devices_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagedDevicesRequestBuilder.new(raw_url, @request_adapter) + end ## # The devices that have the discovered application installed diff --git a/lib/device_management/device_categories/count/count_request_builder.rb b/lib/device_management/device_categories/count/count_request_builder.rb index 412dde9839..a2fb6d747b 100644 --- a/lib/device_management/device_categories/count/count_request_builder.rb +++ b/lib/device_management/device_categories/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCategories/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCategories/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/device_categories/device_categories_request_builder.rb b/lib/device_management/device_categories/device_categories_request_builder.rb index 4d649e9c94..b80f8294ce 100644 --- a/lib/device_management/device_categories/device_categories_request_builder.rb +++ b/lib/device_management/device_categories/device_categories_request_builder.rb @@ -38,7 +38,7 @@ def by_device_category_id(device_category_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCategories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCategories{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the deviceCategory objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCategoryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCategory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_categories_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceCategoriesRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the deviceCategory objects. diff --git a/lib/device_management/device_categories/item/device_category_item_request_builder.rb b/lib/device_management/device_categories/item/device_category_item_request_builder.rb index 96215c09a2..70495a4f7f 100644 --- a/lib/device_management/device_categories/item/device_category_item_request_builder.rb +++ b/lib/device_management/device_categories/item/device_category_item_request_builder.rb @@ -21,7 +21,7 @@ class DeviceCategoryItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequest ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCategories/{deviceCategory%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCategories/{deviceCategory%2Did}{?%24expand,%24select}") end ## ## Deletes a deviceCategory. @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCategory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCategory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_category_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceCategoryItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the deviceCategory object. diff --git a/lib/device_management/device_compliance_policies/count/count_request_builder.rb b/lib/device_management/device_compliance_policies/count/count_request_builder.rb index 5e3ed501c7..0f4efe491c 100644 --- a/lib/device_management/device_compliance_policies/count/count_request_builder.rb +++ b/lib/device_management/device_compliance_policies/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/device_compliance_policies/device_compliance_policies_request_builder.rb b/lib/device_management/device_compliance_policies/device_compliance_policies_request_builder.rb index 80cc0a4bb9..6397eeffb9 100644 --- a/lib/device_management/device_compliance_policies/device_compliance_policies_request_builder.rb +++ b/lib/device_management/device_compliance_policies/device_compliance_policies_request_builder.rb @@ -38,10 +38,10 @@ def by_device_compliance_policy_id(device_compliance_policy_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## List properties and relationships of the deviceCompliancePolicy objects. + ## List properties and relationships of the macOSCompliancePolicy objects. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of device_compliance_policy_collection_response ## @@ -50,12 +50,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCompliancePolicyCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Create a new iosCompliancePolicy object. + ## Create a new androidCompliancePolicy object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of device_compliance_policy @@ -66,30 +65,29 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCompliancePolicy.create_from_discriminator_value(pn) }, error_mapping) end ## - ## List properties and relationships of the deviceCompliancePolicy objects. + ## List properties and relationships of the macOSCompliancePolicy objects. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Create a new iosCompliancePolicy object. + ## Create a new androidCompliancePolicy object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -97,20 +95,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_compliance_policies_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceCompliancePoliciesRequestBuilder.new(raw_url, @request_adapter) + end ## - # List properties and relationships of the deviceCompliancePolicy objects. + # List properties and relationships of the macOSCompliancePolicy objects. class DeviceCompliancePoliciesRequestBuilderGetQueryParameters ## diff --git a/lib/device_management/device_compliance_policies/item/assign/assign.rb b/lib/device_management/device_compliance_policies/item/assign/assign.rb index 1f7834f80c..fbeecce252 100644 --- a/lib/device_management/device_compliance_policies/item/assign/assign.rb +++ b/lib/device_management/device_compliance_policies/item/assign/assign.rb @@ -1,2 +1,2 @@ require_relative 'assign_post_request_body' -require_relative 'assign_response' +require_relative 'assign_post_response' diff --git a/lib/device_management/device_compliance_policies/item/assign/assign_post_request_body.rb b/lib/device_management/device_compliance_policies/item/assign/assign_post_request_body.rb index 6969ff572a..36a0a09468 100644 --- a/lib/device_management/device_compliance_policies/item/assign/assign_post_request_body.rb +++ b/lib/device_management/device_compliance_policies/item/assign/assign_post_request_body.rb @@ -20,15 +20,15 @@ class AssignPostRequestBody # The assignments property @assignments ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -50,7 +50,7 @@ def assignments=(value) @assignments = value end ## - ## Instantiates a new assignPostRequestBody and sets the default values. + ## Instantiates a new AssignPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/device_compliance_policies/item/assign/assign_post_response.rb b/lib/device_management/device_compliance_policies/item/assign/assign_post_response.rb new file mode 100644 index 0000000000..e636b0139b --- /dev/null +++ b/lib/device_management/device_compliance_policies/item/assign/assign_post_response.rb @@ -0,0 +1,75 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/base_collection_pagination_count_response' +require_relative '../../../../models/device_compliance_policy_assignment' +require_relative '../../../device_management' +require_relative '../../device_compliance_policies' +require_relative '../item' +require_relative './assign' + +module MicrosoftGraph + module DeviceManagement + module DeviceCompliancePolicies + module Item + module Assign + class AssignPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new AssignPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a assign_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return AssignPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DeviceCompliancePolicyAssignment.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a device_compliance_policy_assignment + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end +end diff --git a/lib/device_management/device_compliance_policies/item/assign/assign_request_builder.rb b/lib/device_management/device_compliance_policies/item/assign/assign_request_builder.rb index 3a8756a560..6ce7ed338e 100644 --- a/lib/device_management/device_compliance_policies/item/assign/assign_request_builder.rb +++ b/lib/device_management/device_compliance_policies/item/assign/assign_request_builder.rb @@ -28,7 +28,7 @@ def initialize(path_parameters, request_adapter) ## Not yet documented ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of assign_response + ## @return a Fiber of assign_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -36,9 +36,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceManagement::DeviceCompliancePolicies::Item::Assign::AssignResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceManagement::DeviceCompliancePolicies::Item::Assign::AssignPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Not yet documented @@ -49,17 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assign_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/device_compliance_policies/item/assign/assign_response.rb b/lib/device_management/device_compliance_policies/item/assign/assign_response.rb deleted file mode 100644 index 2995194ea9..0000000000 --- a/lib/device_management/device_compliance_policies/item/assign/assign_response.rb +++ /dev/null @@ -1,75 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../../models/base_collection_pagination_count_response' -require_relative '../../../../models/device_compliance_policy_assignment' -require_relative '../../../device_management' -require_relative '../../device_compliance_policies' -require_relative '../item' -require_relative './assign' - -module MicrosoftGraph - module DeviceManagement - module DeviceCompliancePolicies - module Item - module Assign - class AssignResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new assignResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a assign_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return AssignResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DeviceCompliancePolicyAssignment.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a device_compliance_policy_assignment - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end -end diff --git a/lib/device_management/device_compliance_policies/item/assignments/assignments_request_builder.rb b/lib/device_management/device_compliance_policies/item/assignments/assignments_request_builder.rb index 2f10cf6052..cea74d0c2a 100644 --- a/lib/device_management/device_compliance_policies/item/assignments/assignments_request_builder.rb +++ b/lib/device_management/device_compliance_policies/item/assignments/assignments_request_builder.rb @@ -42,7 +42,7 @@ def by_device_compliance_policy_assignment_id(device_compliance_policy_assignmen ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the deviceCompliancePolicyAssignment objects. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCompliancePolicyAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCompliancePolicyAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the deviceCompliancePolicyAssignment objects. diff --git a/lib/device_management/device_compliance_policies/item/assignments/count/count_request_builder.rb b/lib/device_management/device_compliance_policies/item/assignments/count/count_request_builder.rb index df4eb9cfb2..ea67d18bc3 100644 --- a/lib/device_management/device_compliance_policies/item/assignments/count/count_request_builder.rb +++ b/lib/device_management/device_compliance_policies/item/assignments/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/assignments/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/assignments/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/device_compliance_policies/item/assignments/item/device_compliance_policy_assignment_item_request_builder.rb b/lib/device_management/device_compliance_policies/item/assignments/item/device_compliance_policy_assignment_item_request_builder.rb index 52434a19ab..107872a477 100644 --- a/lib/device_management/device_compliance_policies/item/assignments/item/device_compliance_policy_assignment_item_request_builder.rb +++ b/lib/device_management/device_compliance_policies/item/assignments/item/device_compliance_policy_assignment_item_request_builder.rb @@ -25,7 +25,7 @@ class DeviceCompliancePolicyAssignmentItemRequestBuilder < MicrosoftKiotaAbstrac ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/assignments/{deviceCompliancePolicyAssignment%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/assignments/{deviceCompliancePolicyAssignment%2Did}{?%24expand,%24select}") end ## ## Deletes a deviceCompliancePolicyAssignment. @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCompliancePolicyAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCompliancePolicyAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_compliance_policy_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceCompliancePolicyAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the deviceCompliancePolicyAssignment object. diff --git a/lib/device_management/device_compliance_policies/item/device_compliance_policy_item_request_builder.rb b/lib/device_management/device_compliance_policies/item/device_compliance_policy_item_request_builder.rb index eed704a0a4..3508b7951b 100644 --- a/lib/device_management/device_compliance_policies/item/device_compliance_policy_item_request_builder.rb +++ b/lib/device_management/device_compliance_policies/item/device_compliance_policy_item_request_builder.rb @@ -75,7 +75,7 @@ def user_status_overview() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}{?%24expand,%24select}") end ## ## Deletes a androidWorkProfileCompliancePolicy. @@ -87,12 +87,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Read properties and relationships of the iosCompliancePolicy object. + ## Read properties and relationships of the windows81CompliancePolicy object. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of device_compliance_policy ## @@ -101,12 +100,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCompliancePolicy.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Update the properties of a androidWorkProfileCompliancePolicy object. + ## Update the properties of a windows81CompliancePolicy object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of device_compliance_policy @@ -117,8 +115,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCompliancePolicy.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -128,35 +125,36 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Read properties and relationships of the iosCompliancePolicy object. + ## Read properties and relationships of the windows81CompliancePolicy object. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Update the properties of a androidWorkProfileCompliancePolicy object. + ## Update the properties of a windows81CompliancePolicy object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -164,20 +162,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_compliance_policy_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceCompliancePolicyItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Read properties and relationships of the iosCompliancePolicy object. + # Read properties and relationships of the windows81CompliancePolicy object. class DeviceCompliancePolicyItemRequestBuilderGetQueryParameters ## diff --git a/lib/device_management/device_compliance_policies/item/device_setting_state_summaries/count/count_request_builder.rb b/lib/device_management/device_compliance_policies/item/device_setting_state_summaries/count/count_request_builder.rb index d7c1670c3d..ae7055fd6c 100644 --- a/lib/device_management/device_compliance_policies/item/device_setting_state_summaries/count/count_request_builder.rb +++ b/lib/device_management/device_compliance_policies/item/device_setting_state_summaries/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/deviceSettingStateSummaries/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/deviceSettingStateSummaries/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/device_compliance_policies/item/device_setting_state_summaries/device_setting_state_summaries_request_builder.rb b/lib/device_management/device_compliance_policies/item/device_setting_state_summaries/device_setting_state_summaries_request_builder.rb index 18df767eea..7e9745b21a 100644 --- a/lib/device_management/device_compliance_policies/item/device_setting_state_summaries/device_setting_state_summaries_request_builder.rb +++ b/lib/device_management/device_compliance_policies/item/device_setting_state_summaries/device_setting_state_summaries_request_builder.rb @@ -42,7 +42,7 @@ def by_setting_state_device_summary_id(setting_state_device_summary_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/deviceSettingStateSummaries{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/deviceSettingStateSummaries{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Compliance Setting State Device Summary @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SettingStateDeviceSummaryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SettingStateDeviceSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_setting_state_summaries_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceSettingStateSummariesRequestBuilder.new(raw_url, @request_adapter) + end ## # Compliance Setting State Device Summary diff --git a/lib/device_management/device_compliance_policies/item/device_setting_state_summaries/item/setting_state_device_summary_item_request_builder.rb b/lib/device_management/device_compliance_policies/item/device_setting_state_summaries/item/setting_state_device_summary_item_request_builder.rb index 63ea4db278..18ae4bacb4 100644 --- a/lib/device_management/device_compliance_policies/item/device_setting_state_summaries/item/setting_state_device_summary_item_request_builder.rb +++ b/lib/device_management/device_compliance_policies/item/device_setting_state_summaries/item/setting_state_device_summary_item_request_builder.rb @@ -25,7 +25,7 @@ class SettingStateDeviceSummaryItemRequestBuilder < MicrosoftKiotaAbstractions:: ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/deviceSettingStateSummaries/{settingStateDeviceSummary%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/deviceSettingStateSummaries/{settingStateDeviceSummary%2Did}{?%24expand,%24select}") end ## ## Delete navigation property deviceSettingStateSummaries for deviceManagement @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SettingStateDeviceSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SettingStateDeviceSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a setting_state_device_summary_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SettingStateDeviceSummaryItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Compliance Setting State Device Summary diff --git a/lib/device_management/device_compliance_policies/item/device_status_overview/device_status_overview_request_builder.rb b/lib/device_management/device_compliance_policies/item/device_status_overview/device_status_overview_request_builder.rb index c0315fd229..59428f7c12 100644 --- a/lib/device_management/device_compliance_policies/item/device_status_overview/device_status_overview_request_builder.rb +++ b/lib/device_management/device_compliance_policies/item/device_status_overview/device_status_overview_request_builder.rb @@ -23,7 +23,7 @@ class DeviceStatusOverviewRequestBuilder < MicrosoftKiotaAbstractions::BaseReque ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/deviceStatusOverview{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/deviceStatusOverview{?%24expand,%24select}") end ## ## Delete navigation property deviceStatusOverview for deviceManagement @@ -35,8 +35,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceComplianceDeviceOverview.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -65,8 +63,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceComplianceDeviceOverview.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,13 +73,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -92,15 +90,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,17 +110,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_status_overview_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceStatusOverviewRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the deviceComplianceDeviceOverview object. diff --git a/lib/device_management/device_compliance_policies/item/device_statuses/count/count_request_builder.rb b/lib/device_management/device_compliance_policies/item/device_statuses/count/count_request_builder.rb index 7d9444ab72..2baddd4564 100644 --- a/lib/device_management/device_compliance_policies/item/device_statuses/count/count_request_builder.rb +++ b/lib/device_management/device_compliance_policies/item/device_statuses/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/deviceStatuses/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/deviceStatuses/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/device_compliance_policies/item/device_statuses/device_statuses_request_builder.rb b/lib/device_management/device_compliance_policies/item/device_statuses/device_statuses_request_builder.rb index 7687f607c7..2a2c434619 100644 --- a/lib/device_management/device_compliance_policies/item/device_statuses/device_statuses_request_builder.rb +++ b/lib/device_management/device_compliance_policies/item/device_statuses/device_statuses_request_builder.rb @@ -42,7 +42,7 @@ def by_device_compliance_device_status_id(device_compliance_device_status_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/deviceStatuses{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/deviceStatuses{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the deviceComplianceDeviceStatus objects. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceComplianceDeviceStatusCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceComplianceDeviceStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_statuses_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceStatusesRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the deviceComplianceDeviceStatus objects. diff --git a/lib/device_management/device_compliance_policies/item/device_statuses/item/device_compliance_device_status_item_request_builder.rb b/lib/device_management/device_compliance_policies/item/device_statuses/item/device_compliance_device_status_item_request_builder.rb index ba33a2c8eb..0211c3276f 100644 --- a/lib/device_management/device_compliance_policies/item/device_statuses/item/device_compliance_device_status_item_request_builder.rb +++ b/lib/device_management/device_compliance_policies/item/device_statuses/item/device_compliance_device_status_item_request_builder.rb @@ -25,7 +25,7 @@ class DeviceComplianceDeviceStatusItemRequestBuilder < MicrosoftKiotaAbstraction ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/deviceStatuses/{deviceComplianceDeviceStatus%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/deviceStatuses/{deviceComplianceDeviceStatus%2Did}{?%24expand,%24select}") end ## ## Deletes a deviceComplianceDeviceStatus. @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceComplianceDeviceStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceComplianceDeviceStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_compliance_device_status_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceComplianceDeviceStatusItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the deviceComplianceDeviceStatus object. diff --git a/lib/device_management/device_compliance_policies/item/schedule_actions_for_rules/schedule_actions_for_rules_post_request_body.rb b/lib/device_management/device_compliance_policies/item/schedule_actions_for_rules/schedule_actions_for_rules_post_request_body.rb index 2b0c2c7dfa..51b25cf734 100644 --- a/lib/device_management/device_compliance_policies/item/schedule_actions_for_rules/schedule_actions_for_rules_post_request_body.rb +++ b/lib/device_management/device_compliance_policies/item/schedule_actions_for_rules/schedule_actions_for_rules_post_request_body.rb @@ -20,22 +20,22 @@ class ScheduleActionsForRulesPostRequestBody # The deviceComplianceScheduledActionForRules property @device_compliance_scheduled_action_for_rules ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new scheduleActionsForRulesPostRequestBody and sets the default values. + ## Instantiates a new ScheduleActionsForRulesPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/device_compliance_policies/item/schedule_actions_for_rules/schedule_actions_for_rules_request_builder.rb b/lib/device_management/device_compliance_policies/item/schedule_actions_for_rules/schedule_actions_for_rules_request_builder.rb index 65a7ae1485..8bebc85c56 100644 --- a/lib/device_management/device_compliance_policies/item/schedule_actions_for_rules/schedule_actions_for_rules_request_builder.rb +++ b/lib/device_management/device_compliance_policies/item/schedule_actions_for_rules/schedule_actions_for_rules_request_builder.rb @@ -36,8 +36,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a schedule_actions_for_rules_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ScheduleActionsForRulesRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/device_compliance_policies/item/scheduled_actions_for_rule/count/count_request_builder.rb b/lib/device_management/device_compliance_policies/item/scheduled_actions_for_rule/count/count_request_builder.rb index a341d9be0b..eb51e498d0 100644 --- a/lib/device_management/device_compliance_policies/item/scheduled_actions_for_rule/count/count_request_builder.rb +++ b/lib/device_management/device_compliance_policies/item/scheduled_actions_for_rule/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/scheduledActionsForRule/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/scheduledActionsForRule/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/device_compliance_scheduled_action_for_rule_item_request_builder.rb b/lib/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/device_compliance_scheduled_action_for_rule_item_request_builder.rb index 1872d1b829..d55951a441 100644 --- a/lib/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/device_compliance_scheduled_action_for_rule_item_request_builder.rb +++ b/lib/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/device_compliance_scheduled_action_for_rule_item_request_builder.rb @@ -31,7 +31,7 @@ def scheduled_action_configurations() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/scheduledActionsForRule/{deviceComplianceScheduledActionForRule%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/scheduledActionsForRule/{deviceComplianceScheduledActionForRule%2Did}{?%24expand,%24select}") end ## ## Deletes a deviceComplianceScheduledActionForRule. @@ -43,8 +43,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -57,8 +56,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceComplianceScheduledActionForRule.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -73,8 +71,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceComplianceScheduledActionForRule.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -84,13 +81,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -100,15 +98,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -120,17 +118,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_compliance_scheduled_action_for_rule_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceComplianceScheduledActionForRuleItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the deviceComplianceScheduledActionForRule object. diff --git a/lib/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/scheduled_action_configurations/count/count_request_builder.rb b/lib/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/scheduled_action_configurations/count/count_request_builder.rb index 968546f3cf..7cf3ce5bb3 100644 --- a/lib/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/scheduled_action_configurations/count/count_request_builder.rb +++ b/lib/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/scheduled_action_configurations/count/count_request_builder.rb @@ -28,7 +28,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/scheduledActionsForRule/{deviceComplianceScheduledActionForRule%2Did}/scheduledActionConfigurations/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/scheduledActionsForRule/{deviceComplianceScheduledActionForRule%2Did}/scheduledActionConfigurations/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -40,8 +40,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -51,17 +50,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/scheduled_action_configurations/item/device_compliance_action_item_item_request_builder.rb b/lib/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/scheduled_action_configurations/item/device_compliance_action_item_item_request_builder.rb index 900faae871..3d9beee1da 100644 --- a/lib/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/scheduled_action_configurations/item/device_compliance_action_item_item_request_builder.rb +++ b/lib/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/scheduled_action_configurations/item/device_compliance_action_item_item_request_builder.rb @@ -29,7 +29,7 @@ class DeviceComplianceActionItemItemRequestBuilder < MicrosoftKiotaAbstractions: ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/scheduledActionsForRule/{deviceComplianceScheduledActionForRule%2Did}/scheduledActionConfigurations/{deviceComplianceActionItem%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/scheduledActionsForRule/{deviceComplianceScheduledActionForRule%2Did}/scheduledActionConfigurations/{deviceComplianceActionItem%2Did}{?%24expand,%24select}") end ## ## Deletes a deviceComplianceActionItem. @@ -41,8 +41,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -55,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceComplianceActionItem.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -71,8 +69,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceComplianceActionItem.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -82,13 +79,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -98,15 +96,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -118,17 +116,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_compliance_action_item_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceComplianceActionItemItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the deviceComplianceActionItem object. diff --git a/lib/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/scheduled_action_configurations/scheduled_action_configurations_request_builder.rb b/lib/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/scheduled_action_configurations/scheduled_action_configurations_request_builder.rb index 9c7e8229f6..e36c5dace6 100644 --- a/lib/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/scheduled_action_configurations/scheduled_action_configurations_request_builder.rb +++ b/lib/device_management/device_compliance_policies/item/scheduled_actions_for_rule/item/scheduled_action_configurations/scheduled_action_configurations_request_builder.rb @@ -46,7 +46,7 @@ def by_device_compliance_action_item_id(device_compliance_action_item_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/scheduledActionsForRule/{deviceComplianceScheduledActionForRule%2Did}/scheduledActionConfigurations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/scheduledActionsForRule/{deviceComplianceScheduledActionForRule%2Did}/scheduledActionConfigurations{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the deviceComplianceActionItem objects. @@ -58,8 +58,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceComplianceActionItemCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,8 +73,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceComplianceActionItem.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -85,15 +83,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -105,17 +103,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a scheduled_action_configurations_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ScheduledActionConfigurationsRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the deviceComplianceActionItem objects. diff --git a/lib/device_management/device_compliance_policies/item/scheduled_actions_for_rule/scheduled_actions_for_rule_request_builder.rb b/lib/device_management/device_compliance_policies/item/scheduled_actions_for_rule/scheduled_actions_for_rule_request_builder.rb index 079aca26d4..a042a3d588 100644 --- a/lib/device_management/device_compliance_policies/item/scheduled_actions_for_rule/scheduled_actions_for_rule_request_builder.rb +++ b/lib/device_management/device_compliance_policies/item/scheduled_actions_for_rule/scheduled_actions_for_rule_request_builder.rb @@ -42,7 +42,7 @@ def by_device_compliance_scheduled_action_for_rule_id(device_compliance_schedule ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/scheduledActionsForRule{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/scheduledActionsForRule{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the deviceComplianceScheduledActionForRule objects. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceComplianceScheduledActionForRuleCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceComplianceScheduledActionForRule.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a scheduled_actions_for_rule_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ScheduledActionsForRuleRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the deviceComplianceScheduledActionForRule objects. diff --git a/lib/device_management/device_compliance_policies/item/user_status_overview/user_status_overview_request_builder.rb b/lib/device_management/device_compliance_policies/item/user_status_overview/user_status_overview_request_builder.rb index bba2a7c8c7..face1dd7af 100644 --- a/lib/device_management/device_compliance_policies/item/user_status_overview/user_status_overview_request_builder.rb +++ b/lib/device_management/device_compliance_policies/item/user_status_overview/user_status_overview_request_builder.rb @@ -23,7 +23,7 @@ class UserStatusOverviewRequestBuilder < MicrosoftKiotaAbstractions::BaseRequest ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/userStatusOverview{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/userStatusOverview{?%24expand,%24select}") end ## ## Delete navigation property userStatusOverview for deviceManagement @@ -35,8 +35,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceComplianceUserOverview.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -65,8 +63,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceComplianceUserOverview.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,13 +73,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -92,15 +90,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,17 +110,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_status_overview_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserStatusOverviewRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the deviceComplianceUserOverview object. diff --git a/lib/device_management/device_compliance_policies/item/user_statuses/count/count_request_builder.rb b/lib/device_management/device_compliance_policies/item/user_statuses/count/count_request_builder.rb index 06131d367c..9d1a3eb1fe 100644 --- a/lib/device_management/device_compliance_policies/item/user_statuses/count/count_request_builder.rb +++ b/lib/device_management/device_compliance_policies/item/user_statuses/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/userStatuses/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/userStatuses/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/device_compliance_policies/item/user_statuses/item/device_compliance_user_status_item_request_builder.rb b/lib/device_management/device_compliance_policies/item/user_statuses/item/device_compliance_user_status_item_request_builder.rb index 5fdf25eaad..3c69d167da 100644 --- a/lib/device_management/device_compliance_policies/item/user_statuses/item/device_compliance_user_status_item_request_builder.rb +++ b/lib/device_management/device_compliance_policies/item/user_statuses/item/device_compliance_user_status_item_request_builder.rb @@ -25,7 +25,7 @@ class DeviceComplianceUserStatusItemRequestBuilder < MicrosoftKiotaAbstractions: ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/userStatuses/{deviceComplianceUserStatus%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/userStatuses/{deviceComplianceUserStatus%2Did}{?%24expand,%24select}") end ## ## Deletes a deviceComplianceUserStatus. @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceComplianceUserStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceComplianceUserStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_compliance_user_status_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceComplianceUserStatusItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the deviceComplianceUserStatus object. diff --git a/lib/device_management/device_compliance_policies/item/user_statuses/user_statuses_request_builder.rb b/lib/device_management/device_compliance_policies/item/user_statuses/user_statuses_request_builder.rb index b433acd6ea..fdd3b2ec0a 100644 --- a/lib/device_management/device_compliance_policies/item/user_statuses/user_statuses_request_builder.rb +++ b/lib/device_management/device_compliance_policies/item/user_statuses/user_statuses_request_builder.rb @@ -42,7 +42,7 @@ def by_device_compliance_user_status_id(device_compliance_user_status_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/userStatuses{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy%2Did}/userStatuses{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the deviceComplianceUserStatus objects. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceComplianceUserStatusCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceComplianceUserStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_statuses_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserStatusesRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the deviceComplianceUserStatus objects. diff --git a/lib/device_management/device_compliance_policy_device_state_summary/device_compliance_policy_device_state_summary_request_builder.rb b/lib/device_management/device_compliance_policy_device_state_summary/device_compliance_policy_device_state_summary_request_builder.rb index eafc50f80a..0de590a17e 100644 --- a/lib/device_management/device_compliance_policy_device_state_summary/device_compliance_policy_device_state_summary_request_builder.rb +++ b/lib/device_management/device_compliance_policy_device_state_summary/device_compliance_policy_device_state_summary_request_builder.rb @@ -19,7 +19,7 @@ class DeviceCompliancePolicyDeviceStateSummaryRequestBuilder < MicrosoftKiotaAbs ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicyDeviceStateSummary{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicyDeviceStateSummary{?%24expand,%24select}") end ## ## Delete navigation property deviceCompliancePolicyDeviceStateSummary for deviceManagement @@ -31,8 +31,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,8 +44,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCompliancePolicyDeviceStateSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -61,8 +59,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCompliancePolicyDeviceStateSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -72,13 +69,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -88,15 +86,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -108,17 +106,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_compliance_policy_device_state_summary_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceCompliancePolicyDeviceStateSummaryRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the deviceCompliancePolicyDeviceStateSummary object. diff --git a/lib/device_management/device_compliance_policy_setting_state_summaries/count/count_request_builder.rb b/lib/device_management/device_compliance_policy_setting_state_summaries/count/count_request_builder.rb index 78e5933bd9..f7d2b7c1de 100644 --- a/lib/device_management/device_compliance_policy_setting_state_summaries/count/count_request_builder.rb +++ b/lib/device_management/device_compliance_policy_setting_state_summaries/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicySettingStateSummaries/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicySettingStateSummaries/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/device_compliance_policy_setting_state_summaries/device_compliance_policy_setting_state_summaries_request_builder.rb b/lib/device_management/device_compliance_policy_setting_state_summaries/device_compliance_policy_setting_state_summaries_request_builder.rb index 7c9ff7bddd..f539a55aaf 100644 --- a/lib/device_management/device_compliance_policy_setting_state_summaries/device_compliance_policy_setting_state_summaries_request_builder.rb +++ b/lib/device_management/device_compliance_policy_setting_state_summaries/device_compliance_policy_setting_state_summaries_request_builder.rb @@ -38,7 +38,7 @@ def by_device_compliance_policy_setting_state_summary_id(device_compliance_polic ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicySettingStateSummaries{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicySettingStateSummaries{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the deviceCompliancePolicySettingStateSummary objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCompliancePolicySettingStateSummaryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCompliancePolicySettingStateSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_compliance_policy_setting_state_summaries_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceCompliancePolicySettingStateSummariesRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the deviceCompliancePolicySettingStateSummary objects. diff --git a/lib/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_policy_setting_state_summary_item_request_builder.rb b/lib/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_policy_setting_state_summary_item_request_builder.rb index 7c1bdab7f8..646ae2119f 100644 --- a/lib/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_policy_setting_state_summary_item_request_builder.rb +++ b/lib/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_policy_setting_state_summary_item_request_builder.rb @@ -27,7 +27,7 @@ def device_compliance_setting_states() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicySettingStateSummaries/{deviceCompliancePolicySettingStateSummary%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicySettingStateSummaries/{deviceCompliancePolicySettingStateSummary%2Did}{?%24expand,%24select}") end ## ## Deletes a deviceCompliancePolicySettingStateSummary. @@ -39,8 +39,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -53,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCompliancePolicySettingStateSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -69,8 +67,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCompliancePolicySettingStateSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -80,13 +77,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -96,15 +94,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -116,17 +114,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_compliance_policy_setting_state_summary_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceCompliancePolicySettingStateSummaryItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the deviceCompliancePolicySettingStateSummary object. diff --git a/lib/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_setting_states/count/count_request_builder.rb b/lib/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_setting_states/count/count_request_builder.rb index 76a1d51ed9..a5ff7535a2 100644 --- a/lib/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_setting_states/count/count_request_builder.rb +++ b/lib/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_setting_states/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicySettingStateSummaries/{deviceCompliancePolicySettingStateSummary%2Did}/deviceComplianceSettingStates/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicySettingStateSummaries/{deviceCompliancePolicySettingStateSummary%2Did}/deviceComplianceSettingStates/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_setting_states/device_compliance_setting_states_request_builder.rb b/lib/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_setting_states/device_compliance_setting_states_request_builder.rb index 5da44f3777..3a431f2e0f 100644 --- a/lib/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_setting_states/device_compliance_setting_states_request_builder.rb +++ b/lib/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_setting_states/device_compliance_setting_states_request_builder.rb @@ -42,7 +42,7 @@ def by_device_compliance_setting_state_id(device_compliance_setting_state_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicySettingStateSummaries/{deviceCompliancePolicySettingStateSummary%2Did}/deviceComplianceSettingStates{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicySettingStateSummaries/{deviceCompliancePolicySettingStateSummary%2Did}/deviceComplianceSettingStates{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the deviceComplianceSettingState objects. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceComplianceSettingStateCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceComplianceSettingState.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_compliance_setting_states_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceComplianceSettingStatesRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the deviceComplianceSettingState objects. diff --git a/lib/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_setting_states/item/device_compliance_setting_state_item_request_builder.rb b/lib/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_setting_states/item/device_compliance_setting_state_item_request_builder.rb index 46686c7d8c..0eef041564 100644 --- a/lib/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_setting_states/item/device_compliance_setting_state_item_request_builder.rb +++ b/lib/device_management/device_compliance_policy_setting_state_summaries/item/device_compliance_setting_states/item/device_compliance_setting_state_item_request_builder.rb @@ -25,7 +25,7 @@ class DeviceComplianceSettingStateItemRequestBuilder < MicrosoftKiotaAbstraction ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicySettingStateSummaries/{deviceCompliancePolicySettingStateSummary%2Did}/deviceComplianceSettingStates/{deviceComplianceSettingState%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceCompliancePolicySettingStateSummaries/{deviceCompliancePolicySettingStateSummary%2Did}/deviceComplianceSettingStates/{deviceComplianceSettingState%2Did}{?%24expand,%24select}") end ## ## Deletes a deviceComplianceSettingState. @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceComplianceSettingState.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceComplianceSettingState.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_compliance_setting_state_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceComplianceSettingStateItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the deviceComplianceSettingState object. diff --git a/lib/device_management/device_configuration_device_state_summaries/device_configuration_device_state_summaries_request_builder.rb b/lib/device_management/device_configuration_device_state_summaries/device_configuration_device_state_summaries_request_builder.rb index 3b629423bd..975b9815e6 100644 --- a/lib/device_management/device_configuration_device_state_summaries/device_configuration_device_state_summaries_request_builder.rb +++ b/lib/device_management/device_configuration_device_state_summaries/device_configuration_device_state_summaries_request_builder.rb @@ -19,7 +19,7 @@ class DeviceConfigurationDeviceStateSummariesRequestBuilder < MicrosoftKiotaAbst ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurationDeviceStateSummaries{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurationDeviceStateSummaries{?%24expand,%24select}") end ## ## Delete navigation property deviceConfigurationDeviceStateSummaries for deviceManagement @@ -31,8 +31,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,8 +44,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationDeviceStateSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -61,8 +59,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationDeviceStateSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -72,13 +69,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -88,15 +86,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -108,17 +106,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_configuration_device_state_summaries_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceConfigurationDeviceStateSummariesRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the deviceConfigurationDeviceStateSummary object. diff --git a/lib/device_management/device_configurations/count/count_request_builder.rb b/lib/device_management/device_configurations/count/count_request_builder.rb index 07ab6cdb94..cdeb4eca80 100644 --- a/lib/device_management/device_configurations/count/count_request_builder.rb +++ b/lib/device_management/device_configurations/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/device_configurations/device_configurations_request_builder.rb b/lib/device_management/device_configurations/device_configurations_request_builder.rb index 760bc07797..2681a0e088 100644 --- a/lib/device_management/device_configurations/device_configurations_request_builder.rb +++ b/lib/device_management/device_configurations/device_configurations_request_builder.rb @@ -38,10 +38,10 @@ def by_device_configuration_id(device_configuration_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## List properties and relationships of the windows10SecureAssessmentConfiguration objects. + ## List properties and relationships of the windowsDefenderAdvancedThreatProtectionConfiguration objects. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of device_configuration_collection_response ## @@ -50,12 +50,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Create a new windows10SecureAssessmentConfiguration object. + ## Create a new macOSGeneralDeviceConfiguration object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of device_configuration @@ -66,30 +65,29 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfiguration.create_from_discriminator_value(pn) }, error_mapping) end ## - ## List properties and relationships of the windows10SecureAssessmentConfiguration objects. + ## List properties and relationships of the windowsDefenderAdvancedThreatProtectionConfiguration objects. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Create a new windows10SecureAssessmentConfiguration object. + ## Create a new macOSGeneralDeviceConfiguration object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -97,20 +95,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_configurations_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceConfigurationsRequestBuilder.new(raw_url, @request_adapter) + end ## - # List properties and relationships of the windows10SecureAssessmentConfiguration objects. + # List properties and relationships of the windowsDefenderAdvancedThreatProtectionConfiguration objects. class DeviceConfigurationsRequestBuilderGetQueryParameters ## diff --git a/lib/device_management/device_configurations/item/assign/assign.rb b/lib/device_management/device_configurations/item/assign/assign.rb index 1f7834f80c..fbeecce252 100644 --- a/lib/device_management/device_configurations/item/assign/assign.rb +++ b/lib/device_management/device_configurations/item/assign/assign.rb @@ -1,2 +1,2 @@ require_relative 'assign_post_request_body' -require_relative 'assign_response' +require_relative 'assign_post_response' diff --git a/lib/device_management/device_configurations/item/assign/assign_post_request_body.rb b/lib/device_management/device_configurations/item/assign/assign_post_request_body.rb index c3c91f6c34..7c937a3075 100644 --- a/lib/device_management/device_configurations/item/assign/assign_post_request_body.rb +++ b/lib/device_management/device_configurations/item/assign/assign_post_request_body.rb @@ -20,15 +20,15 @@ class AssignPostRequestBody # The assignments property @assignments ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -50,7 +50,7 @@ def assignments=(value) @assignments = value end ## - ## Instantiates a new assignPostRequestBody and sets the default values. + ## Instantiates a new AssignPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/device_configurations/item/assign/assign_post_response.rb b/lib/device_management/device_configurations/item/assign/assign_post_response.rb new file mode 100644 index 0000000000..963ec8a885 --- /dev/null +++ b/lib/device_management/device_configurations/item/assign/assign_post_response.rb @@ -0,0 +1,75 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/base_collection_pagination_count_response' +require_relative '../../../../models/device_configuration_assignment' +require_relative '../../../device_management' +require_relative '../../device_configurations' +require_relative '../item' +require_relative './assign' + +module MicrosoftGraph + module DeviceManagement + module DeviceConfigurations + module Item + module Assign + class AssignPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new AssignPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a assign_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return AssignPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationAssignment.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a device_configuration_assignment + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end +end diff --git a/lib/device_management/device_configurations/item/assign/assign_request_builder.rb b/lib/device_management/device_configurations/item/assign/assign_request_builder.rb index b22ef9fa4c..0130740c11 100644 --- a/lib/device_management/device_configurations/item/assign/assign_request_builder.rb +++ b/lib/device_management/device_configurations/item/assign/assign_request_builder.rb @@ -28,7 +28,7 @@ def initialize(path_parameters, request_adapter) ## Not yet documented ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of assign_response + ## @return a Fiber of assign_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -36,9 +36,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceManagement::DeviceConfigurations::Item::Assign::AssignResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceManagement::DeviceConfigurations::Item::Assign::AssignPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Not yet documented @@ -49,17 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assign_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/device_configurations/item/assign/assign_response.rb b/lib/device_management/device_configurations/item/assign/assign_response.rb deleted file mode 100644 index faed81c584..0000000000 --- a/lib/device_management/device_configurations/item/assign/assign_response.rb +++ /dev/null @@ -1,75 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../../models/base_collection_pagination_count_response' -require_relative '../../../../models/device_configuration_assignment' -require_relative '../../../device_management' -require_relative '../../device_configurations' -require_relative '../item' -require_relative './assign' - -module MicrosoftGraph - module DeviceManagement - module DeviceConfigurations - module Item - module Assign - class AssignResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new assignResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a assign_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return AssignResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationAssignment.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a device_configuration_assignment - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end -end diff --git a/lib/device_management/device_configurations/item/assignments/assignments_request_builder.rb b/lib/device_management/device_configurations/item/assignments/assignments_request_builder.rb index dc6b1e1e57..90c4fbc3d6 100644 --- a/lib/device_management/device_configurations/item/assignments/assignments_request_builder.rb +++ b/lib/device_management/device_configurations/item/assignments/assignments_request_builder.rb @@ -42,7 +42,7 @@ def by_device_configuration_assignment_id(device_configuration_assignment_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the deviceConfigurationAssignment objects. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the deviceConfigurationAssignment objects. diff --git a/lib/device_management/device_configurations/item/assignments/count/count_request_builder.rb b/lib/device_management/device_configurations/item/assignments/count/count_request_builder.rb index f88df085bf..0313b310c2 100644 --- a/lib/device_management/device_configurations/item/assignments/count/count_request_builder.rb +++ b/lib/device_management/device_configurations/item/assignments/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/assignments/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/assignments/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/device_configurations/item/assignments/item/device_configuration_assignment_item_request_builder.rb b/lib/device_management/device_configurations/item/assignments/item/device_configuration_assignment_item_request_builder.rb index c148e5f1ec..fe1b3edfeb 100644 --- a/lib/device_management/device_configurations/item/assignments/item/device_configuration_assignment_item_request_builder.rb +++ b/lib/device_management/device_configurations/item/assignments/item/device_configuration_assignment_item_request_builder.rb @@ -25,7 +25,7 @@ class DeviceConfigurationAssignmentItemRequestBuilder < MicrosoftKiotaAbstractio ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/assignments/{deviceConfigurationAssignment%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/assignments/{deviceConfigurationAssignment%2Did}{?%24expand,%24select}") end ## ## Deletes a deviceConfigurationAssignment. @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_configuration_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceConfigurationAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the deviceConfigurationAssignment object. diff --git a/lib/device_management/device_configurations/item/device_configuration_item_request_builder.rb b/lib/device_management/device_configurations/item/device_configuration_item_request_builder.rb index 1109445ec9..9fc66cc8c5 100644 --- a/lib/device_management/device_configurations/item/device_configuration_item_request_builder.rb +++ b/lib/device_management/device_configurations/item/device_configuration_item_request_builder.rb @@ -64,10 +64,10 @@ def user_status_overview() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}{?%24expand,%24select}") end ## - ## Deletes a sharedPCConfiguration. + ## Deletes a windows10CustomConfiguration. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void ## @@ -76,12 +76,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Read properties and relationships of the iosGeneralDeviceConfiguration object. + ## Read properties and relationships of the windows10EnterpriseModernAppManagementConfiguration object. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of device_configuration ## @@ -90,8 +89,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfiguration.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -104,7 +102,7 @@ def get_oma_setting_plain_text_value_with_secret_reference_value_id(secret_refer return GetOmaSettingPlainTextValueWithSecretReferenceValueIdRequestBuilder.new(@path_parameters, @request_adapter, secretReferenceValueId) end ## - ## Update the properties of a androidWorkProfileGeneralDeviceConfiguration object. + ## Update the properties of a macOSCustomConfiguration object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of device_configuration @@ -115,46 +113,46 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfiguration.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Deletes a sharedPCConfiguration. + ## Deletes a windows10CustomConfiguration. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Read properties and relationships of the iosGeneralDeviceConfiguration object. + ## Read properties and relationships of the windows10EnterpriseModernAppManagementConfiguration object. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Update the properties of a androidWorkProfileGeneralDeviceConfiguration object. + ## Update the properties of a macOSCustomConfiguration object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -162,20 +160,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_configuration_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceConfigurationItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Read properties and relationships of the iosGeneralDeviceConfiguration object. + # Read properties and relationships of the windows10EnterpriseModernAppManagementConfiguration object. class DeviceConfigurationItemRequestBuilderGetQueryParameters ## diff --git a/lib/device_management/device_configurations/item/device_setting_state_summaries/count/count_request_builder.rb b/lib/device_management/device_configurations/item/device_setting_state_summaries/count/count_request_builder.rb index f9cde7d67a..8730ae81ef 100644 --- a/lib/device_management/device_configurations/item/device_setting_state_summaries/count/count_request_builder.rb +++ b/lib/device_management/device_configurations/item/device_setting_state_summaries/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/deviceSettingStateSummaries/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/deviceSettingStateSummaries/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/device_configurations/item/device_setting_state_summaries/device_setting_state_summaries_request_builder.rb b/lib/device_management/device_configurations/item/device_setting_state_summaries/device_setting_state_summaries_request_builder.rb index 0b318da8a9..a12fa8764d 100644 --- a/lib/device_management/device_configurations/item/device_setting_state_summaries/device_setting_state_summaries_request_builder.rb +++ b/lib/device_management/device_configurations/item/device_setting_state_summaries/device_setting_state_summaries_request_builder.rb @@ -42,7 +42,7 @@ def by_setting_state_device_summary_id(setting_state_device_summary_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/deviceSettingStateSummaries{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/deviceSettingStateSummaries{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the settingStateDeviceSummary objects. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SettingStateDeviceSummaryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SettingStateDeviceSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_setting_state_summaries_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceSettingStateSummariesRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the settingStateDeviceSummary objects. diff --git a/lib/device_management/device_configurations/item/device_setting_state_summaries/item/setting_state_device_summary_item_request_builder.rb b/lib/device_management/device_configurations/item/device_setting_state_summaries/item/setting_state_device_summary_item_request_builder.rb index ca3ffdaca2..60df55dcd8 100644 --- a/lib/device_management/device_configurations/item/device_setting_state_summaries/item/setting_state_device_summary_item_request_builder.rb +++ b/lib/device_management/device_configurations/item/device_setting_state_summaries/item/setting_state_device_summary_item_request_builder.rb @@ -25,7 +25,7 @@ class SettingStateDeviceSummaryItemRequestBuilder < MicrosoftKiotaAbstractions:: ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/deviceSettingStateSummaries/{settingStateDeviceSummary%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/deviceSettingStateSummaries/{settingStateDeviceSummary%2Did}{?%24expand,%24select}") end ## ## Deletes a settingStateDeviceSummary. @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SettingStateDeviceSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SettingStateDeviceSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a setting_state_device_summary_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SettingStateDeviceSummaryItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the settingStateDeviceSummary object. diff --git a/lib/device_management/device_configurations/item/device_status_overview/device_status_overview_request_builder.rb b/lib/device_management/device_configurations/item/device_status_overview/device_status_overview_request_builder.rb index dadb537baf..46d98ff577 100644 --- a/lib/device_management/device_configurations/item/device_status_overview/device_status_overview_request_builder.rb +++ b/lib/device_management/device_configurations/item/device_status_overview/device_status_overview_request_builder.rb @@ -23,7 +23,7 @@ class DeviceStatusOverviewRequestBuilder < MicrosoftKiotaAbstractions::BaseReque ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/deviceStatusOverview{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/deviceStatusOverview{?%24expand,%24select}") end ## ## Delete navigation property deviceStatusOverview for deviceManagement @@ -35,8 +35,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationDeviceOverview.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -65,8 +63,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationDeviceOverview.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,13 +73,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -92,15 +90,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,17 +110,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_status_overview_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceStatusOverviewRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the deviceConfigurationDeviceOverview object. diff --git a/lib/device_management/device_configurations/item/device_statuses/count/count_request_builder.rb b/lib/device_management/device_configurations/item/device_statuses/count/count_request_builder.rb index 335348fffa..6b50bedc7a 100644 --- a/lib/device_management/device_configurations/item/device_statuses/count/count_request_builder.rb +++ b/lib/device_management/device_configurations/item/device_statuses/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/deviceStatuses/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/deviceStatuses/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/device_configurations/item/device_statuses/device_statuses_request_builder.rb b/lib/device_management/device_configurations/item/device_statuses/device_statuses_request_builder.rb index 41ce1b0c86..ae2e7950d6 100644 --- a/lib/device_management/device_configurations/item/device_statuses/device_statuses_request_builder.rb +++ b/lib/device_management/device_configurations/item/device_statuses/device_statuses_request_builder.rb @@ -42,7 +42,7 @@ def by_device_configuration_device_status_id(device_configuration_device_status_ ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/deviceStatuses{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/deviceStatuses{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the deviceConfigurationDeviceStatus objects. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationDeviceStatusCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationDeviceStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_statuses_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceStatusesRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the deviceConfigurationDeviceStatus objects. diff --git a/lib/device_management/device_configurations/item/device_statuses/item/device_configuration_device_status_item_request_builder.rb b/lib/device_management/device_configurations/item/device_statuses/item/device_configuration_device_status_item_request_builder.rb index a9196bc9d3..fcd518121d 100644 --- a/lib/device_management/device_configurations/item/device_statuses/item/device_configuration_device_status_item_request_builder.rb +++ b/lib/device_management/device_configurations/item/device_statuses/item/device_configuration_device_status_item_request_builder.rb @@ -25,7 +25,7 @@ class DeviceConfigurationDeviceStatusItemRequestBuilder < MicrosoftKiotaAbstract ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/deviceStatuses/{deviceConfigurationDeviceStatus%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/deviceStatuses/{deviceConfigurationDeviceStatus%2Did}{?%24expand,%24select}") end ## ## Deletes a deviceConfigurationDeviceStatus. @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationDeviceStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationDeviceStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_configuration_device_status_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceConfigurationDeviceStatusItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the deviceConfigurationDeviceStatus object. diff --git a/lib/device_management/device_configurations/item/get_oma_setting_plain_text_value_with_secret_reference_value_id/get_oma_setting_plain_text_value_with_secret_reference_value_id.rb b/lib/device_management/device_configurations/item/get_oma_setting_plain_text_value_with_secret_reference_value_id/get_oma_setting_plain_text_value_with_secret_reference_value_id.rb index 520b29d8a9..0211c5271c 100644 --- a/lib/device_management/device_configurations/item/get_oma_setting_plain_text_value_with_secret_reference_value_id/get_oma_setting_plain_text_value_with_secret_reference_value_id.rb +++ b/lib/device_management/device_configurations/item/get_oma_setting_plain_text_value_with_secret_reference_value_id/get_oma_setting_plain_text_value_with_secret_reference_value_id.rb @@ -1 +1 @@ -require_relative 'get_oma_setting_plain_text_value_with_secret_reference_value_id_response' +require_relative 'get_oma_setting_plain_text_value_with_secret_reference_value_id_get_response' diff --git a/lib/device_management/device_configurations/item/get_oma_setting_plain_text_value_with_secret_reference_value_id/get_oma_setting_plain_text_value_with_secret_reference_value_id_get_response.rb b/lib/device_management/device_configurations/item/get_oma_setting_plain_text_value_with_secret_reference_value_id/get_oma_setting_plain_text_value_with_secret_reference_value_id_get_response.rb new file mode 100644 index 0000000000..eb0dc008bc --- /dev/null +++ b/lib/device_management/device_configurations/item/get_oma_setting_plain_text_value_with_secret_reference_value_id/get_oma_setting_plain_text_value_with_secret_reference_value_id_get_response.rb @@ -0,0 +1,91 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../device_management' +require_relative '../../device_configurations' +require_relative '../item' +require_relative './get_oma_setting_plain_text_value_with_secret_reference_value_id' + +module MicrosoftGraph + module DeviceManagement + module DeviceConfigurations + module Item + module GetOmaSettingPlainTextValueWithSecretReferenceValueId + class GetOmaSettingPlainTextValueWithSecretReferenceValueIdGetResponse + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The value property + @value + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new GetOmaSettingPlainTextValueWithSecretReferenceValueIdGetResponse and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_oma_setting_plain_text_value_with_secret_reference_value_id_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetOmaSettingPlainTextValueWithSecretReferenceValueIdGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "value" => lambda {|n| @value = n.get_string_value() }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_string_value("value", @value) + writer.write_additional_data(@additional_data) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end +end diff --git a/lib/device_management/device_configurations/item/get_oma_setting_plain_text_value_with_secret_reference_value_id/get_oma_setting_plain_text_value_with_secret_reference_value_id_request_builder.rb b/lib/device_management/device_configurations/item/get_oma_setting_plain_text_value_with_secret_reference_value_id/get_oma_setting_plain_text_value_with_secret_reference_value_id_request_builder.rb index d543eb422c..374ecea7f8 100644 --- a/lib/device_management/device_configurations/item/get_oma_setting_plain_text_value_with_secret_reference_value_id/get_oma_setting_plain_text_value_with_secret_reference_value_id_request_builder.rb +++ b/lib/device_management/device_configurations/item/get_oma_setting_plain_text_value_with_secret_reference_value_id/get_oma_setting_plain_text_value_with_secret_reference_value_id_request_builder.rb @@ -28,16 +28,15 @@ def initialize(path_parameters, request_adapter, secret_reference_value_id=nil) ## ## Invoke function getOmaSettingPlainTextValue ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_oma_setting_plain_text_value_with_secret_reference_value_id_response + ## @return a Fiber of get_oma_setting_plain_text_value_with_secret_reference_value_id_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceManagement::DeviceConfigurations::Item::GetOmaSettingPlainTextValueWithSecretReferenceValueId::GetOmaSettingPlainTextValueWithSecretReferenceValueIdResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceManagement::DeviceConfigurations::Item::GetOmaSettingPlainTextValueWithSecretReferenceValueId::GetOmaSettingPlainTextValueWithSecretReferenceValueIdGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Invoke function getOmaSettingPlainTextValue @@ -46,16 +45,25 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_oma_setting_plain_text_value_with_secret_reference_value_id_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetOmaSettingPlainTextValueWithSecretReferenceValueIdRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/device_configurations/item/get_oma_setting_plain_text_value_with_secret_reference_value_id/get_oma_setting_plain_text_value_with_secret_reference_value_id_response.rb b/lib/device_management/device_configurations/item/get_oma_setting_plain_text_value_with_secret_reference_value_id/get_oma_setting_plain_text_value_with_secret_reference_value_id_response.rb deleted file mode 100644 index a889c2b978..0000000000 --- a/lib/device_management/device_configurations/item/get_oma_setting_plain_text_value_with_secret_reference_value_id/get_oma_setting_plain_text_value_with_secret_reference_value_id_response.rb +++ /dev/null @@ -1,91 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../device_management' -require_relative '../../device_configurations' -require_relative '../item' -require_relative './get_oma_setting_plain_text_value_with_secret_reference_value_id' - -module MicrosoftGraph - module DeviceManagement - module DeviceConfigurations - module Item - module GetOmaSettingPlainTextValueWithSecretReferenceValueId - class GetOmaSettingPlainTextValueWithSecretReferenceValueIdResponse - include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable - ## - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - @additional_data - ## - # The value property - @value - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @return a i_dictionary - ## - def additional_data - return @additional_data - end - ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. - ## @return a void - ## - def additional_data=(value) - @additional_data = value - end - ## - ## Instantiates a new getOmaSettingPlainTextValueWithSecretReferenceValueIdResponse and sets the default values. - ## @return a void - ## - def initialize() - @additional_data = Hash.new - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_oma_setting_plain_text_value_with_secret_reference_value_id_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetOmaSettingPlainTextValueWithSecretReferenceValueIdResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return { - "value" => lambda {|n| @value = n.get_string_value() }, - } - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_string_value("value", @value) - writer.write_additional_data(@additional_data) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end -end diff --git a/lib/device_management/device_configurations/item/user_status_overview/user_status_overview_request_builder.rb b/lib/device_management/device_configurations/item/user_status_overview/user_status_overview_request_builder.rb index d0eb50d933..90ae59dfca 100644 --- a/lib/device_management/device_configurations/item/user_status_overview/user_status_overview_request_builder.rb +++ b/lib/device_management/device_configurations/item/user_status_overview/user_status_overview_request_builder.rb @@ -23,7 +23,7 @@ class UserStatusOverviewRequestBuilder < MicrosoftKiotaAbstractions::BaseRequest ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/userStatusOverview{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/userStatusOverview{?%24expand,%24select}") end ## ## Delete navigation property userStatusOverview for deviceManagement @@ -35,8 +35,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationUserOverview.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -65,8 +63,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationUserOverview.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,13 +73,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -92,15 +90,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,17 +110,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_status_overview_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserStatusOverviewRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the deviceConfigurationUserOverview object. diff --git a/lib/device_management/device_configurations/item/user_statuses/count/count_request_builder.rb b/lib/device_management/device_configurations/item/user_statuses/count/count_request_builder.rb index daad6302d0..9888477f2d 100644 --- a/lib/device_management/device_configurations/item/user_statuses/count/count_request_builder.rb +++ b/lib/device_management/device_configurations/item/user_statuses/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/userStatuses/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/userStatuses/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/device_configurations/item/user_statuses/item/device_configuration_user_status_item_request_builder.rb b/lib/device_management/device_configurations/item/user_statuses/item/device_configuration_user_status_item_request_builder.rb index 9bb760c926..b3076b7a2f 100644 --- a/lib/device_management/device_configurations/item/user_statuses/item/device_configuration_user_status_item_request_builder.rb +++ b/lib/device_management/device_configurations/item/user_statuses/item/device_configuration_user_status_item_request_builder.rb @@ -25,7 +25,7 @@ class DeviceConfigurationUserStatusItemRequestBuilder < MicrosoftKiotaAbstractio ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/userStatuses/{deviceConfigurationUserStatus%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/userStatuses/{deviceConfigurationUserStatus%2Did}{?%24expand,%24select}") end ## ## Deletes a deviceConfigurationUserStatus. @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationUserStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationUserStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_configuration_user_status_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceConfigurationUserStatusItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the deviceConfigurationUserStatus object. diff --git a/lib/device_management/device_configurations/item/user_statuses/user_statuses_request_builder.rb b/lib/device_management/device_configurations/item/user_statuses/user_statuses_request_builder.rb index 30ae745a82..fa74ace1ec 100644 --- a/lib/device_management/device_configurations/item/user_statuses/user_statuses_request_builder.rb +++ b/lib/device_management/device_configurations/item/user_statuses/user_statuses_request_builder.rb @@ -42,7 +42,7 @@ def by_device_configuration_user_status_id(device_configuration_user_status_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/userStatuses{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceConfigurations/{deviceConfiguration%2Did}/userStatuses{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the deviceConfigurationUserStatus objects. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationUserStatusCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationUserStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_statuses_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserStatusesRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the deviceConfigurationUserStatus objects. diff --git a/lib/device_management/device_enrollment_configurations/count/count_request_builder.rb b/lib/device_management/device_enrollment_configurations/count/count_request_builder.rb index 9b50f87733..cf3d743d64 100644 --- a/lib/device_management/device_enrollment_configurations/count/count_request_builder.rb +++ b/lib/device_management/device_enrollment_configurations/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceEnrollmentConfigurations/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceEnrollmentConfigurations/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/device_enrollment_configurations/device_enrollment_configurations_request_builder.rb b/lib/device_management/device_enrollment_configurations/device_enrollment_configurations_request_builder.rb index 7ad3e1dd56..68ecfbb977 100644 --- a/lib/device_management/device_enrollment_configurations/device_enrollment_configurations_request_builder.rb +++ b/lib/device_management/device_enrollment_configurations/device_enrollment_configurations_request_builder.rb @@ -38,10 +38,10 @@ def by_device_enrollment_configuration_id(device_enrollment_configuration_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceEnrollmentConfigurations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceEnrollmentConfigurations{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## List properties and relationships of the deviceEnrollmentPlatformRestrictionsConfiguration objects. + ## List properties and relationships of the deviceEnrollmentConfiguration objects. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of device_enrollment_configuration_collection_response ## @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceEnrollmentConfigurationCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,26 +65,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceEnrollmentConfiguration.create_from_discriminator_value(pn) }, error_mapping) end ## - ## List properties and relationships of the deviceEnrollmentPlatformRestrictionsConfiguration objects. + ## List properties and relationships of the deviceEnrollmentConfiguration objects. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,20 +95,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_enrollment_configurations_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceEnrollmentConfigurationsRequestBuilder.new(raw_url, @request_adapter) + end ## - # List properties and relationships of the deviceEnrollmentPlatformRestrictionsConfiguration objects. + # List properties and relationships of the deviceEnrollmentConfiguration objects. class DeviceEnrollmentConfigurationsRequestBuilderGetQueryParameters ## diff --git a/lib/device_management/device_enrollment_configurations/item/assign/assign_post_request_body.rb b/lib/device_management/device_enrollment_configurations/item/assign/assign_post_request_body.rb index b3a539e360..8ac2c8784a 100644 --- a/lib/device_management/device_enrollment_configurations/item/assign/assign_post_request_body.rb +++ b/lib/device_management/device_enrollment_configurations/item/assign/assign_post_request_body.rb @@ -20,22 +20,22 @@ class AssignPostRequestBody # The enrollmentConfigurationAssignments property @enrollment_configuration_assignments ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new assignPostRequestBody and sets the default values. + ## Instantiates a new AssignPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/device_enrollment_configurations/item/assign/assign_request_builder.rb b/lib/device_management/device_enrollment_configurations/item/assign/assign_request_builder.rb index a2908841e4..536e896e8e 100644 --- a/lib/device_management/device_enrollment_configurations/item/assign/assign_request_builder.rb +++ b/lib/device_management/device_enrollment_configurations/item/assign/assign_request_builder.rb @@ -36,8 +36,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assign_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/device_enrollment_configurations/item/assignments/assignments_request_builder.rb b/lib/device_management/device_enrollment_configurations/item/assignments/assignments_request_builder.rb index ef15b9ef9b..6da1564d03 100644 --- a/lib/device_management/device_enrollment_configurations/item/assignments/assignments_request_builder.rb +++ b/lib/device_management/device_enrollment_configurations/item/assignments/assignments_request_builder.rb @@ -42,7 +42,7 @@ def by_enrollment_configuration_assignment_id(enrollment_configuration_assignmen ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceEnrollmentConfigurations/{deviceEnrollmentConfiguration%2Did}/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceEnrollmentConfigurations/{deviceEnrollmentConfiguration%2Did}/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the enrollmentConfigurationAssignment objects. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::EnrollmentConfigurationAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::EnrollmentConfigurationAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the enrollmentConfigurationAssignment objects. diff --git a/lib/device_management/device_enrollment_configurations/item/assignments/count/count_request_builder.rb b/lib/device_management/device_enrollment_configurations/item/assignments/count/count_request_builder.rb index 1019a92333..85d9984c44 100644 --- a/lib/device_management/device_enrollment_configurations/item/assignments/count/count_request_builder.rb +++ b/lib/device_management/device_enrollment_configurations/item/assignments/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceEnrollmentConfigurations/{deviceEnrollmentConfiguration%2Did}/assignments/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceEnrollmentConfigurations/{deviceEnrollmentConfiguration%2Did}/assignments/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/device_enrollment_configurations/item/assignments/item/enrollment_configuration_assignment_item_request_builder.rb b/lib/device_management/device_enrollment_configurations/item/assignments/item/enrollment_configuration_assignment_item_request_builder.rb index 747b03f7cf..2dca516b3a 100644 --- a/lib/device_management/device_enrollment_configurations/item/assignments/item/enrollment_configuration_assignment_item_request_builder.rb +++ b/lib/device_management/device_enrollment_configurations/item/assignments/item/enrollment_configuration_assignment_item_request_builder.rb @@ -25,7 +25,7 @@ class EnrollmentConfigurationAssignmentItemRequestBuilder < MicrosoftKiotaAbstra ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceEnrollmentConfigurations/{deviceEnrollmentConfiguration%2Did}/assignments/{enrollmentConfigurationAssignment%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceEnrollmentConfigurations/{deviceEnrollmentConfiguration%2Did}/assignments/{enrollmentConfigurationAssignment%2Did}{?%24expand,%24select}") end ## ## Deletes a enrollmentConfigurationAssignment. @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::EnrollmentConfigurationAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::EnrollmentConfigurationAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a enrollment_configuration_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return EnrollmentConfigurationAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the enrollmentConfigurationAssignment object. diff --git a/lib/device_management/device_enrollment_configurations/item/device_enrollment_configuration_item_request_builder.rb b/lib/device_management/device_enrollment_configurations/item/device_enrollment_configuration_item_request_builder.rb index 87a9555977..b12bb47f06 100644 --- a/lib/device_management/device_enrollment_configurations/item/device_enrollment_configuration_item_request_builder.rb +++ b/lib/device_management/device_enrollment_configurations/item/device_enrollment_configuration_item_request_builder.rb @@ -39,7 +39,7 @@ def set_priority() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceEnrollmentConfigurations/{deviceEnrollmentConfiguration%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceEnrollmentConfigurations/{deviceEnrollmentConfiguration%2Did}{?%24expand,%24select}") end ## ## Deletes a deviceEnrollmentWindowsHelloForBusinessConfiguration. @@ -51,12 +51,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Read properties and relationships of the deviceEnrollmentConfiguration object. + ## Read properties and relationships of the deviceEnrollmentLimitConfiguration object. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of device_enrollment_configuration ## @@ -65,12 +64,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceEnrollmentConfiguration.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Update the properties of a deviceEnrollmentPlatformRestrictionsConfiguration object. + ## Update the properties of a deviceEnrollmentWindowsHelloForBusinessConfiguration object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of device_enrollment_configuration @@ -81,8 +79,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceEnrollmentConfiguration.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -92,35 +89,36 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Read properties and relationships of the deviceEnrollmentConfiguration object. + ## Read properties and relationships of the deviceEnrollmentLimitConfiguration object. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Update the properties of a deviceEnrollmentPlatformRestrictionsConfiguration object. + ## Update the properties of a deviceEnrollmentWindowsHelloForBusinessConfiguration object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -128,20 +126,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_enrollment_configuration_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceEnrollmentConfigurationItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Read properties and relationships of the deviceEnrollmentConfiguration object. + # Read properties and relationships of the deviceEnrollmentLimitConfiguration object. class DeviceEnrollmentConfigurationItemRequestBuilderGetQueryParameters ## diff --git a/lib/device_management/device_enrollment_configurations/item/set_priority/set_priority_post_request_body.rb b/lib/device_management/device_enrollment_configurations/item/set_priority/set_priority_post_request_body.rb index 957d0898ef..60935774f0 100644 --- a/lib/device_management/device_enrollment_configurations/item/set_priority/set_priority_post_request_body.rb +++ b/lib/device_management/device_enrollment_configurations/item/set_priority/set_priority_post_request_body.rb @@ -19,22 +19,22 @@ class SetPriorityPostRequestBody # The priority property @priority ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new setPriorityPostRequestBody and sets the default values. + ## Instantiates a new SetPriorityPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/device_enrollment_configurations/item/set_priority/set_priority_request_builder.rb b/lib/device_management/device_enrollment_configurations/item/set_priority/set_priority_request_builder.rb index 33786ff464..5152f9c512 100644 --- a/lib/device_management/device_enrollment_configurations/item/set_priority/set_priority_request_builder.rb +++ b/lib/device_management/device_enrollment_configurations/item/set_priority/set_priority_request_builder.rb @@ -36,8 +36,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a set_priority_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SetPriorityRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/device_management_partners/count/count_request_builder.rb b/lib/device_management/device_management_partners/count/count_request_builder.rb index 600f61ef67..ec55adcac1 100644 --- a/lib/device_management/device_management_partners/count/count_request_builder.rb +++ b/lib/device_management/device_management_partners/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceManagementPartners/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceManagementPartners/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/device_management_partners/device_management_partners_request_builder.rb b/lib/device_management/device_management_partners/device_management_partners_request_builder.rb index 53c5c7e5fa..9f36d89036 100644 --- a/lib/device_management/device_management_partners/device_management_partners_request_builder.rb +++ b/lib/device_management/device_management_partners/device_management_partners_request_builder.rb @@ -38,7 +38,7 @@ def by_device_management_partner_id(device_management_partner_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceManagementPartners{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceManagementPartners{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the deviceManagementPartner objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceManagementPartnerCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceManagementPartner.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_management_partners_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceManagementPartnersRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the deviceManagementPartner objects. diff --git a/lib/device_management/device_management_partners/item/device_management_partner_item_request_builder.rb b/lib/device_management/device_management_partners/item/device_management_partner_item_request_builder.rb index 1b9542df06..7129775981 100644 --- a/lib/device_management/device_management_partners/item/device_management_partner_item_request_builder.rb +++ b/lib/device_management/device_management_partners/item/device_management_partner_item_request_builder.rb @@ -27,7 +27,7 @@ def terminate() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceManagementPartners/{deviceManagementPartner%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/deviceManagementPartners/{deviceManagementPartner%2Did}{?%24expand,%24select}") end ## ## Deletes a deviceManagementPartner. @@ -39,8 +39,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -53,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceManagementPartner.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -69,8 +67,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceManagementPartner.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -80,13 +77,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -96,15 +94,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -116,17 +114,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_management_partner_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceManagementPartnerItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the deviceManagementPartner object. diff --git a/lib/device_management/device_management_partners/item/terminate/terminate_request_builder.rb b/lib/device_management/device_management_partners/item/terminate/terminate_request_builder.rb index cbf4438691..1880a948ef 100644 --- a/lib/device_management/device_management_partners/item/terminate/terminate_request_builder.rb +++ b/lib/device_management/device_management_partners/item/terminate/terminate_request_builder.rb @@ -34,8 +34,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,15 +44,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a terminate_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TerminateRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/device_management_request_builder.rb b/lib/device_management/device_management_request_builder.rb index 1c6087ff13..5a48baffce 100644 --- a/lib/device_management/device_management_request_builder.rb +++ b/lib/device_management/device_management_request_builder.rb @@ -49,6 +49,7 @@ require_relative './user_experience_analytics_device_scores/user_experience_analytics_device_scores_request_builder' require_relative './user_experience_analytics_device_startup_history/user_experience_analytics_device_startup_history_request_builder' require_relative './user_experience_analytics_device_startup_processes/user_experience_analytics_device_startup_processes_request_builder' +require_relative './user_experience_analytics_device_startup_process_performance/user_experience_analytics_device_startup_process_performance_request_builder' require_relative './user_experience_analytics_metric_history/user_experience_analytics_metric_history_request_builder' require_relative './user_experience_analytics_model_scores/user_experience_analytics_model_scores_request_builder' require_relative './user_experience_analytics_overview/user_experience_analytics_overview_request_builder' @@ -58,6 +59,7 @@ require_relative './user_experience_analytics_work_from_anywhere_metrics/user_experience_analytics_work_from_anywhere_metrics_request_builder' require_relative './user_experience_analytics_work_from_anywhere_model_performance/user_experience_analytics_work_from_anywhere_model_performance_request_builder' require_relative './verify_windows_enrollment_auto_discovery_with_domain_name/verify_windows_enrollment_auto_discovery_with_domain_name_request_builder' +require_relative './virtual_endpoint/virtual_endpoint_request_builder' require_relative './windows_autopilot_device_identities/windows_autopilot_device_identities_request_builder' require_relative './windows_information_protection_app_learning_summaries/windows_information_protection_app_learning_summaries_request_builder' require_relative './windows_information_protection_network_learning_summaries/windows_information_protection_network_learning_summaries_request_builder' @@ -295,6 +297,11 @@ def user_experience_analytics_device_startup_processes() return MicrosoftGraph::DeviceManagement::UserExperienceAnalyticsDeviceStartupProcesses::UserExperienceAnalyticsDeviceStartupProcessesRequestBuilder.new(@path_parameters, @request_adapter) end ## + # Provides operations to manage the userExperienceAnalyticsDeviceStartupProcessPerformance property of the microsoft.graph.deviceManagement entity. + def user_experience_analytics_device_startup_process_performance() + return MicrosoftGraph::DeviceManagement::UserExperienceAnalyticsDeviceStartupProcessPerformance::UserExperienceAnalyticsDeviceStartupProcessPerformanceRequestBuilder.new(@path_parameters, @request_adapter) + end + ## # Provides operations to manage the userExperienceAnalyticsMetricHistory property of the microsoft.graph.deviceManagement entity. def user_experience_analytics_metric_history() return MicrosoftGraph::DeviceManagement::UserExperienceAnalyticsMetricHistory::UserExperienceAnalyticsMetricHistoryRequestBuilder.new(@path_parameters, @request_adapter) @@ -335,6 +342,11 @@ def user_experience_analytics_work_from_anywhere_model_performance() return MicrosoftGraph::DeviceManagement::UserExperienceAnalyticsWorkFromAnywhereModelPerformance::UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilder.new(@path_parameters, @request_adapter) end ## + # Provides operations to manage the virtualEndpoint property of the microsoft.graph.deviceManagement entity. + def virtual_endpoint() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::VirtualEndpointRequestBuilder.new(@path_parameters, @request_adapter) + end + ## # Provides operations to manage the windowsAutopilotDeviceIdentities property of the microsoft.graph.deviceManagement entity. def windows_autopilot_device_identities() return MicrosoftGraph::DeviceManagement::WindowsAutopilotDeviceIdentities::WindowsAutopilotDeviceIdentitiesRequestBuilder.new(@path_parameters, @request_adapter) @@ -361,7 +373,7 @@ def windows_malware_information() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement{?%24expand,%24select}") end ## ## Read properties and relationships of the deviceManagement object. @@ -373,8 +385,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceManagement.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -398,8 +409,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceManagement.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -409,15 +419,15 @@ def patch(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -429,15 +439,15 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -449,6 +459,15 @@ def verify_windows_enrollment_auto_discovery_with_domain_name(domain_name) raise StandardError, 'domain_name cannot be null' if domain_name.nil? return VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameRequestBuilder.new(@path_parameters, @request_adapter, domainName) end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_management_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceManagementRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the deviceManagement object. diff --git a/lib/device_management/exchange_connectors/count/count_request_builder.rb b/lib/device_management/exchange_connectors/count/count_request_builder.rb index 4e5ecc11e2..c443115980 100644 --- a/lib/device_management/exchange_connectors/count/count_request_builder.rb +++ b/lib/device_management/exchange_connectors/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/exchangeConnectors/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/exchangeConnectors/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/exchange_connectors/exchange_connectors_request_builder.rb b/lib/device_management/exchange_connectors/exchange_connectors_request_builder.rb index dc15c501f2..2590b43cbd 100644 --- a/lib/device_management/exchange_connectors/exchange_connectors_request_builder.rb +++ b/lib/device_management/exchange_connectors/exchange_connectors_request_builder.rb @@ -38,7 +38,7 @@ def by_device_management_exchange_connector_id(device_management_exchange_connec ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/exchangeConnectors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/exchangeConnectors{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the deviceManagementExchangeConnector objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceManagementExchangeConnectorCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceManagementExchangeConnector.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a exchange_connectors_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ExchangeConnectorsRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the deviceManagementExchangeConnector objects. diff --git a/lib/device_management/exchange_connectors/item/device_management_exchange_connector_item_request_builder.rb b/lib/device_management/exchange_connectors/item/device_management_exchange_connector_item_request_builder.rb index bbb100de1d..cf8d47eaf5 100644 --- a/lib/device_management/exchange_connectors/item/device_management_exchange_connector_item_request_builder.rb +++ b/lib/device_management/exchange_connectors/item/device_management_exchange_connector_item_request_builder.rb @@ -27,7 +27,7 @@ def sync() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/exchangeConnectors/{deviceManagementExchangeConnector%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/exchangeConnectors/{deviceManagementExchangeConnector%2Did}{?%24expand,%24select}") end ## ## Deletes a deviceManagementExchangeConnector. @@ -39,8 +39,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -53,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceManagementExchangeConnector.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -69,8 +67,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceManagementExchangeConnector.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -80,13 +77,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -96,15 +94,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -116,17 +114,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_management_exchange_connector_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceManagementExchangeConnectorItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the deviceManagementExchangeConnector object. diff --git a/lib/device_management/exchange_connectors/item/sync/sync_post_request_body.rb b/lib/device_management/exchange_connectors/item/sync/sync_post_request_body.rb index e4649131d4..879698452b 100644 --- a/lib/device_management/exchange_connectors/item/sync/sync_post_request_body.rb +++ b/lib/device_management/exchange_connectors/item/sync/sync_post_request_body.rb @@ -20,22 +20,22 @@ class SyncPostRequestBody # The type of Exchange Connector sync requested. @sync_type ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new syncPostRequestBody and sets the default values. + ## Instantiates a new SyncPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/exchange_connectors/item/sync/sync_request_builder.rb b/lib/device_management/exchange_connectors/item/sync/sync_request_builder.rb index d9e9d80d89..71c6785d7d 100644 --- a/lib/device_management/exchange_connectors/item/sync/sync_request_builder.rb +++ b/lib/device_management/exchange_connectors/item/sync/sync_request_builder.rb @@ -36,8 +36,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a sync_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SyncRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/get_effective_permissions_with_scope/get_effective_permissions_with_scope.rb b/lib/device_management/get_effective_permissions_with_scope/get_effective_permissions_with_scope.rb index 640d7ce041..a04b8d2ed5 100644 --- a/lib/device_management/get_effective_permissions_with_scope/get_effective_permissions_with_scope.rb +++ b/lib/device_management/get_effective_permissions_with_scope/get_effective_permissions_with_scope.rb @@ -1 +1 @@ -require_relative 'get_effective_permissions_with_scope_response' +require_relative 'get_effective_permissions_with_scope_get_response' diff --git a/lib/device_management/get_effective_permissions_with_scope/get_effective_permissions_with_scope_get_response.rb b/lib/device_management/get_effective_permissions_with_scope/get_effective_permissions_with_scope_get_response.rb new file mode 100644 index 0000000000..5b1cc5dd06 --- /dev/null +++ b/lib/device_management/get_effective_permissions_with_scope/get_effective_permissions_with_scope_get_response.rb @@ -0,0 +1,69 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/base_collection_pagination_count_response' +require_relative '../../models/role_permission' +require_relative '../device_management' +require_relative './get_effective_permissions_with_scope' + +module MicrosoftGraph + module DeviceManagement + module GetEffectivePermissionsWithScope + class GetEffectivePermissionsWithScopeGetResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetEffectivePermissionsWithScopeGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_effective_permissions_with_scope_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetEffectivePermissionsWithScopeGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::RolePermission.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a role_permission + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/device_management/get_effective_permissions_with_scope/get_effective_permissions_with_scope_request_builder.rb b/lib/device_management/get_effective_permissions_with_scope/get_effective_permissions_with_scope_request_builder.rb index 98287f1d62..7e4a64b5f2 100644 --- a/lib/device_management/get_effective_permissions_with_scope/get_effective_permissions_with_scope_request_builder.rb +++ b/lib/device_management/get_effective_permissions_with_scope/get_effective_permissions_with_scope_request_builder.rb @@ -19,21 +19,20 @@ class GetEffectivePermissionsWithScopeRequestBuilder < MicrosoftKiotaAbstraction ## @return a void ## def initialize(path_parameters, request_adapter, scope=nil) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/getEffectivePermissions(scope='{scope}'){?%24top,%24skip,%24search,%24filter,%24count}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/getEffectivePermissions(scope='{scope}'){?%24count,%24filter,%24search,%24skip,%24top}") end ## ## Retrieves the effective permissions of the currently authenticated user ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_effective_permissions_with_scope_response + ## @return a Fiber of get_effective_permissions_with_scope_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceManagement::GetEffectivePermissionsWithScope::GetEffectivePermissionsWithScopeResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceManagement::GetEffectivePermissionsWithScope::GetEffectivePermissionsWithScopeGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Retrieves the effective permissions of the currently authenticated user @@ -42,17 +41,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_effective_permissions_with_scope_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetEffectivePermissionsWithScopeRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieves the effective permissions of the currently authenticated user diff --git a/lib/device_management/get_effective_permissions_with_scope/get_effective_permissions_with_scope_response.rb b/lib/device_management/get_effective_permissions_with_scope/get_effective_permissions_with_scope_response.rb deleted file mode 100644 index 0046f0bffc..0000000000 --- a/lib/device_management/get_effective_permissions_with_scope/get_effective_permissions_with_scope_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../microsoft_graph' -require_relative '../../models/base_collection_pagination_count_response' -require_relative '../../models/role_permission' -require_relative '../device_management' -require_relative './get_effective_permissions_with_scope' - -module MicrosoftGraph - module DeviceManagement - module GetEffectivePermissionsWithScope - class GetEffectivePermissionsWithScopeResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getEffectivePermissionsWithScopeResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_effective_permissions_with_scope_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetEffectivePermissionsWithScopeResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::RolePermission.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a role_permission - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end -end diff --git a/lib/device_management/imported_windows_autopilot_device_identities/count/count_request_builder.rb b/lib/device_management/imported_windows_autopilot_device_identities/count/count_request_builder.rb index 54662d6e30..aa2940b687 100644 --- a/lib/device_management/imported_windows_autopilot_device_identities/count/count_request_builder.rb +++ b/lib/device_management/imported_windows_autopilot_device_identities/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/importedWindowsAutopilotDeviceIdentities/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/importedWindowsAutopilotDeviceIdentities/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/imported_windows_autopilot_device_identities/import/import.rb b/lib/device_management/imported_windows_autopilot_device_identities/import/import.rb index 4c43dbfaf2..65d51bc872 100644 --- a/lib/device_management/imported_windows_autopilot_device_identities/import/import.rb +++ b/lib/device_management/imported_windows_autopilot_device_identities/import/import.rb @@ -1,2 +1,2 @@ require_relative 'import_post_request_body' -require_relative 'import_response' +require_relative 'import_post_response' diff --git a/lib/device_management/imported_windows_autopilot_device_identities/import/import_post_request_body.rb b/lib/device_management/imported_windows_autopilot_device_identities/import/import_post_request_body.rb index 7bdeb569af..9b5ed14835 100644 --- a/lib/device_management/imported_windows_autopilot_device_identities/import/import_post_request_body.rb +++ b/lib/device_management/imported_windows_autopilot_device_identities/import/import_post_request_body.rb @@ -18,22 +18,22 @@ class ImportPostRequestBody # The importedWindowsAutopilotDeviceIdentities property @imported_windows_autopilot_device_identities ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new importPostRequestBody and sets the default values. + ## Instantiates a new ImportPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/imported_windows_autopilot_device_identities/import/import_post_response.rb b/lib/device_management/imported_windows_autopilot_device_identities/import/import_post_response.rb new file mode 100644 index 0000000000..c7c910974d --- /dev/null +++ b/lib/device_management/imported_windows_autopilot_device_identities/import/import_post_response.rb @@ -0,0 +1,72 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../../models/imported_windows_autopilot_device_identity' +require_relative '../../device_management' +require_relative '../imported_windows_autopilot_device_identities' +require_relative './import' + +module MicrosoftGraph + module DeviceManagement + module ImportedWindowsAutopilotDeviceIdentities + module Import + class ImportPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new ImportPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a import_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return ImportPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ImportedWindowsAutopilotDeviceIdentity.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a imported_windows_autopilot_device_identity + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/device_management/imported_windows_autopilot_device_identities/import/import_request_builder.rb b/lib/device_management/imported_windows_autopilot_device_identities/import/import_request_builder.rb index 31bf233163..89091f408e 100644 --- a/lib/device_management/imported_windows_autopilot_device_identities/import/import_request_builder.rb +++ b/lib/device_management/imported_windows_autopilot_device_identities/import/import_request_builder.rb @@ -26,7 +26,7 @@ def initialize(path_parameters, request_adapter) ## Not yet documented ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of import_response + ## @return a Fiber of import_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,9 +34,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceManagement::ImportedWindowsAutopilotDeviceIdentities::Import::ImportResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceManagement::ImportedWindowsAutopilotDeviceIdentities::Import::ImportPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Not yet documented @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a import_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ImportRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/imported_windows_autopilot_device_identities/import/import_response.rb b/lib/device_management/imported_windows_autopilot_device_identities/import/import_response.rb deleted file mode 100644 index f71db7edfe..0000000000 --- a/lib/device_management/imported_windows_autopilot_device_identities/import/import_response.rb +++ /dev/null @@ -1,72 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../../models/imported_windows_autopilot_device_identity' -require_relative '../../device_management' -require_relative '../imported_windows_autopilot_device_identities' -require_relative './import' - -module MicrosoftGraph - module DeviceManagement - module ImportedWindowsAutopilotDeviceIdentities - module Import - class ImportResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new importResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a import_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return ImportResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ImportedWindowsAutopilotDeviceIdentity.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a imported_windows_autopilot_device_identity - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/device_management/imported_windows_autopilot_device_identities/imported_windows_autopilot_device_identities_request_builder.rb b/lib/device_management/imported_windows_autopilot_device_identities/imported_windows_autopilot_device_identities_request_builder.rb index 46d95e8e89..1ccdf093ff 100644 --- a/lib/device_management/imported_windows_autopilot_device_identities/imported_windows_autopilot_device_identities_request_builder.rb +++ b/lib/device_management/imported_windows_autopilot_device_identities/imported_windows_autopilot_device_identities_request_builder.rb @@ -44,7 +44,7 @@ def by_imported_windows_autopilot_device_identity_id(imported_windows_autopilot_ ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/importedWindowsAutopilotDeviceIdentities{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/importedWindowsAutopilotDeviceIdentities{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the importedWindowsAutopilotDeviceIdentity objects. @@ -56,8 +56,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ImportedWindowsAutopilotDeviceIdentityCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -72,8 +71,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ImportedWindowsAutopilotDeviceIdentity.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -83,15 +81,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -103,17 +101,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a imported_windows_autopilot_device_identities_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ImportedWindowsAutopilotDeviceIdentitiesRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the importedWindowsAutopilotDeviceIdentity objects. diff --git a/lib/device_management/imported_windows_autopilot_device_identities/item/imported_windows_autopilot_device_identity_item_request_builder.rb b/lib/device_management/imported_windows_autopilot_device_identities/item/imported_windows_autopilot_device_identity_item_request_builder.rb index 9a775c4331..b4758cbf16 100644 --- a/lib/device_management/imported_windows_autopilot_device_identities/item/imported_windows_autopilot_device_identity_item_request_builder.rb +++ b/lib/device_management/imported_windows_autopilot_device_identities/item/imported_windows_autopilot_device_identity_item_request_builder.rb @@ -21,7 +21,7 @@ class ImportedWindowsAutopilotDeviceIdentityItemRequestBuilder < MicrosoftKiotaA ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/importedWindowsAutopilotDeviceIdentities/{importedWindowsAutopilotDeviceIdentity%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/importedWindowsAutopilotDeviceIdentities/{importedWindowsAutopilotDeviceIdentity%2Did}{?%24expand,%24select}") end ## ## Deletes a importedWindowsAutopilotDeviceIdentity. @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ImportedWindowsAutopilotDeviceIdentity.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ImportedWindowsAutopilotDeviceIdentity.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a imported_windows_autopilot_device_identity_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ImportedWindowsAutopilotDeviceIdentityItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the importedWindowsAutopilotDeviceIdentity object. diff --git a/lib/device_management/ios_update_statuses/count/count_request_builder.rb b/lib/device_management/ios_update_statuses/count/count_request_builder.rb index 5ebb300943..1c42e121bd 100644 --- a/lib/device_management/ios_update_statuses/count/count_request_builder.rb +++ b/lib/device_management/ios_update_statuses/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/iosUpdateStatuses/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/iosUpdateStatuses/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/ios_update_statuses/ios_update_statuses_request_builder.rb b/lib/device_management/ios_update_statuses/ios_update_statuses_request_builder.rb index 38c1634cff..b64a42136c 100644 --- a/lib/device_management/ios_update_statuses/ios_update_statuses_request_builder.rb +++ b/lib/device_management/ios_update_statuses/ios_update_statuses_request_builder.rb @@ -38,7 +38,7 @@ def by_ios_update_device_status_id(ios_update_device_status_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/iosUpdateStatuses{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/iosUpdateStatuses{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the iosUpdateDeviceStatus objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::IosUpdateDeviceStatusCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::IosUpdateDeviceStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ios_update_statuses_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return IosUpdateStatusesRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the iosUpdateDeviceStatus objects. diff --git a/lib/device_management/ios_update_statuses/item/ios_update_device_status_item_request_builder.rb b/lib/device_management/ios_update_statuses/item/ios_update_device_status_item_request_builder.rb index 6733a03a9d..46f1c8d63e 100644 --- a/lib/device_management/ios_update_statuses/item/ios_update_device_status_item_request_builder.rb +++ b/lib/device_management/ios_update_statuses/item/ios_update_device_status_item_request_builder.rb @@ -21,7 +21,7 @@ class IosUpdateDeviceStatusItemRequestBuilder < MicrosoftKiotaAbstractions::Base ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/iosUpdateStatuses/{iosUpdateDeviceStatus%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/iosUpdateStatuses/{iosUpdateDeviceStatus%2Did}{?%24expand,%24select}") end ## ## Deletes a iosUpdateDeviceStatus. @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::IosUpdateDeviceStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::IosUpdateDeviceStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ios_update_device_status_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return IosUpdateDeviceStatusItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the iosUpdateDeviceStatus object. diff --git a/lib/device_management/managed_device_overview/managed_device_overview_request_builder.rb b/lib/device_management/managed_device_overview/managed_device_overview_request_builder.rb index e85025d34a..2796318226 100644 --- a/lib/device_management/managed_device_overview/managed_device_overview_request_builder.rb +++ b/lib/device_management/managed_device_overview/managed_device_overview_request_builder.rb @@ -19,10 +19,10 @@ class ManagedDeviceOverviewRequestBuilder < MicrosoftKiotaAbstractions::BaseRequ ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDeviceOverview{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDeviceOverview{?%24expand,%24select}") end ## - ## Read properties and relationships of the managedDeviceOverview object. + ## Device overview ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of managed_device_overview ## @@ -31,31 +31,39 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDeviceOverview.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Read properties and relationships of the managedDeviceOverview object. + ## Device overview ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a managed_device_overview_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagedDeviceOverviewRequestBuilder.new(raw_url, @request_adapter) + end ## - # Read properties and relationships of the managedDeviceOverview object. + # Device overview class ManagedDeviceOverviewRequestBuilderGetQueryParameters ## diff --git a/lib/device_management/managed_devices/count/count_request_builder.rb b/lib/device_management/managed_devices/count/count_request_builder.rb index 45b360ad7b..f59e16228b 100644 --- a/lib/device_management/managed_devices/count/count_request_builder.rb +++ b/lib/device_management/managed_devices/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/managed_devices/item/bypass_activation_lock/bypass_activation_lock_request_builder.rb b/lib/device_management/managed_devices/item/bypass_activation_lock/bypass_activation_lock_request_builder.rb index a06549ed7b..2f3a301ddf 100644 --- a/lib/device_management/managed_devices/item/bypass_activation_lock/bypass_activation_lock_request_builder.rb +++ b/lib/device_management/managed_devices/item/bypass_activation_lock/bypass_activation_lock_request_builder.rb @@ -34,8 +34,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,15 +44,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a bypass_activation_lock_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BypassActivationLockRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/managed_devices/item/clean_windows_device/clean_windows_device_post_request_body.rb b/lib/device_management/managed_devices/item/clean_windows_device/clean_windows_device_post_request_body.rb index 5c30f210c3..cb2e914ac6 100644 --- a/lib/device_management/managed_devices/item/clean_windows_device/clean_windows_device_post_request_body.rb +++ b/lib/device_management/managed_devices/item/clean_windows_device/clean_windows_device_post_request_body.rb @@ -19,22 +19,22 @@ class CleanWindowsDevicePostRequestBody # The keepUserData property @keep_user_data ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new cleanWindowsDevicePostRequestBody and sets the default values. + ## Instantiates a new CleanWindowsDevicePostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/managed_devices/item/clean_windows_device/clean_windows_device_request_builder.rb b/lib/device_management/managed_devices/item/clean_windows_device/clean_windows_device_request_builder.rb index 8abf56f398..481733e9d0 100644 --- a/lib/device_management/managed_devices/item/clean_windows_device/clean_windows_device_request_builder.rb +++ b/lib/device_management/managed_devices/item/clean_windows_device/clean_windows_device_request_builder.rb @@ -36,8 +36,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a clean_windows_device_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CleanWindowsDeviceRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/managed_devices/item/delete_user_from_shared_apple_device/delete_user_from_shared_apple_device_post_request_body.rb b/lib/device_management/managed_devices/item/delete_user_from_shared_apple_device/delete_user_from_shared_apple_device_post_request_body.rb index b263629004..d5b5f4dc0c 100644 --- a/lib/device_management/managed_devices/item/delete_user_from_shared_apple_device/delete_user_from_shared_apple_device_post_request_body.rb +++ b/lib/device_management/managed_devices/item/delete_user_from_shared_apple_device/delete_user_from_shared_apple_device_post_request_body.rb @@ -19,22 +19,22 @@ class DeleteUserFromSharedAppleDevicePostRequestBody # The userPrincipalName property @user_principal_name ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new deleteUserFromSharedAppleDevicePostRequestBody and sets the default values. + ## Instantiates a new DeleteUserFromSharedAppleDevicePostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/managed_devices/item/delete_user_from_shared_apple_device/delete_user_from_shared_apple_device_request_builder.rb b/lib/device_management/managed_devices/item/delete_user_from_shared_apple_device/delete_user_from_shared_apple_device_request_builder.rb index 92187f0601..654365eb2e 100644 --- a/lib/device_management/managed_devices/item/delete_user_from_shared_apple_device/delete_user_from_shared_apple_device_request_builder.rb +++ b/lib/device_management/managed_devices/item/delete_user_from_shared_apple_device/delete_user_from_shared_apple_device_request_builder.rb @@ -36,8 +36,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a delete_user_from_shared_apple_device_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeleteUserFromSharedAppleDeviceRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/managed_devices/item/device_category/device_category_request_builder.rb b/lib/device_management/managed_devices/item/device_category/device_category_request_builder.rb index 5e9b4f5e25..2ae276c14c 100644 --- a/lib/device_management/managed_devices/item/device_category/device_category_request_builder.rb +++ b/lib/device_management/managed_devices/item/device_category/device_category_request_builder.rb @@ -6,6 +6,7 @@ require_relative '../../managed_devices' require_relative '../item' require_relative './device_category' +require_relative './ref/ref_request_builder' module MicrosoftGraph module DeviceManagement @@ -16,6 +17,11 @@ module DeviceCategory # Provides operations to manage the deviceCategory property of the microsoft.graph.managedDevice entity. class DeviceCategoryRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + ## + # Provides operations to manage the collection of deviceManagement entities. + def ref() + return MicrosoftGraph::DeviceManagement::ManagedDevices::Item::DeviceCategory::Ref::RefRequestBuilder.new(@path_parameters, @request_adapter) + end ## ## Instantiates a new DeviceCategoryRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request @@ -23,7 +29,7 @@ class DeviceCategoryRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuil ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/deviceCategory{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/deviceCategory{?%24expand,%24select}") end ## ## Delete navigation property deviceCategory for deviceManagement @@ -35,12 +41,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Read properties and relationships of the deviceCategory object. + ## Device category ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of device_category ## @@ -49,12 +54,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCategory.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Update the properties of a deviceCategory object. + ## Update the navigation property deviceCategory in deviceManagement ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of device_category @@ -65,8 +69,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCategory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,35 +79,36 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Read properties and relationships of the deviceCategory object. + ## Device category ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Update the properties of a deviceCategory object. + ## Update the navigation property deviceCategory in deviceManagement ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -112,20 +116,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_category_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceCategoryRequestBuilder.new(raw_url, @request_adapter) + end ## - # Read properties and relationships of the deviceCategory object. + # Device category class DeviceCategoryRequestBuilderGetQueryParameters ## diff --git a/lib/me/calendars/item/calendar_view/item/extensions/extensions.rb b/lib/device_management/managed_devices/item/device_category/ref/ref.rb similarity index 100% rename from lib/me/calendars/item/calendar_view/item/extensions/extensions.rb rename to lib/device_management/managed_devices/item/device_category/ref/ref.rb diff --git a/lib/device_management/managed_devices/item/device_category/ref/ref_request_builder.rb b/lib/device_management/managed_devices/item/device_category/ref/ref_request_builder.rb new file mode 100644 index 0000000000..40dc4fdcfc --- /dev/null +++ b/lib/device_management/managed_devices/item/device_category/ref/ref_request_builder.rb @@ -0,0 +1,140 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../models/reference_update' +require_relative '../../../../device_management' +require_relative '../../../managed_devices' +require_relative '../../item' +require_relative '../device_category' +require_relative './ref' + +module MicrosoftGraph + module DeviceManagement + module ManagedDevices + module Item + module DeviceCategory + module Ref + ## + # Provides operations to manage the collection of deviceManagement entities. + class RefRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new RefRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/deviceCategory/$ref") + end + ## + ## Delete ref of navigation property deviceCategory for deviceManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Device category + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of string + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, string, error_mapping) + end + ## + ## Update the ref of navigation property deviceCategory in deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def put(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_put_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Delete ref of navigation property deviceCategory for deviceManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Device category + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the ref of navigation property deviceCategory in deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_put_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PUT + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ref_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RefRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end +end diff --git a/lib/device_management/managed_devices/item/device_compliance_policy_states/count/count_request_builder.rb b/lib/device_management/managed_devices/item/device_compliance_policy_states/count/count_request_builder.rb index 9073b197a2..7a84941561 100644 --- a/lib/device_management/managed_devices/item/device_compliance_policy_states/count/count_request_builder.rb +++ b/lib/device_management/managed_devices/item/device_compliance_policy_states/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/deviceCompliancePolicyStates/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/deviceCompliancePolicyStates/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/managed_devices/item/device_compliance_policy_states/device_compliance_policy_states_request_builder.rb b/lib/device_management/managed_devices/item/device_compliance_policy_states/device_compliance_policy_states_request_builder.rb index 256a43d68b..2366918c1b 100644 --- a/lib/device_management/managed_devices/item/device_compliance_policy_states/device_compliance_policy_states_request_builder.rb +++ b/lib/device_management/managed_devices/item/device_compliance_policy_states/device_compliance_policy_states_request_builder.rb @@ -42,7 +42,7 @@ def by_device_compliance_policy_state_id(device_compliance_policy_state_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/deviceCompliancePolicyStates{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/deviceCompliancePolicyStates{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Device compliance policy states for this device. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCompliancePolicyStateCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCompliancePolicyState.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_compliance_policy_states_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceCompliancePolicyStatesRequestBuilder.new(raw_url, @request_adapter) + end ## # Device compliance policy states for this device. diff --git a/lib/device_management/managed_devices/item/device_compliance_policy_states/item/device_compliance_policy_state_item_request_builder.rb b/lib/device_management/managed_devices/item/device_compliance_policy_states/item/device_compliance_policy_state_item_request_builder.rb index ab483ebc98..a66205711a 100644 --- a/lib/device_management/managed_devices/item/device_compliance_policy_states/item/device_compliance_policy_state_item_request_builder.rb +++ b/lib/device_management/managed_devices/item/device_compliance_policy_states/item/device_compliance_policy_state_item_request_builder.rb @@ -25,7 +25,7 @@ class DeviceCompliancePolicyStateItemRequestBuilder < MicrosoftKiotaAbstractions ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/deviceCompliancePolicyStates/{deviceCompliancePolicyState%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/deviceCompliancePolicyStates/{deviceCompliancePolicyState%2Did}{?%24expand,%24select}") end ## ## Delete navigation property deviceCompliancePolicyStates for deviceManagement @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCompliancePolicyState.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCompliancePolicyState.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_compliance_policy_state_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceCompliancePolicyStateItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Device compliance policy states for this device. diff --git a/lib/device_management/managed_devices/item/device_configuration_states/count/count_request_builder.rb b/lib/device_management/managed_devices/item/device_configuration_states/count/count_request_builder.rb index 5ab9350981..1e81e5adea 100644 --- a/lib/device_management/managed_devices/item/device_configuration_states/count/count_request_builder.rb +++ b/lib/device_management/managed_devices/item/device_configuration_states/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/deviceConfigurationStates/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/deviceConfigurationStates/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/managed_devices/item/device_configuration_states/device_configuration_states_request_builder.rb b/lib/device_management/managed_devices/item/device_configuration_states/device_configuration_states_request_builder.rb index 5d744574b6..106a22581c 100644 --- a/lib/device_management/managed_devices/item/device_configuration_states/device_configuration_states_request_builder.rb +++ b/lib/device_management/managed_devices/item/device_configuration_states/device_configuration_states_request_builder.rb @@ -42,7 +42,7 @@ def by_device_configuration_state_id(device_configuration_state_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/deviceConfigurationStates{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/deviceConfigurationStates{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Device configuration states for this device. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationStateCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationState.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_configuration_states_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceConfigurationStatesRequestBuilder.new(raw_url, @request_adapter) + end ## # Device configuration states for this device. diff --git a/lib/device_management/managed_devices/item/device_configuration_states/item/device_configuration_state_item_request_builder.rb b/lib/device_management/managed_devices/item/device_configuration_states/item/device_configuration_state_item_request_builder.rb index 0b879c27b9..9188bcb9f0 100644 --- a/lib/device_management/managed_devices/item/device_configuration_states/item/device_configuration_state_item_request_builder.rb +++ b/lib/device_management/managed_devices/item/device_configuration_states/item/device_configuration_state_item_request_builder.rb @@ -25,7 +25,7 @@ class DeviceConfigurationStateItemRequestBuilder < MicrosoftKiotaAbstractions::B ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/deviceConfigurationStates/{deviceConfigurationState%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/deviceConfigurationStates/{deviceConfigurationState%2Did}{?%24expand,%24select}") end ## ## Delete navigation property deviceConfigurationStates for deviceManagement @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationState.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceConfigurationState.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_configuration_state_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceConfigurationStateItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Device configuration states for this device. diff --git a/lib/device_management/managed_devices/item/disable_lost_mode/disable_lost_mode_request_builder.rb b/lib/device_management/managed_devices/item/disable_lost_mode/disable_lost_mode_request_builder.rb index 6a4abc345a..3daf3fd8fe 100644 --- a/lib/device_management/managed_devices/item/disable_lost_mode/disable_lost_mode_request_builder.rb +++ b/lib/device_management/managed_devices/item/disable_lost_mode/disable_lost_mode_request_builder.rb @@ -34,8 +34,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,15 +44,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a disable_lost_mode_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DisableLostModeRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/managed_devices/item/locate_device/locate_device_request_builder.rb b/lib/device_management/managed_devices/item/locate_device/locate_device_request_builder.rb index bf219478a5..01e6155dbe 100644 --- a/lib/device_management/managed_devices/item/locate_device/locate_device_request_builder.rb +++ b/lib/device_management/managed_devices/item/locate_device/locate_device_request_builder.rb @@ -34,8 +34,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,15 +44,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a locate_device_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return LocateDeviceRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/managed_devices/item/log_collection_requests/count/count_request_builder.rb b/lib/device_management/managed_devices/item/log_collection_requests/count/count_request_builder.rb index 313afee754..e53b049c4d 100644 --- a/lib/device_management/managed_devices/item/log_collection_requests/count/count_request_builder.rb +++ b/lib/device_management/managed_devices/item/log_collection_requests/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/logCollectionRequests/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/logCollectionRequests/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url.rb b/lib/device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url.rb index 592d33e38a..a6f8b27ec0 100644 --- a/lib/device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url.rb +++ b/lib/device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url.rb @@ -1 +1 @@ -require_relative 'create_download_url_response' +require_relative 'create_download_url_post_response' diff --git a/lib/device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_post_response.rb b/lib/device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_post_response.rb new file mode 100644 index 0000000000..ff276035f5 --- /dev/null +++ b/lib/device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_post_response.rb @@ -0,0 +1,97 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../device_management' +require_relative '../../../../managed_devices' +require_relative '../../../item' +require_relative '../../log_collection_requests' +require_relative '../item' +require_relative './create_download_url' + +module MicrosoftGraph + module DeviceManagement + module ManagedDevices + module Item + module LogCollectionRequests + module Item + module CreateDownloadUrl + class CreateDownloadUrlPostResponse + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The value property + @value + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new CreateDownloadUrlPostResponse and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a create_download_url_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CreateDownloadUrlPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "value" => lambda {|n| @value = n.get_string_value() }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_string_value("value", @value) + writer.write_additional_data(@additional_data) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end + end + end +end diff --git a/lib/device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_request_builder.rb b/lib/device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_request_builder.rb index 0d5bd9d208..fb537ffba4 100644 --- a/lib/device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_request_builder.rb +++ b/lib/device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_request_builder.rb @@ -31,16 +31,15 @@ def initialize(path_parameters, request_adapter) ## ## Invoke action createDownloadUrl ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of create_download_url_response + ## @return a Fiber of create_download_url_post_response ## def post(request_configuration=nil) request_info = self.to_post_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceManagement::ManagedDevices::Item::LogCollectionRequests::Item::CreateDownloadUrl::CreateDownloadUrlResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceManagement::ManagedDevices::Item::LogCollectionRequests::Item::CreateDownloadUrl::CreateDownloadUrlPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Invoke action createDownloadUrl @@ -49,16 +48,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a create_download_url_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CreateDownloadUrlRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_response.rb b/lib/device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_response.rb deleted file mode 100644 index d327567482..0000000000 --- a/lib/device_management/managed_devices/item/log_collection_requests/item/create_download_url/create_download_url_response.rb +++ /dev/null @@ -1,97 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../../microsoft_graph' -require_relative '../../../../../device_management' -require_relative '../../../../managed_devices' -require_relative '../../../item' -require_relative '../../log_collection_requests' -require_relative '../item' -require_relative './create_download_url' - -module MicrosoftGraph - module DeviceManagement - module ManagedDevices - module Item - module LogCollectionRequests - module Item - module CreateDownloadUrl - class CreateDownloadUrlResponse - include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable - ## - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - @additional_data - ## - # The value property - @value - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @return a i_dictionary - ## - def additional_data - return @additional_data - end - ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. - ## @return a void - ## - def additional_data=(value) - @additional_data = value - end - ## - ## Instantiates a new createDownloadUrlResponse and sets the default values. - ## @return a void - ## - def initialize() - @additional_data = Hash.new - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a create_download_url_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return CreateDownloadUrlResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return { - "value" => lambda {|n| @value = n.get_string_value() }, - } - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_string_value("value", @value) - writer.write_additional_data(@additional_data) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end - end - end -end diff --git a/lib/device_management/managed_devices/item/log_collection_requests/item/device_log_collection_response_item_request_builder.rb b/lib/device_management/managed_devices/item/log_collection_requests/item/device_log_collection_response_item_request_builder.rb index a402026cbc..618b7ceb25 100644 --- a/lib/device_management/managed_devices/item/log_collection_requests/item/device_log_collection_response_item_request_builder.rb +++ b/lib/device_management/managed_devices/item/log_collection_requests/item/device_log_collection_response_item_request_builder.rb @@ -31,7 +31,7 @@ def create_download_url() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/logCollectionRequests/{deviceLogCollectionResponse%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/logCollectionRequests/{deviceLogCollectionResponse%2Did}{?%24expand,%24select}") end ## ## Delete navigation property logCollectionRequests for deviceManagement @@ -43,8 +43,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -57,8 +56,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceLogCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -73,8 +71,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceLogCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -84,13 +81,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -100,15 +98,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -120,17 +118,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_log_collection_response_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceLogCollectionResponseItemRequestBuilder.new(raw_url, @request_adapter) + end ## # List of log collection requests diff --git a/lib/device_management/managed_devices/item/log_collection_requests/log_collection_requests_request_builder.rb b/lib/device_management/managed_devices/item/log_collection_requests/log_collection_requests_request_builder.rb index f6477c0b14..870f9a9146 100644 --- a/lib/device_management/managed_devices/item/log_collection_requests/log_collection_requests_request_builder.rb +++ b/lib/device_management/managed_devices/item/log_collection_requests/log_collection_requests_request_builder.rb @@ -42,7 +42,7 @@ def by_device_log_collection_response_id(device_log_collection_response_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/logCollectionRequests{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/logCollectionRequests{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List of log collection requests @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceLogCollectionResponseCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceLogCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a log_collection_requests_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return LogCollectionRequestsRequestBuilder.new(raw_url, @request_adapter) + end ## # List of log collection requests diff --git a/lib/device_management/managed_devices/item/logout_shared_apple_device_active_user/logout_shared_apple_device_active_user_request_builder.rb b/lib/device_management/managed_devices/item/logout_shared_apple_device_active_user/logout_shared_apple_device_active_user_request_builder.rb index 65ab120118..a6cf92f5ec 100644 --- a/lib/device_management/managed_devices/item/logout_shared_apple_device_active_user/logout_shared_apple_device_active_user_request_builder.rb +++ b/lib/device_management/managed_devices/item/logout_shared_apple_device_active_user/logout_shared_apple_device_active_user_request_builder.rb @@ -34,8 +34,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,15 +44,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a logout_shared_apple_device_active_user_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return LogoutSharedAppleDeviceActiveUserRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/managed_devices/item/managed_device_item_request_builder.rb b/lib/device_management/managed_devices/item/managed_device_item_request_builder.rb index 71ec9317de..c0b16e7b89 100644 --- a/lib/device_management/managed_devices/item/managed_device_item_request_builder.rb +++ b/lib/device_management/managed_devices/item/managed_device_item_request_builder.rb @@ -165,7 +165,7 @@ def wipe() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}{?%24expand,%24select}") end ## ## Deletes a managedDevice. @@ -177,12 +177,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Read properties and relationships of the managedDevice object. + ## The list of managed devices. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of managed_device ## @@ -191,12 +190,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDevice.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Update the properties of a managedDevice object. + ## Update the navigation property managedDevices in deviceManagement ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of managed_device @@ -207,8 +205,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDevice.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -218,35 +215,36 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Read properties and relationships of the managedDevice object. + ## The list of managed devices. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Update the properties of a managedDevice object. + ## Update the navigation property managedDevices in deviceManagement ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -254,20 +252,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a managed_device_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagedDeviceItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Read properties and relationships of the managedDevice object. + # The list of managed devices. class ManagedDeviceItemRequestBuilderGetQueryParameters ## diff --git a/lib/device_management/managed_devices/item/reboot_now/reboot_now_request_builder.rb b/lib/device_management/managed_devices/item/reboot_now/reboot_now_request_builder.rb index 94930c4174..6387d9d08c 100644 --- a/lib/device_management/managed_devices/item/reboot_now/reboot_now_request_builder.rb +++ b/lib/device_management/managed_devices/item/reboot_now/reboot_now_request_builder.rb @@ -34,8 +34,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,15 +44,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a reboot_now_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RebootNowRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/managed_devices/item/recover_passcode/recover_passcode_request_builder.rb b/lib/device_management/managed_devices/item/recover_passcode/recover_passcode_request_builder.rb index f3b7d377a5..7d4a7ee617 100644 --- a/lib/device_management/managed_devices/item/recover_passcode/recover_passcode_request_builder.rb +++ b/lib/device_management/managed_devices/item/recover_passcode/recover_passcode_request_builder.rb @@ -34,8 +34,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,15 +44,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a recover_passcode_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RecoverPasscodeRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/managed_devices/item/remote_lock/remote_lock_request_builder.rb b/lib/device_management/managed_devices/item/remote_lock/remote_lock_request_builder.rb index 35b8a8f7b5..0e6bd0fa39 100644 --- a/lib/device_management/managed_devices/item/remote_lock/remote_lock_request_builder.rb +++ b/lib/device_management/managed_devices/item/remote_lock/remote_lock_request_builder.rb @@ -34,8 +34,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,15 +44,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a remote_lock_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RemoteLockRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/managed_devices/item/request_remote_assistance/request_remote_assistance_request_builder.rb b/lib/device_management/managed_devices/item/request_remote_assistance/request_remote_assistance_request_builder.rb index 3b865ee98f..f864d88410 100644 --- a/lib/device_management/managed_devices/item/request_remote_assistance/request_remote_assistance_request_builder.rb +++ b/lib/device_management/managed_devices/item/request_remote_assistance/request_remote_assistance_request_builder.rb @@ -34,8 +34,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,15 +44,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a request_remote_assistance_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RequestRemoteAssistanceRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/managed_devices/item/reset_passcode/reset_passcode_request_builder.rb b/lib/device_management/managed_devices/item/reset_passcode/reset_passcode_request_builder.rb index 6845e47365..58e799e858 100644 --- a/lib/device_management/managed_devices/item/reset_passcode/reset_passcode_request_builder.rb +++ b/lib/device_management/managed_devices/item/reset_passcode/reset_passcode_request_builder.rb @@ -34,8 +34,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,15 +44,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a reset_passcode_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ResetPasscodeRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/managed_devices/item/retire/retire_request_builder.rb b/lib/device_management/managed_devices/item/retire/retire_request_builder.rb index 2fad10dac1..22a9819574 100644 --- a/lib/device_management/managed_devices/item/retire/retire_request_builder.rb +++ b/lib/device_management/managed_devices/item/retire/retire_request_builder.rb @@ -34,8 +34,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,15 +44,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a retire_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RetireRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/managed_devices/item/shut_down/shut_down_request_builder.rb b/lib/device_management/managed_devices/item/shut_down/shut_down_request_builder.rb index f7a4e5760d..5648c93e53 100644 --- a/lib/device_management/managed_devices/item/shut_down/shut_down_request_builder.rb +++ b/lib/device_management/managed_devices/item/shut_down/shut_down_request_builder.rb @@ -34,8 +34,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,15 +44,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a shut_down_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ShutDownRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/managed_devices/item/sync_device/sync_device_request_builder.rb b/lib/device_management/managed_devices/item/sync_device/sync_device_request_builder.rb index 15635da041..387af30926 100644 --- a/lib/device_management/managed_devices/item/sync_device/sync_device_request_builder.rb +++ b/lib/device_management/managed_devices/item/sync_device/sync_device_request_builder.rb @@ -34,8 +34,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,15 +44,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a sync_device_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SyncDeviceRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/managed_devices/item/update_windows_device_account/update_windows_device_account_post_request_body.rb b/lib/device_management/managed_devices/item/update_windows_device_account/update_windows_device_account_post_request_body.rb index 0f302a48f0..dbd9e0d36e 100644 --- a/lib/device_management/managed_devices/item/update_windows_device_account/update_windows_device_account_post_request_body.rb +++ b/lib/device_management/managed_devices/item/update_windows_device_account/update_windows_device_account_post_request_body.rb @@ -20,22 +20,22 @@ class UpdateWindowsDeviceAccountPostRequestBody # The updateWindowsDeviceAccountActionParameter property @update_windows_device_account_action_parameter ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new updateWindowsDeviceAccountPostRequestBody and sets the default values. + ## Instantiates a new UpdateWindowsDeviceAccountPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/managed_devices/item/update_windows_device_account/update_windows_device_account_request_builder.rb b/lib/device_management/managed_devices/item/update_windows_device_account/update_windows_device_account_request_builder.rb index fcf8503dbe..7f1cce97c4 100644 --- a/lib/device_management/managed_devices/item/update_windows_device_account/update_windows_device_account_request_builder.rb +++ b/lib/device_management/managed_devices/item/update_windows_device_account/update_windows_device_account_request_builder.rb @@ -36,8 +36,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a update_windows_device_account_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UpdateWindowsDeviceAccountRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/managed_devices/item/users/users_request_builder.rb b/lib/device_management/managed_devices/item/users/users_request_builder.rb index bb44df5ab3..ee4d23dfe4 100644 --- a/lib/device_management/managed_devices/item/users/users_request_builder.rb +++ b/lib/device_management/managed_devices/item/users/users_request_builder.rb @@ -23,10 +23,10 @@ class UsersRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/users{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/users{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## List properties and relationships of the user objects. + ## The primary users associated with the managed device. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of user_collection_response ## @@ -35,31 +35,39 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## List properties and relationships of the user objects. + ## The primary users associated with the managed device. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a users_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UsersRequestBuilder.new(raw_url, @request_adapter) + end ## - # List properties and relationships of the user objects. + # The primary users associated with the managed device. class UsersRequestBuilderGetQueryParameters ## diff --git a/lib/device_management/managed_devices/item/windows_defender_scan/windows_defender_scan_post_request_body.rb b/lib/device_management/managed_devices/item/windows_defender_scan/windows_defender_scan_post_request_body.rb index 3631a371e6..d16246d032 100644 --- a/lib/device_management/managed_devices/item/windows_defender_scan/windows_defender_scan_post_request_body.rb +++ b/lib/device_management/managed_devices/item/windows_defender_scan/windows_defender_scan_post_request_body.rb @@ -19,22 +19,22 @@ class WindowsDefenderScanPostRequestBody # The quickScan property @quick_scan ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new windowsDefenderScanPostRequestBody and sets the default values. + ## Instantiates a new WindowsDefenderScanPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/managed_devices/item/windows_defender_scan/windows_defender_scan_request_builder.rb b/lib/device_management/managed_devices/item/windows_defender_scan/windows_defender_scan_request_builder.rb index babcf67abc..2e9578cc25 100644 --- a/lib/device_management/managed_devices/item/windows_defender_scan/windows_defender_scan_request_builder.rb +++ b/lib/device_management/managed_devices/item/windows_defender_scan/windows_defender_scan_request_builder.rb @@ -36,8 +36,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a windows_defender_scan_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return WindowsDefenderScanRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/managed_devices/item/windows_defender_update_signatures/windows_defender_update_signatures_request_builder.rb b/lib/device_management/managed_devices/item/windows_defender_update_signatures/windows_defender_update_signatures_request_builder.rb index 26bf07c31e..303f01e81d 100644 --- a/lib/device_management/managed_devices/item/windows_defender_update_signatures/windows_defender_update_signatures_request_builder.rb +++ b/lib/device_management/managed_devices/item/windows_defender_update_signatures/windows_defender_update_signatures_request_builder.rb @@ -34,8 +34,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,15 +44,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a windows_defender_update_signatures_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return WindowsDefenderUpdateSignaturesRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/managed_devices/item/windows_protection_state/detected_malware_state/count/count_request_builder.rb b/lib/device_management/managed_devices/item/windows_protection_state/detected_malware_state/count/count_request_builder.rb index 7ea3b70bc8..24024e52fe 100644 --- a/lib/device_management/managed_devices/item/windows_protection_state/detected_malware_state/count/count_request_builder.rb +++ b/lib/device_management/managed_devices/item/windows_protection_state/detected_malware_state/count/count_request_builder.rb @@ -26,7 +26,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -38,8 +38,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -49,17 +48,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/managed_devices/item/windows_protection_state/detected_malware_state/detected_malware_state_request_builder.rb b/lib/device_management/managed_devices/item/windows_protection_state/detected_malware_state/detected_malware_state_request_builder.rb index bba2314736..61665a9381 100644 --- a/lib/device_management/managed_devices/item/windows_protection_state/detected_malware_state/detected_malware_state_request_builder.rb +++ b/lib/device_management/managed_devices/item/windows_protection_state/detected_malware_state/detected_malware_state_request_builder.rb @@ -44,10 +44,10 @@ def by_windows_device_malware_state_id(windows_device_malware_state_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## List properties and relationships of the windowsDeviceMalwareState objects. + ## Device malware list ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of windows_device_malware_state_collection_response ## @@ -56,12 +56,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsDeviceMalwareStateCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Create a new windowsDeviceMalwareState object. + ## Create new navigation property to detectedMalwareState for deviceManagement ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of windows_device_malware_state @@ -72,30 +71,29 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsDeviceMalwareState.create_from_discriminator_value(pn) }, error_mapping) end ## - ## List properties and relationships of the windowsDeviceMalwareState objects. + ## Device malware list ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Create a new windowsDeviceMalwareState object. + ## Create new navigation property to detectedMalwareState for deviceManagement ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -103,20 +101,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a detected_malware_state_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DetectedMalwareStateRequestBuilder.new(raw_url, @request_adapter) + end ## - # List properties and relationships of the windowsDeviceMalwareState objects. + # Device malware list class DetectedMalwareStateRequestBuilderGetQueryParameters ## diff --git a/lib/device_management/managed_devices/item/windows_protection_state/detected_malware_state/item/windows_device_malware_state_item_request_builder.rb b/lib/device_management/managed_devices/item/windows_protection_state/detected_malware_state/item/windows_device_malware_state_item_request_builder.rb index 2d677abbe3..9d40e8f2f4 100644 --- a/lib/device_management/managed_devices/item/windows_protection_state/detected_malware_state/item/windows_device_malware_state_item_request_builder.rb +++ b/lib/device_management/managed_devices/item/windows_protection_state/detected_malware_state/item/windows_device_malware_state_item_request_builder.rb @@ -27,10 +27,10 @@ class WindowsDeviceMalwareStateItemRequestBuilder < MicrosoftKiotaAbstractions:: ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState/{windowsDeviceMalwareState%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/windowsProtectionState/detectedMalwareState/{windowsDeviceMalwareState%2Did}{?%24expand,%24select}") end ## - ## Deletes a windowsDeviceMalwareState. + ## Delete navigation property detectedMalwareState for deviceManagement ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void ## @@ -39,12 +39,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Read properties and relationships of the windowsDeviceMalwareState object. + ## Device malware list ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of windows_device_malware_state ## @@ -53,12 +52,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsDeviceMalwareState.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Update the properties of a windowsDeviceMalwareState object. + ## Update the navigation property detectedMalwareState in deviceManagement ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of windows_device_malware_state @@ -69,46 +67,46 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsDeviceMalwareState.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Deletes a windowsDeviceMalwareState. + ## Delete navigation property detectedMalwareState for deviceManagement ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Read properties and relationships of the windowsDeviceMalwareState object. + ## Device malware list ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Update the properties of a windowsDeviceMalwareState object. + ## Update the navigation property detectedMalwareState in deviceManagement ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -116,20 +114,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a windows_device_malware_state_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return WindowsDeviceMalwareStateItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Read properties and relationships of the windowsDeviceMalwareState object. + # Device malware list class WindowsDeviceMalwareStateItemRequestBuilderGetQueryParameters ## diff --git a/lib/device_management/managed_devices/item/windows_protection_state/windows_protection_state_request_builder.rb b/lib/device_management/managed_devices/item/windows_protection_state/windows_protection_state_request_builder.rb index 9dbd6016a1..823d37e6f0 100644 --- a/lib/device_management/managed_devices/item/windows_protection_state/windows_protection_state_request_builder.rb +++ b/lib/device_management/managed_devices/item/windows_protection_state/windows_protection_state_request_builder.rb @@ -29,7 +29,7 @@ def detected_malware_state() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/windowsProtectionState{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices/{managedDevice%2Did}/windowsProtectionState{?%24expand,%24select}") end ## ## Delete navigation property windowsProtectionState for deviceManagement @@ -41,12 +41,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Read properties and relationships of the windowsProtectionState object. + ## The device protection status. This property is read-only. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of windows_protection_state ## @@ -55,12 +54,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsProtectionState.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Update the properties of a windowsProtectionState object. + ## Update the navigation property windowsProtectionState in deviceManagement ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of windows_protection_state @@ -71,8 +69,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsProtectionState.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -82,35 +79,36 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Read properties and relationships of the windowsProtectionState object. + ## The device protection status. This property is read-only. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Update the properties of a windowsProtectionState object. + ## Update the navigation property windowsProtectionState in deviceManagement ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -118,20 +116,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a windows_protection_state_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return WindowsProtectionStateRequestBuilder.new(raw_url, @request_adapter) + end ## - # Read properties and relationships of the windowsProtectionState object. + # The device protection status. This property is read-only. class WindowsProtectionStateRequestBuilderGetQueryParameters ## diff --git a/lib/device_management/managed_devices/item/wipe/wipe_post_request_body.rb b/lib/device_management/managed_devices/item/wipe/wipe_post_request_body.rb index 9471c455d1..6796b39d8a 100644 --- a/lib/device_management/managed_devices/item/wipe/wipe_post_request_body.rb +++ b/lib/device_management/managed_devices/item/wipe/wipe_post_request_body.rb @@ -28,22 +28,22 @@ class WipePostRequestBody # The persistEsimDataPlan property @persist_esim_data_plan ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new wipePostRequestBody and sets the default values. + ## Instantiates a new WipePostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/managed_devices/item/wipe/wipe_request_builder.rb b/lib/device_management/managed_devices/item/wipe/wipe_request_builder.rb index 1c46b978ef..ddddb03fde 100644 --- a/lib/device_management/managed_devices/item/wipe/wipe_request_builder.rb +++ b/lib/device_management/managed_devices/item/wipe/wipe_request_builder.rb @@ -36,8 +36,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a wipe_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return WipeRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/managed_devices/managed_devices_request_builder.rb b/lib/device_management/managed_devices/managed_devices_request_builder.rb index ae2077acf9..4fcaa64e30 100644 --- a/lib/device_management/managed_devices/managed_devices_request_builder.rb +++ b/lib/device_management/managed_devices/managed_devices_request_builder.rb @@ -38,10 +38,10 @@ def by_managed_device_id(managed_device_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/managedDevices{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## List properties and relationships of the managedDevice objects. + ## The list of managed devices. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of managed_device_collection_response ## @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDeviceCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,26 +65,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ManagedDevice.create_from_discriminator_value(pn) }, error_mapping) end ## - ## List properties and relationships of the managedDevice objects. + ## The list of managed devices. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,20 +95,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a managed_devices_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ManagedDevicesRequestBuilder.new(raw_url, @request_adapter) + end ## - # List properties and relationships of the managedDevice objects. + # The list of managed devices. class ManagedDevicesRequestBuilderGetQueryParameters ## diff --git a/lib/device_management/mobile_app_troubleshooting_events/count/count_request_builder.rb b/lib/device_management/mobile_app_troubleshooting_events/count/count_request_builder.rb index 74a2fa7729..43cc477275 100644 --- a/lib/device_management/mobile_app_troubleshooting_events/count/count_request_builder.rb +++ b/lib/device_management/mobile_app_troubleshooting_events/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/mobileAppTroubleshootingEvents/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/mobileAppTroubleshootingEvents/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/app_log_collection_requests_request_builder.rb b/lib/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/app_log_collection_requests_request_builder.rb index 570ba3d4f9..a1bc1f958d 100644 --- a/lib/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/app_log_collection_requests_request_builder.rb +++ b/lib/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/app_log_collection_requests_request_builder.rb @@ -42,7 +42,7 @@ def by_app_log_collection_request_id(app_log_collection_request_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/mobileAppTroubleshootingEvents/{mobileAppTroubleshootingEvent%2Did}/appLogCollectionRequests{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/mobileAppTroubleshootingEvents/{mobileAppTroubleshootingEvent%2Did}/appLogCollectionRequests{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the appLogCollectionRequest objects. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AppLogCollectionRequestCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AppLogCollectionRequest.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a app_log_collection_requests_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AppLogCollectionRequestsRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the appLogCollectionRequest objects. diff --git a/lib/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/count/count_request_builder.rb b/lib/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/count/count_request_builder.rb index 40f10d1f43..0748777dd5 100644 --- a/lib/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/count/count_request_builder.rb +++ b/lib/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/mobileAppTroubleshootingEvents/{mobileAppTroubleshootingEvent%2Did}/appLogCollectionRequests/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/mobileAppTroubleshootingEvents/{mobileAppTroubleshootingEvent%2Did}/appLogCollectionRequests/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/item/app_log_collection_request_item_request_builder.rb b/lib/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/item/app_log_collection_request_item_request_builder.rb index 6a216c1731..823a83e541 100644 --- a/lib/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/item/app_log_collection_request_item_request_builder.rb +++ b/lib/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/item/app_log_collection_request_item_request_builder.rb @@ -31,7 +31,7 @@ def create_download_url() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/mobileAppTroubleshootingEvents/{mobileAppTroubleshootingEvent%2Did}/appLogCollectionRequests/{appLogCollectionRequest%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/mobileAppTroubleshootingEvents/{mobileAppTroubleshootingEvent%2Did}/appLogCollectionRequests/{appLogCollectionRequest%2Did}{?%24expand,%24select}") end ## ## Deletes a appLogCollectionRequest. @@ -43,8 +43,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -57,8 +56,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AppLogCollectionRequest.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -73,8 +71,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AppLogCollectionRequest.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -84,13 +81,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -100,15 +98,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -120,17 +118,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a app_log_collection_request_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AppLogCollectionRequestItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the appLogCollectionRequest object. diff --git a/lib/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/item/create_download_url/create_download_url_request_builder.rb b/lib/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/item/create_download_url/create_download_url_request_builder.rb index f5611bb5ad..956b3cb655 100644 --- a/lib/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/item/create_download_url/create_download_url_request_builder.rb +++ b/lib/device_management/mobile_app_troubleshooting_events/item/app_log_collection_requests/item/create_download_url/create_download_url_request_builder.rb @@ -39,8 +39,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AppLogCollectionDownloadDetails.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -50,16 +49,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a create_download_url_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CreateDownloadUrlRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/mobile_app_troubleshooting_events/item/mobile_app_troubleshooting_event_item_request_builder.rb b/lib/device_management/mobile_app_troubleshooting_events/item/mobile_app_troubleshooting_event_item_request_builder.rb index 941a6868bf..f26bb44e9f 100644 --- a/lib/device_management/mobile_app_troubleshooting_events/item/mobile_app_troubleshooting_event_item_request_builder.rb +++ b/lib/device_management/mobile_app_troubleshooting_events/item/mobile_app_troubleshooting_event_item_request_builder.rb @@ -27,7 +27,7 @@ def app_log_collection_requests() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/mobileAppTroubleshootingEvents/{mobileAppTroubleshootingEvent%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/mobileAppTroubleshootingEvents/{mobileAppTroubleshootingEvent%2Did}{?%24expand,%24select}") end ## ## Deletes a mobileAppTroubleshootingEvent. @@ -39,8 +39,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -53,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppTroubleshootingEvent.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -69,8 +67,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppTroubleshootingEvent.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -80,13 +77,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -96,15 +94,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -116,17 +114,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_troubleshooting_event_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppTroubleshootingEventItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the mobileAppTroubleshootingEvent object. diff --git a/lib/device_management/mobile_app_troubleshooting_events/mobile_app_troubleshooting_events_request_builder.rb b/lib/device_management/mobile_app_troubleshooting_events/mobile_app_troubleshooting_events_request_builder.rb index 938ab12ec5..e62d504319 100644 --- a/lib/device_management/mobile_app_troubleshooting_events/mobile_app_troubleshooting_events_request_builder.rb +++ b/lib/device_management/mobile_app_troubleshooting_events/mobile_app_troubleshooting_events_request_builder.rb @@ -38,7 +38,7 @@ def by_mobile_app_troubleshooting_event_id(mobile_app_troubleshooting_event_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/mobileAppTroubleshootingEvents{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/mobileAppTroubleshootingEvents{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the mobileAppTroubleshootingEvent objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppTroubleshootingEventCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileAppTroubleshootingEvent.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_app_troubleshooting_events_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileAppTroubleshootingEventsRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the mobileAppTroubleshootingEvent objects. diff --git a/lib/device_management/mobile_threat_defense_connectors/count/count_request_builder.rb b/lib/device_management/mobile_threat_defense_connectors/count/count_request_builder.rb index 7db78d1d2c..269dd25ca0 100644 --- a/lib/device_management/mobile_threat_defense_connectors/count/count_request_builder.rb +++ b/lib/device_management/mobile_threat_defense_connectors/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/mobileThreatDefenseConnectors/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/mobileThreatDefenseConnectors/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/mobile_threat_defense_connectors/item/mobile_threat_defense_connector_item_request_builder.rb b/lib/device_management/mobile_threat_defense_connectors/item/mobile_threat_defense_connector_item_request_builder.rb index 2d1cec339b..de347e7ba9 100644 --- a/lib/device_management/mobile_threat_defense_connectors/item/mobile_threat_defense_connector_item_request_builder.rb +++ b/lib/device_management/mobile_threat_defense_connectors/item/mobile_threat_defense_connector_item_request_builder.rb @@ -21,7 +21,7 @@ class MobileThreatDefenseConnectorItemRequestBuilder < MicrosoftKiotaAbstraction ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/mobileThreatDefenseConnectors/{mobileThreatDefenseConnector%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/mobileThreatDefenseConnectors/{mobileThreatDefenseConnector%2Did}{?%24expand,%24select}") end ## ## Deletes a mobileThreatDefenseConnector. @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileThreatDefenseConnector.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileThreatDefenseConnector.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_threat_defense_connector_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileThreatDefenseConnectorItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the mobileThreatDefenseConnector object. diff --git a/lib/device_management/mobile_threat_defense_connectors/mobile_threat_defense_connectors_request_builder.rb b/lib/device_management/mobile_threat_defense_connectors/mobile_threat_defense_connectors_request_builder.rb index d0d935ab38..efa63f6b00 100644 --- a/lib/device_management/mobile_threat_defense_connectors/mobile_threat_defense_connectors_request_builder.rb +++ b/lib/device_management/mobile_threat_defense_connectors/mobile_threat_defense_connectors_request_builder.rb @@ -38,7 +38,7 @@ def by_mobile_threat_defense_connector_id(mobile_threat_defense_connector_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/mobileThreatDefenseConnectors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/mobileThreatDefenseConnectors{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the mobileThreatDefenseConnector objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileThreatDefenseConnectorCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MobileThreatDefenseConnector.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mobile_threat_defense_connectors_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MobileThreatDefenseConnectorsRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the mobileThreatDefenseConnector objects. diff --git a/lib/device_management/notification_message_templates/count/count_request_builder.rb b/lib/device_management/notification_message_templates/count/count_request_builder.rb index ba8828e176..a1ecf047f3 100644 --- a/lib/device_management/notification_message_templates/count/count_request_builder.rb +++ b/lib/device_management/notification_message_templates/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/notificationMessageTemplates/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/notificationMessageTemplates/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/notification_message_templates/item/localized_notification_messages/count/count_request_builder.rb b/lib/device_management/notification_message_templates/item/localized_notification_messages/count/count_request_builder.rb index 51065025d9..409e71910e 100644 --- a/lib/device_management/notification_message_templates/item/localized_notification_messages/count/count_request_builder.rb +++ b/lib/device_management/notification_message_templates/item/localized_notification_messages/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/notificationMessageTemplates/{notificationMessageTemplate%2Did}/localizedNotificationMessages/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/notificationMessageTemplates/{notificationMessageTemplate%2Did}/localizedNotificationMessages/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/notification_message_templates/item/localized_notification_messages/item/localized_notification_message_item_request_builder.rb b/lib/device_management/notification_message_templates/item/localized_notification_messages/item/localized_notification_message_item_request_builder.rb index 46b5f89cc5..8985cf79e4 100644 --- a/lib/device_management/notification_message_templates/item/localized_notification_messages/item/localized_notification_message_item_request_builder.rb +++ b/lib/device_management/notification_message_templates/item/localized_notification_messages/item/localized_notification_message_item_request_builder.rb @@ -25,7 +25,7 @@ class LocalizedNotificationMessageItemRequestBuilder < MicrosoftKiotaAbstraction ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/notificationMessageTemplates/{notificationMessageTemplate%2Did}/localizedNotificationMessages/{localizedNotificationMessage%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/notificationMessageTemplates/{notificationMessageTemplate%2Did}/localizedNotificationMessages/{localizedNotificationMessage%2Did}{?%24expand,%24select}") end ## ## Deletes a localizedNotificationMessage. @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::LocalizedNotificationMessage.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::LocalizedNotificationMessage.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a localized_notification_message_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return LocalizedNotificationMessageItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the localizedNotificationMessage object. diff --git a/lib/device_management/notification_message_templates/item/localized_notification_messages/localized_notification_messages_request_builder.rb b/lib/device_management/notification_message_templates/item/localized_notification_messages/localized_notification_messages_request_builder.rb index dbc23f1b9f..8b217c1411 100644 --- a/lib/device_management/notification_message_templates/item/localized_notification_messages/localized_notification_messages_request_builder.rb +++ b/lib/device_management/notification_message_templates/item/localized_notification_messages/localized_notification_messages_request_builder.rb @@ -42,7 +42,7 @@ def by_localized_notification_message_id(localized_notification_message_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/notificationMessageTemplates/{notificationMessageTemplate%2Did}/localizedNotificationMessages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/notificationMessageTemplates/{notificationMessageTemplate%2Did}/localizedNotificationMessages{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the localizedNotificationMessage objects. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::LocalizedNotificationMessageCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::LocalizedNotificationMessage.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a localized_notification_messages_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return LocalizedNotificationMessagesRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the localizedNotificationMessage objects. diff --git a/lib/device_management/notification_message_templates/item/notification_message_template_item_request_builder.rb b/lib/device_management/notification_message_templates/item/notification_message_template_item_request_builder.rb index 274f2ff66b..3baf54258e 100644 --- a/lib/device_management/notification_message_templates/item/notification_message_template_item_request_builder.rb +++ b/lib/device_management/notification_message_templates/item/notification_message_template_item_request_builder.rb @@ -33,7 +33,7 @@ def send_test_message() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/notificationMessageTemplates/{notificationMessageTemplate%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/notificationMessageTemplates/{notificationMessageTemplate%2Did}{?%24expand,%24select}") end ## ## Deletes a notificationMessageTemplate. @@ -45,8 +45,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -59,8 +58,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::NotificationMessageTemplate.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -75,8 +73,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::NotificationMessageTemplate.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -86,13 +83,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -102,15 +100,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -122,17 +120,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a notification_message_template_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return NotificationMessageTemplateItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the notificationMessageTemplate object. diff --git a/lib/device_management/notification_message_templates/item/send_test_message/send_test_message_request_builder.rb b/lib/device_management/notification_message_templates/item/send_test_message/send_test_message_request_builder.rb index bc7d079602..40e50dd665 100644 --- a/lib/device_management/notification_message_templates/item/send_test_message/send_test_message_request_builder.rb +++ b/lib/device_management/notification_message_templates/item/send_test_message/send_test_message_request_builder.rb @@ -34,8 +34,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,15 +44,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a send_test_message_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SendTestMessageRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/notification_message_templates/notification_message_templates_request_builder.rb b/lib/device_management/notification_message_templates/notification_message_templates_request_builder.rb index a8a5a182e5..433dd4b749 100644 --- a/lib/device_management/notification_message_templates/notification_message_templates_request_builder.rb +++ b/lib/device_management/notification_message_templates/notification_message_templates_request_builder.rb @@ -38,7 +38,7 @@ def by_notification_message_template_id(notification_message_template_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/notificationMessageTemplates{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/notificationMessageTemplates{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the notificationMessageTemplate objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::NotificationMessageTemplateCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::NotificationMessageTemplate.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a notification_message_templates_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return NotificationMessageTemplatesRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the notificationMessageTemplate objects. diff --git a/lib/device_management/remote_assistance_partners/count/count_request_builder.rb b/lib/device_management/remote_assistance_partners/count/count_request_builder.rb index af96cf86a8..4b38714bbb 100644 --- a/lib/device_management/remote_assistance_partners/count/count_request_builder.rb +++ b/lib/device_management/remote_assistance_partners/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/remoteAssistancePartners/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/remoteAssistancePartners/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/remote_assistance_partners/item/begin_onboarding/begin_onboarding_request_builder.rb b/lib/device_management/remote_assistance_partners/item/begin_onboarding/begin_onboarding_request_builder.rb index 700d406ed4..4dc42909a9 100644 --- a/lib/device_management/remote_assistance_partners/item/begin_onboarding/begin_onboarding_request_builder.rb +++ b/lib/device_management/remote_assistance_partners/item/begin_onboarding/begin_onboarding_request_builder.rb @@ -34,8 +34,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,15 +44,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a begin_onboarding_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BeginOnboardingRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/remote_assistance_partners/item/disconnect/disconnect_request_builder.rb b/lib/device_management/remote_assistance_partners/item/disconnect/disconnect_request_builder.rb index 7eae31c997..2f13edf24a 100644 --- a/lib/device_management/remote_assistance_partners/item/disconnect/disconnect_request_builder.rb +++ b/lib/device_management/remote_assistance_partners/item/disconnect/disconnect_request_builder.rb @@ -34,8 +34,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,15 +44,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a disconnect_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DisconnectRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/remote_assistance_partners/item/remote_assistance_partner_item_request_builder.rb b/lib/device_management/remote_assistance_partners/item/remote_assistance_partner_item_request_builder.rb index 59094c1985..d3269acd73 100644 --- a/lib/device_management/remote_assistance_partners/item/remote_assistance_partner_item_request_builder.rb +++ b/lib/device_management/remote_assistance_partners/item/remote_assistance_partner_item_request_builder.rb @@ -33,7 +33,7 @@ def disconnect() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/remoteAssistancePartners/{remoteAssistancePartner%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/remoteAssistancePartners/{remoteAssistancePartner%2Did}{?%24expand,%24select}") end ## ## Deletes a remoteAssistancePartner. @@ -45,8 +45,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -59,8 +58,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::RemoteAssistancePartner.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -75,8 +73,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::RemoteAssistancePartner.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -86,13 +83,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -102,15 +100,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -122,17 +120,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a remote_assistance_partner_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RemoteAssistancePartnerItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the remoteAssistancePartner object. diff --git a/lib/device_management/remote_assistance_partners/remote_assistance_partners_request_builder.rb b/lib/device_management/remote_assistance_partners/remote_assistance_partners_request_builder.rb index 8e716a8671..02407310bf 100644 --- a/lib/device_management/remote_assistance_partners/remote_assistance_partners_request_builder.rb +++ b/lib/device_management/remote_assistance_partners/remote_assistance_partners_request_builder.rb @@ -38,7 +38,7 @@ def by_remote_assistance_partner_id(remote_assistance_partner_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/remoteAssistancePartners{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/remoteAssistancePartners{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the remoteAssistancePartner objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::RemoteAssistancePartnerCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::RemoteAssistancePartner.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a remote_assistance_partners_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RemoteAssistancePartnersRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the remoteAssistancePartner objects. diff --git a/lib/device_management/reports/export_jobs/count/count_request_builder.rb b/lib/device_management/reports/export_jobs/count/count_request_builder.rb index b4e9474558..6f11aef49f 100644 --- a/lib/device_management/reports/export_jobs/count/count_request_builder.rb +++ b/lib/device_management/reports/export_jobs/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/reports/exportJobs/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/reports/exportJobs/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/reports/export_jobs/export_jobs_request_builder.rb b/lib/device_management/reports/export_jobs/export_jobs_request_builder.rb index 357bb17f18..70ad126589 100644 --- a/lib/device_management/reports/export_jobs/export_jobs_request_builder.rb +++ b/lib/device_management/reports/export_jobs/export_jobs_request_builder.rb @@ -40,7 +40,7 @@ def by_device_management_export_job_id(device_management_export_job_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/reports/exportJobs{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/reports/exportJobs{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the deviceManagementExportJob objects. @@ -52,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceManagementExportJobCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -68,8 +67,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceManagementExportJob.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -79,15 +77,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -99,17 +97,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a export_jobs_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ExportJobsRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the deviceManagementExportJob objects. diff --git a/lib/device_management/reports/export_jobs/item/device_management_export_job_item_request_builder.rb b/lib/device_management/reports/export_jobs/item/device_management_export_job_item_request_builder.rb index 396c4bf183..b3eb700a38 100644 --- a/lib/device_management/reports/export_jobs/item/device_management_export_job_item_request_builder.rb +++ b/lib/device_management/reports/export_jobs/item/device_management_export_job_item_request_builder.rb @@ -23,7 +23,7 @@ class DeviceManagementExportJobItemRequestBuilder < MicrosoftKiotaAbstractions:: ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/reports/exportJobs/{deviceManagementExportJob%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/reports/exportJobs/{deviceManagementExportJob%2Did}{?%24expand,%24select}") end ## ## Deletes a deviceManagementExportJob. @@ -35,8 +35,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceManagementExportJob.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -65,8 +63,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceManagementExportJob.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,13 +73,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -92,15 +90,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,17 +110,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_management_export_job_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceManagementExportJobItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the deviceManagementExportJob object. diff --git a/lib/device_management/reports/get_cached_report/get_cached_report_post_request_body.rb b/lib/device_management/reports/get_cached_report/get_cached_report_post_request_body.rb index 053134f9ee..ea79cab4c6 100644 --- a/lib/device_management/reports/get_cached_report/get_cached_report_post_request_body.rb +++ b/lib/device_management/reports/get_cached_report/get_cached_report_post_request_body.rb @@ -35,22 +35,22 @@ class GetCachedReportPostRequestBody # The top property @top ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getCachedReportPostRequestBody and sets the default values. + ## Instantiates a new GetCachedReportPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/reports/get_cached_report/get_cached_report_request_builder.rb b/lib/device_management/reports/get_cached_report/get_cached_report_request_builder.rb index db895cc271..d00a8ed619 100644 --- a/lib/device_management/reports/get_cached_report/get_cached_report_request_builder.rb +++ b/lib/device_management/reports/get_cached_report/get_cached_report_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_cached_report_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetCachedReportRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/reports/get_compliance_policy_non_compliance_report/get_compliance_policy_non_compliance_report_post_request_body.rb b/lib/device_management/reports/get_compliance_policy_non_compliance_report/get_compliance_policy_non_compliance_report_post_request_body.rb index bb91b86dd7..0bc438cff9 100644 --- a/lib/device_management/reports/get_compliance_policy_non_compliance_report/get_compliance_policy_non_compliance_report_post_request_body.rb +++ b/lib/device_management/reports/get_compliance_policy_non_compliance_report/get_compliance_policy_non_compliance_report_post_request_body.rb @@ -41,22 +41,22 @@ class GetCompliancePolicyNonComplianceReportPostRequestBody # The top property @top ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getCompliancePolicyNonComplianceReportPostRequestBody and sets the default values. + ## Instantiates a new GetCompliancePolicyNonComplianceReportPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/reports/get_compliance_policy_non_compliance_report/get_compliance_policy_non_compliance_report_request_builder.rb b/lib/device_management/reports/get_compliance_policy_non_compliance_report/get_compliance_policy_non_compliance_report_request_builder.rb index 02b237d0c5..b1768f857c 100644 --- a/lib/device_management/reports/get_compliance_policy_non_compliance_report/get_compliance_policy_non_compliance_report_request_builder.rb +++ b/lib/device_management/reports/get_compliance_policy_non_compliance_report/get_compliance_policy_non_compliance_report_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_compliance_policy_non_compliance_report_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetCompliancePolicyNonComplianceReportRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/reports/get_compliance_policy_non_compliance_summary_report/get_compliance_policy_non_compliance_summary_report_post_request_body.rb b/lib/device_management/reports/get_compliance_policy_non_compliance_summary_report/get_compliance_policy_non_compliance_summary_report_post_request_body.rb index a06b5e6086..e1913f9637 100644 --- a/lib/device_management/reports/get_compliance_policy_non_compliance_summary_report/get_compliance_policy_non_compliance_summary_report_post_request_body.rb +++ b/lib/device_management/reports/get_compliance_policy_non_compliance_summary_report/get_compliance_policy_non_compliance_summary_report_post_request_body.rb @@ -41,22 +41,22 @@ class GetCompliancePolicyNonComplianceSummaryReportPostRequestBody # The top property @top ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getCompliancePolicyNonComplianceSummaryReportPostRequestBody and sets the default values. + ## Instantiates a new GetCompliancePolicyNonComplianceSummaryReportPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/reports/get_compliance_policy_non_compliance_summary_report/get_compliance_policy_non_compliance_summary_report_request_builder.rb b/lib/device_management/reports/get_compliance_policy_non_compliance_summary_report/get_compliance_policy_non_compliance_summary_report_request_builder.rb index 1f7c3c125e..abbd2afec6 100644 --- a/lib/device_management/reports/get_compliance_policy_non_compliance_summary_report/get_compliance_policy_non_compliance_summary_report_request_builder.rb +++ b/lib/device_management/reports/get_compliance_policy_non_compliance_summary_report/get_compliance_policy_non_compliance_summary_report_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_compliance_policy_non_compliance_summary_report_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetCompliancePolicyNonComplianceSummaryReportRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/reports/get_compliance_setting_non_compliance_report/get_compliance_setting_non_compliance_report_post_request_body.rb b/lib/device_management/reports/get_compliance_setting_non_compliance_report/get_compliance_setting_non_compliance_report_post_request_body.rb index 32a9545978..b8d31be98d 100644 --- a/lib/device_management/reports/get_compliance_setting_non_compliance_report/get_compliance_setting_non_compliance_report_post_request_body.rb +++ b/lib/device_management/reports/get_compliance_setting_non_compliance_report/get_compliance_setting_non_compliance_report_post_request_body.rb @@ -41,22 +41,22 @@ class GetComplianceSettingNonComplianceReportPostRequestBody # The top property @top ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getComplianceSettingNonComplianceReportPostRequestBody and sets the default values. + ## Instantiates a new GetComplianceSettingNonComplianceReportPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/reports/get_compliance_setting_non_compliance_report/get_compliance_setting_non_compliance_report_request_builder.rb b/lib/device_management/reports/get_compliance_setting_non_compliance_report/get_compliance_setting_non_compliance_report_request_builder.rb index 7c783f19be..dc2a14c8c0 100644 --- a/lib/device_management/reports/get_compliance_setting_non_compliance_report/get_compliance_setting_non_compliance_report_request_builder.rb +++ b/lib/device_management/reports/get_compliance_setting_non_compliance_report/get_compliance_setting_non_compliance_report_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_compliance_setting_non_compliance_report_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetComplianceSettingNonComplianceReportRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/reports/get_configuration_policy_non_compliance_report/get_configuration_policy_non_compliance_report_post_request_body.rb b/lib/device_management/reports/get_configuration_policy_non_compliance_report/get_configuration_policy_non_compliance_report_post_request_body.rb index 7d59803224..6ad3796718 100644 --- a/lib/device_management/reports/get_configuration_policy_non_compliance_report/get_configuration_policy_non_compliance_report_post_request_body.rb +++ b/lib/device_management/reports/get_configuration_policy_non_compliance_report/get_configuration_policy_non_compliance_report_post_request_body.rb @@ -41,22 +41,22 @@ class GetConfigurationPolicyNonComplianceReportPostRequestBody # The top property @top ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getConfigurationPolicyNonComplianceReportPostRequestBody and sets the default values. + ## Instantiates a new GetConfigurationPolicyNonComplianceReportPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/reports/get_configuration_policy_non_compliance_report/get_configuration_policy_non_compliance_report_request_builder.rb b/lib/device_management/reports/get_configuration_policy_non_compliance_report/get_configuration_policy_non_compliance_report_request_builder.rb index 70aae68ac8..6c8c0166ac 100644 --- a/lib/device_management/reports/get_configuration_policy_non_compliance_report/get_configuration_policy_non_compliance_report_request_builder.rb +++ b/lib/device_management/reports/get_configuration_policy_non_compliance_report/get_configuration_policy_non_compliance_report_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_configuration_policy_non_compliance_report_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetConfigurationPolicyNonComplianceReportRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/reports/get_configuration_policy_non_compliance_summary_report/get_configuration_policy_non_compliance_summary_report_post_request_body.rb b/lib/device_management/reports/get_configuration_policy_non_compliance_summary_report/get_configuration_policy_non_compliance_summary_report_post_request_body.rb index 49eb04ad1f..bb0fdbd1e4 100644 --- a/lib/device_management/reports/get_configuration_policy_non_compliance_summary_report/get_configuration_policy_non_compliance_summary_report_post_request_body.rb +++ b/lib/device_management/reports/get_configuration_policy_non_compliance_summary_report/get_configuration_policy_non_compliance_summary_report_post_request_body.rb @@ -41,22 +41,22 @@ class GetConfigurationPolicyNonComplianceSummaryReportPostRequestBody # The top property @top ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getConfigurationPolicyNonComplianceSummaryReportPostRequestBody and sets the default values. + ## Instantiates a new GetConfigurationPolicyNonComplianceSummaryReportPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/reports/get_configuration_policy_non_compliance_summary_report/get_configuration_policy_non_compliance_summary_report_request_builder.rb b/lib/device_management/reports/get_configuration_policy_non_compliance_summary_report/get_configuration_policy_non_compliance_summary_report_request_builder.rb index 7eb2109589..4c31bbcfd3 100644 --- a/lib/device_management/reports/get_configuration_policy_non_compliance_summary_report/get_configuration_policy_non_compliance_summary_report_request_builder.rb +++ b/lib/device_management/reports/get_configuration_policy_non_compliance_summary_report/get_configuration_policy_non_compliance_summary_report_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_configuration_policy_non_compliance_summary_report_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetConfigurationPolicyNonComplianceSummaryReportRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/reports/get_configuration_setting_non_compliance_report/get_configuration_setting_non_compliance_report_post_request_body.rb b/lib/device_management/reports/get_configuration_setting_non_compliance_report/get_configuration_setting_non_compliance_report_post_request_body.rb index b2ee450d51..10abb34366 100644 --- a/lib/device_management/reports/get_configuration_setting_non_compliance_report/get_configuration_setting_non_compliance_report_post_request_body.rb +++ b/lib/device_management/reports/get_configuration_setting_non_compliance_report/get_configuration_setting_non_compliance_report_post_request_body.rb @@ -41,22 +41,22 @@ class GetConfigurationSettingNonComplianceReportPostRequestBody # The top property @top ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getConfigurationSettingNonComplianceReportPostRequestBody and sets the default values. + ## Instantiates a new GetConfigurationSettingNonComplianceReportPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/reports/get_configuration_setting_non_compliance_report/get_configuration_setting_non_compliance_report_request_builder.rb b/lib/device_management/reports/get_configuration_setting_non_compliance_report/get_configuration_setting_non_compliance_report_request_builder.rb index e5293cb3c5..bdfd514700 100644 --- a/lib/device_management/reports/get_configuration_setting_non_compliance_report/get_configuration_setting_non_compliance_report_request_builder.rb +++ b/lib/device_management/reports/get_configuration_setting_non_compliance_report/get_configuration_setting_non_compliance_report_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_configuration_setting_non_compliance_report_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetConfigurationSettingNonComplianceReportRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/reports/get_device_management_intent_per_setting_contributing_profiles/get_device_management_intent_per_setting_contributing_profiles_post_request_body.rb b/lib/device_management/reports/get_device_management_intent_per_setting_contributing_profiles/get_device_management_intent_per_setting_contributing_profiles_post_request_body.rb index 75e0eda8d2..799efc6f38 100644 --- a/lib/device_management/reports/get_device_management_intent_per_setting_contributing_profiles/get_device_management_intent_per_setting_contributing_profiles_post_request_body.rb +++ b/lib/device_management/reports/get_device_management_intent_per_setting_contributing_profiles/get_device_management_intent_per_setting_contributing_profiles_post_request_body.rb @@ -41,22 +41,22 @@ class GetDeviceManagementIntentPerSettingContributingProfilesPostRequestBody # The top property @top ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getDeviceManagementIntentPerSettingContributingProfilesPostRequestBody and sets the default values. + ## Instantiates a new GetDeviceManagementIntentPerSettingContributingProfilesPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/reports/get_device_management_intent_per_setting_contributing_profiles/get_device_management_intent_per_setting_contributing_profiles_request_builder.rb b/lib/device_management/reports/get_device_management_intent_per_setting_contributing_profiles/get_device_management_intent_per_setting_contributing_profiles_request_builder.rb index 1864b2eaf3..0fdd696794 100644 --- a/lib/device_management/reports/get_device_management_intent_per_setting_contributing_profiles/get_device_management_intent_per_setting_contributing_profiles_request_builder.rb +++ b/lib/device_management/reports/get_device_management_intent_per_setting_contributing_profiles/get_device_management_intent_per_setting_contributing_profiles_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_device_management_intent_per_setting_contributing_profiles_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetDeviceManagementIntentPerSettingContributingProfilesRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/reports/get_device_management_intent_settings_report/get_device_management_intent_settings_report_post_request_body.rb b/lib/device_management/reports/get_device_management_intent_settings_report/get_device_management_intent_settings_report_post_request_body.rb index fb7a6dbc07..49199a18da 100644 --- a/lib/device_management/reports/get_device_management_intent_settings_report/get_device_management_intent_settings_report_post_request_body.rb +++ b/lib/device_management/reports/get_device_management_intent_settings_report/get_device_management_intent_settings_report_post_request_body.rb @@ -41,22 +41,22 @@ class GetDeviceManagementIntentSettingsReportPostRequestBody # The top property @top ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getDeviceManagementIntentSettingsReportPostRequestBody and sets the default values. + ## Instantiates a new GetDeviceManagementIntentSettingsReportPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/reports/get_device_management_intent_settings_report/get_device_management_intent_settings_report_request_builder.rb b/lib/device_management/reports/get_device_management_intent_settings_report/get_device_management_intent_settings_report_request_builder.rb index 352cbf675d..a51d5b6d88 100644 --- a/lib/device_management/reports/get_device_management_intent_settings_report/get_device_management_intent_settings_report_request_builder.rb +++ b/lib/device_management/reports/get_device_management_intent_settings_report/get_device_management_intent_settings_report_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_device_management_intent_settings_report_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetDeviceManagementIntentSettingsReportRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/reports/get_device_non_compliance_report/get_device_non_compliance_report_post_request_body.rb b/lib/device_management/reports/get_device_non_compliance_report/get_device_non_compliance_report_post_request_body.rb index 9a3eaecb17..59cb4c0daa 100644 --- a/lib/device_management/reports/get_device_non_compliance_report/get_device_non_compliance_report_post_request_body.rb +++ b/lib/device_management/reports/get_device_non_compliance_report/get_device_non_compliance_report_post_request_body.rb @@ -41,22 +41,22 @@ class GetDeviceNonComplianceReportPostRequestBody # The top property @top ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getDeviceNonComplianceReportPostRequestBody and sets the default values. + ## Instantiates a new GetDeviceNonComplianceReportPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/reports/get_device_non_compliance_report/get_device_non_compliance_report_request_builder.rb b/lib/device_management/reports/get_device_non_compliance_report/get_device_non_compliance_report_request_builder.rb index cb121ebe70..4806b70e5f 100644 --- a/lib/device_management/reports/get_device_non_compliance_report/get_device_non_compliance_report_request_builder.rb +++ b/lib/device_management/reports/get_device_non_compliance_report/get_device_non_compliance_report_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_device_non_compliance_report_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetDeviceNonComplianceReportRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/reports/get_devices_without_compliance_policy_report/get_devices_without_compliance_policy_report_post_request_body.rb b/lib/device_management/reports/get_devices_without_compliance_policy_report/get_devices_without_compliance_policy_report_post_request_body.rb index 9f2ea66e79..f315c44bdc 100644 --- a/lib/device_management/reports/get_devices_without_compliance_policy_report/get_devices_without_compliance_policy_report_post_request_body.rb +++ b/lib/device_management/reports/get_devices_without_compliance_policy_report/get_devices_without_compliance_policy_report_post_request_body.rb @@ -41,22 +41,22 @@ class GetDevicesWithoutCompliancePolicyReportPostRequestBody # The top property @top ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getDevicesWithoutCompliancePolicyReportPostRequestBody and sets the default values. + ## Instantiates a new GetDevicesWithoutCompliancePolicyReportPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/reports/get_devices_without_compliance_policy_report/get_devices_without_compliance_policy_report_request_builder.rb b/lib/device_management/reports/get_devices_without_compliance_policy_report/get_devices_without_compliance_policy_report_request_builder.rb index 65ad0de5ae..dd21dd4e9c 100644 --- a/lib/device_management/reports/get_devices_without_compliance_policy_report/get_devices_without_compliance_policy_report_request_builder.rb +++ b/lib/device_management/reports/get_devices_without_compliance_policy_report/get_devices_without_compliance_policy_report_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_devices_without_compliance_policy_report_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetDevicesWithoutCompliancePolicyReportRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/reports/get_historical_report/get_historical_report_post_request_body.rb b/lib/device_management/reports/get_historical_report/get_historical_report_post_request_body.rb index 8fc56f1187..0017b92fe3 100644 --- a/lib/device_management/reports/get_historical_report/get_historical_report_post_request_body.rb +++ b/lib/device_management/reports/get_historical_report/get_historical_report_post_request_body.rb @@ -38,22 +38,22 @@ class GetHistoricalReportPostRequestBody # The top property @top ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getHistoricalReportPostRequestBody and sets the default values. + ## Instantiates a new GetHistoricalReportPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/reports/get_historical_report/get_historical_report_request_builder.rb b/lib/device_management/reports/get_historical_report/get_historical_report_request_builder.rb index 402e31f03f..6b6df87694 100644 --- a/lib/device_management/reports/get_historical_report/get_historical_report_request_builder.rb +++ b/lib/device_management/reports/get_historical_report/get_historical_report_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_historical_report_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetHistoricalReportRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/reports/get_noncompliant_devices_and_settings_report/get_noncompliant_devices_and_settings_report_post_request_body.rb b/lib/device_management/reports/get_noncompliant_devices_and_settings_report/get_noncompliant_devices_and_settings_report_post_request_body.rb index 2c9ac4e494..908d55eff4 100644 --- a/lib/device_management/reports/get_noncompliant_devices_and_settings_report/get_noncompliant_devices_and_settings_report_post_request_body.rb +++ b/lib/device_management/reports/get_noncompliant_devices_and_settings_report/get_noncompliant_devices_and_settings_report_post_request_body.rb @@ -41,22 +41,22 @@ class GetNoncompliantDevicesAndSettingsReportPostRequestBody # The top property @top ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getNoncompliantDevicesAndSettingsReportPostRequestBody and sets the default values. + ## Instantiates a new GetNoncompliantDevicesAndSettingsReportPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/reports/get_noncompliant_devices_and_settings_report/get_noncompliant_devices_and_settings_report_request_builder.rb b/lib/device_management/reports/get_noncompliant_devices_and_settings_report/get_noncompliant_devices_and_settings_report_request_builder.rb index 0ed90ad7d0..799dda122d 100644 --- a/lib/device_management/reports/get_noncompliant_devices_and_settings_report/get_noncompliant_devices_and_settings_report_request_builder.rb +++ b/lib/device_management/reports/get_noncompliant_devices_and_settings_report/get_noncompliant_devices_and_settings_report_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_noncompliant_devices_and_settings_report_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetNoncompliantDevicesAndSettingsReportRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/reports/get_policy_non_compliance_metadata/get_policy_non_compliance_metadata_post_request_body.rb b/lib/device_management/reports/get_policy_non_compliance_metadata/get_policy_non_compliance_metadata_post_request_body.rb index b28adc51cd..4115e8bb8f 100644 --- a/lib/device_management/reports/get_policy_non_compliance_metadata/get_policy_non_compliance_metadata_post_request_body.rb +++ b/lib/device_management/reports/get_policy_non_compliance_metadata/get_policy_non_compliance_metadata_post_request_body.rb @@ -41,22 +41,22 @@ class GetPolicyNonComplianceMetadataPostRequestBody # The top property @top ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getPolicyNonComplianceMetadataPostRequestBody and sets the default values. + ## Instantiates a new GetPolicyNonComplianceMetadataPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/reports/get_policy_non_compliance_metadata/get_policy_non_compliance_metadata_request_builder.rb b/lib/device_management/reports/get_policy_non_compliance_metadata/get_policy_non_compliance_metadata_request_builder.rb index fd53463cae..b8483b5f85 100644 --- a/lib/device_management/reports/get_policy_non_compliance_metadata/get_policy_non_compliance_metadata_request_builder.rb +++ b/lib/device_management/reports/get_policy_non_compliance_metadata/get_policy_non_compliance_metadata_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_policy_non_compliance_metadata_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetPolicyNonComplianceMetadataRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/reports/get_policy_non_compliance_report/get_policy_non_compliance_report_post_request_body.rb b/lib/device_management/reports/get_policy_non_compliance_report/get_policy_non_compliance_report_post_request_body.rb index b93bd52ed0..d5aa63ef27 100644 --- a/lib/device_management/reports/get_policy_non_compliance_report/get_policy_non_compliance_report_post_request_body.rb +++ b/lib/device_management/reports/get_policy_non_compliance_report/get_policy_non_compliance_report_post_request_body.rb @@ -41,22 +41,22 @@ class GetPolicyNonComplianceReportPostRequestBody # The top property @top ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getPolicyNonComplianceReportPostRequestBody and sets the default values. + ## Instantiates a new GetPolicyNonComplianceReportPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/reports/get_policy_non_compliance_report/get_policy_non_compliance_report_request_builder.rb b/lib/device_management/reports/get_policy_non_compliance_report/get_policy_non_compliance_report_request_builder.rb index b69754a88c..19e9c4ece5 100644 --- a/lib/device_management/reports/get_policy_non_compliance_report/get_policy_non_compliance_report_request_builder.rb +++ b/lib/device_management/reports/get_policy_non_compliance_report/get_policy_non_compliance_report_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_policy_non_compliance_report_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetPolicyNonComplianceReportRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/reports/get_policy_non_compliance_summary_report/get_policy_non_compliance_summary_report_post_request_body.rb b/lib/device_management/reports/get_policy_non_compliance_summary_report/get_policy_non_compliance_summary_report_post_request_body.rb index bd72969e77..377a4d5a83 100644 --- a/lib/device_management/reports/get_policy_non_compliance_summary_report/get_policy_non_compliance_summary_report_post_request_body.rb +++ b/lib/device_management/reports/get_policy_non_compliance_summary_report/get_policy_non_compliance_summary_report_post_request_body.rb @@ -41,22 +41,22 @@ class GetPolicyNonComplianceSummaryReportPostRequestBody # The top property @top ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getPolicyNonComplianceSummaryReportPostRequestBody and sets the default values. + ## Instantiates a new GetPolicyNonComplianceSummaryReportPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/reports/get_policy_non_compliance_summary_report/get_policy_non_compliance_summary_report_request_builder.rb b/lib/device_management/reports/get_policy_non_compliance_summary_report/get_policy_non_compliance_summary_report_request_builder.rb index 11eac70b9f..1214848ad7 100644 --- a/lib/device_management/reports/get_policy_non_compliance_summary_report/get_policy_non_compliance_summary_report_request_builder.rb +++ b/lib/device_management/reports/get_policy_non_compliance_summary_report/get_policy_non_compliance_summary_report_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_policy_non_compliance_summary_report_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetPolicyNonComplianceSummaryReportRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/reports/get_report_filters/get_report_filters_post_request_body.rb b/lib/device_management/reports/get_report_filters/get_report_filters_post_request_body.rb index 5a76cfe293..da1e5859d0 100644 --- a/lib/device_management/reports/get_report_filters/get_report_filters_post_request_body.rb +++ b/lib/device_management/reports/get_report_filters/get_report_filters_post_request_body.rb @@ -41,22 +41,22 @@ class GetReportFiltersPostRequestBody # The top property @top ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getReportFiltersPostRequestBody and sets the default values. + ## Instantiates a new GetReportFiltersPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/reports/get_report_filters/get_report_filters_request_builder.rb b/lib/device_management/reports/get_report_filters/get_report_filters_request_builder.rb index 3857be9edc..256adc8feb 100644 --- a/lib/device_management/reports/get_report_filters/get_report_filters_request_builder.rb +++ b/lib/device_management/reports/get_report_filters/get_report_filters_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_report_filters_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetReportFiltersRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/reports/get_setting_non_compliance_report/get_setting_non_compliance_report_post_request_body.rb b/lib/device_management/reports/get_setting_non_compliance_report/get_setting_non_compliance_report_post_request_body.rb index 7c24ecbbe2..77a76dc302 100644 --- a/lib/device_management/reports/get_setting_non_compliance_report/get_setting_non_compliance_report_post_request_body.rb +++ b/lib/device_management/reports/get_setting_non_compliance_report/get_setting_non_compliance_report_post_request_body.rb @@ -41,22 +41,22 @@ class GetSettingNonComplianceReportPostRequestBody # The top property @top ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getSettingNonComplianceReportPostRequestBody and sets the default values. + ## Instantiates a new GetSettingNonComplianceReportPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/reports/get_setting_non_compliance_report/get_setting_non_compliance_report_request_builder.rb b/lib/device_management/reports/get_setting_non_compliance_report/get_setting_non_compliance_report_request_builder.rb index 0f87a18913..48fc339dde 100644 --- a/lib/device_management/reports/get_setting_non_compliance_report/get_setting_non_compliance_report_request_builder.rb +++ b/lib/device_management/reports/get_setting_non_compliance_report/get_setting_non_compliance_report_request_builder.rb @@ -34,8 +34,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_setting_non_compliance_report_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetSettingNonComplianceReportRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/reports/reports_request_builder.rb b/lib/device_management/reports/reports_request_builder.rb index 90fc98985e..1cd2e3c63a 100644 --- a/lib/device_management/reports/reports_request_builder.rb +++ b/lib/device_management/reports/reports_request_builder.rb @@ -23,6 +23,7 @@ require_relative './get_report_filters/get_report_filters_request_builder' require_relative './get_setting_non_compliance_report/get_setting_non_compliance_report_request_builder' require_relative './reports' +require_relative './retrieve_device_app_installation_status_report/retrieve_device_app_installation_status_report_request_builder' module MicrosoftGraph module DeviceManagement @@ -127,13 +128,18 @@ def get_setting_non_compliance_report() return MicrosoftGraph::DeviceManagement::Reports::GetSettingNonComplianceReport::GetSettingNonComplianceReportRequestBuilder.new(@path_parameters, @request_adapter) end ## + # Provides operations to call the retrieveDeviceAppInstallationStatusReport method. + def retrieve_device_app_installation_status_report() + return MicrosoftGraph::DeviceManagement::Reports::RetrieveDeviceAppInstallationStatusReport::RetrieveDeviceAppInstallationStatusReportRequestBuilder.new(@path_parameters, @request_adapter) + end + ## ## Instantiates a new ReportsRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request ## @param request_adapter The request adapter to use to execute the requests. ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/reports{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/reports{?%24expand,%24select}") end ## ## Delete navigation property reports for deviceManagement @@ -145,8 +151,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -159,8 +164,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceManagementReports.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -175,8 +179,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceManagementReports.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -186,13 +189,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -202,15 +206,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -222,17 +226,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a reports_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ReportsRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the deviceManagementReports object. diff --git a/lib/device_management/reports/retrieve_device_app_installation_status_report/retrieve_device_app_installation_status_report.rb b/lib/device_management/reports/retrieve_device_app_installation_status_report/retrieve_device_app_installation_status_report.rb new file mode 100644 index 0000000000..b9f2dcd98a --- /dev/null +++ b/lib/device_management/reports/retrieve_device_app_installation_status_report/retrieve_device_app_installation_status_report.rb @@ -0,0 +1 @@ +require_relative 'retrieve_device_app_installation_status_report_post_request_body' diff --git a/lib/device_management/reports/retrieve_device_app_installation_status_report/retrieve_device_app_installation_status_report_post_request_body.rb b/lib/device_management/reports/retrieve_device_app_installation_status_report/retrieve_device_app_installation_status_report_post_request_body.rb new file mode 100644 index 0000000000..eb79b2ec1c --- /dev/null +++ b/lib/device_management/reports/retrieve_device_app_installation_status_report/retrieve_device_app_installation_status_report_post_request_body.rb @@ -0,0 +1,248 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../device_management' +require_relative '../reports' +require_relative './retrieve_device_app_installation_status_report' + +module MicrosoftGraph + module DeviceManagement + module Reports + module RetrieveDeviceAppInstallationStatusReport + class RetrieveDeviceAppInstallationStatusReportPostRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The filter property + @filter + ## + # The groupBy property + @group_by + ## + # The name property + @name + ## + # The orderBy property + @order_by + ## + # The search property + @search + ## + # The select property + @select + ## + # The sessionId property + @session_id + ## + # The skip property + @skip + ## + # The top property + @top + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new RetrieveDeviceAppInstallationStatusReportPostRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a retrieve_device_app_installation_status_report_post_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return RetrieveDeviceAppInstallationStatusReportPostRequestBody.new + end + ## + ## Gets the filter property value. The filter property + ## @return a string + ## + def filter + return @filter + end + ## + ## Sets the filter property value. The filter property + ## @param value Value to set for the filter property. + ## @return a void + ## + def filter=(value) + @filter = value + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "filter" => lambda {|n| @filter = n.get_string_value() }, + "groupBy" => lambda {|n| @group_by = n.get_collection_of_primitive_values(String) }, + "name" => lambda {|n| @name = n.get_string_value() }, + "orderBy" => lambda {|n| @order_by = n.get_collection_of_primitive_values(String) }, + "search" => lambda {|n| @search = n.get_string_value() }, + "select" => lambda {|n| @select = n.get_collection_of_primitive_values(String) }, + "sessionId" => lambda {|n| @session_id = n.get_string_value() }, + "skip" => lambda {|n| @skip = n.get_number_value() }, + "top" => lambda {|n| @top = n.get_number_value() }, + } + end + ## + ## Gets the groupBy property value. The groupBy property + ## @return a string + ## + def group_by + return @group_by + end + ## + ## Sets the groupBy property value. The groupBy property + ## @param value Value to set for the groupBy property. + ## @return a void + ## + def group_by=(value) + @group_by = value + end + ## + ## Gets the name property value. The name property + ## @return a string + ## + def name + return @name + end + ## + ## Sets the name property value. The name property + ## @param value Value to set for the name property. + ## @return a void + ## + def name=(value) + @name = value + end + ## + ## Gets the orderBy property value. The orderBy property + ## @return a string + ## + def order_by + return @order_by + end + ## + ## Sets the orderBy property value. The orderBy property + ## @param value Value to set for the orderBy property. + ## @return a void + ## + def order_by=(value) + @order_by = value + end + ## + ## Gets the search property value. The search property + ## @return a string + ## + def search + return @search + end + ## + ## Sets the search property value. The search property + ## @param value Value to set for the search property. + ## @return a void + ## + def search=(value) + @search = value + end + ## + ## Gets the select property value. The select property + ## @return a string + ## + def select + return @select + end + ## + ## Sets the select property value. The select property + ## @param value Value to set for the select property. + ## @return a void + ## + def select=(value) + @select = value + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_string_value("filter", @filter) + writer.write_collection_of_primitive_values("groupBy", @group_by) + writer.write_string_value("name", @name) + writer.write_collection_of_primitive_values("orderBy", @order_by) + writer.write_string_value("search", @search) + writer.write_collection_of_primitive_values("select", @select) + writer.write_string_value("sessionId", @session_id) + writer.write_number_value("skip", @skip) + writer.write_number_value("top", @top) + writer.write_additional_data(@additional_data) + end + ## + ## Gets the sessionId property value. The sessionId property + ## @return a string + ## + def session_id + return @session_id + end + ## + ## Sets the sessionId property value. The sessionId property + ## @param value Value to set for the sessionId property. + ## @return a void + ## + def session_id=(value) + @session_id = value + end + ## + ## Gets the skip property value. The skip property + ## @return a integer + ## + def skip + return @skip + end + ## + ## Sets the skip property value. The skip property + ## @param value Value to set for the skip property. + ## @return a void + ## + def skip=(value) + @skip = value + end + ## + ## Gets the top property value. The top property + ## @return a integer + ## + def top + return @top + end + ## + ## Sets the top property value. The top property + ## @param value Value to set for the top property. + ## @return a void + ## + def top=(value) + @top = value + end + end + end + end + end +end diff --git a/lib/device_management/reports/retrieve_device_app_installation_status_report/retrieve_device_app_installation_status_report_request_builder.rb b/lib/device_management/reports/retrieve_device_app_installation_status_report/retrieve_device_app_installation_status_report_request_builder.rb new file mode 100644 index 0000000000..cdd038c06a --- /dev/null +++ b/lib/device_management/reports/retrieve_device_app_installation_status_report/retrieve_device_app_installation_status_report_request_builder.rb @@ -0,0 +1,73 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../device_management' +require_relative '../reports' +require_relative './retrieve_device_app_installation_status_report' + +module MicrosoftGraph + module DeviceManagement + module Reports + module RetrieveDeviceAppInstallationStatusReport + ## + # Provides operations to call the retrieveDeviceAppInstallationStatusReport method. + class RetrieveDeviceAppInstallationStatusReportRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new RetrieveDeviceAppInstallationStatusReportRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/reports/retrieveDeviceAppInstallationStatusReport") + end + ## + ## Invoke action retrieveDeviceAppInstallationStatusReport + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of binary + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, Binary, error_mapping) + end + ## + ## Invoke action retrieveDeviceAppInstallationStatusReport + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a retrieve_device_app_installation_status_report_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RetrieveDeviceAppInstallationStatusReportRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end +end diff --git a/lib/device_management/resource_operations/count/count_request_builder.rb b/lib/device_management/resource_operations/count/count_request_builder.rb index 8961cbd58a..8f561864ed 100644 --- a/lib/device_management/resource_operations/count/count_request_builder.rb +++ b/lib/device_management/resource_operations/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/resourceOperations/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/resourceOperations/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/resource_operations/item/resource_operation_item_request_builder.rb b/lib/device_management/resource_operations/item/resource_operation_item_request_builder.rb index 6374856dce..26d64c6269 100644 --- a/lib/device_management/resource_operations/item/resource_operation_item_request_builder.rb +++ b/lib/device_management/resource_operations/item/resource_operation_item_request_builder.rb @@ -21,7 +21,7 @@ class ResourceOperationItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequ ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/resourceOperations/{resourceOperation%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/resourceOperations/{resourceOperation%2Did}{?%24expand,%24select}") end ## ## Deletes a resourceOperation. @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ResourceOperation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ResourceOperation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a resource_operation_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ResourceOperationItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the resourceOperation object. diff --git a/lib/device_management/resource_operations/resource_operations_request_builder.rb b/lib/device_management/resource_operations/resource_operations_request_builder.rb index 42013fb058..7fe43c3afb 100644 --- a/lib/device_management/resource_operations/resource_operations_request_builder.rb +++ b/lib/device_management/resource_operations/resource_operations_request_builder.rb @@ -38,7 +38,7 @@ def by_resource_operation_id(resource_operation_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/resourceOperations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/resourceOperations{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the resourceOperation objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ResourceOperationCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ResourceOperation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a resource_operations_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ResourceOperationsRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the resourceOperation objects. diff --git a/lib/device_management/role_assignments/count/count_request_builder.rb b/lib/device_management/role_assignments/count/count_request_builder.rb index 83e14c3dcc..0a499b51f5 100644 --- a/lib/device_management/role_assignments/count/count_request_builder.rb +++ b/lib/device_management/role_assignments/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/roleAssignments/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/roleAssignments/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/role_assignments/item/device_and_app_management_role_assignment_item_request_builder.rb b/lib/device_management/role_assignments/item/device_and_app_management_role_assignment_item_request_builder.rb index 9ddc4765fd..4611ecdf12 100644 --- a/lib/device_management/role_assignments/item/device_and_app_management_role_assignment_item_request_builder.rb +++ b/lib/device_management/role_assignments/item/device_and_app_management_role_assignment_item_request_builder.rb @@ -27,7 +27,7 @@ def role_definition() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/roleAssignments/{deviceAndAppManagementRoleAssignment%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/roleAssignments/{deviceAndAppManagementRoleAssignment%2Did}{?%24expand,%24select}") end ## ## Deletes a deviceAndAppManagementRoleAssignment. @@ -39,8 +39,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -53,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceAndAppManagementRoleAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -69,8 +67,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceAndAppManagementRoleAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -80,13 +77,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -96,15 +94,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -116,17 +114,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_and_app_management_role_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceAndAppManagementRoleAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the deviceAndAppManagementRoleAssignment object. diff --git a/lib/device_management/role_assignments/item/role_definition/role_definition_request_builder.rb b/lib/device_management/role_assignments/item/role_definition/role_definition_request_builder.rb index 032c186827..ccd992b57a 100644 --- a/lib/device_management/role_assignments/item/role_definition/role_definition_request_builder.rb +++ b/lib/device_management/role_assignments/item/role_definition/role_definition_request_builder.rb @@ -23,7 +23,7 @@ class RoleDefinitionRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuil ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/roleAssignments/{deviceAndAppManagementRoleAssignment%2Did}/roleDefinition{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/roleAssignments/{deviceAndAppManagementRoleAssignment%2Did}/roleDefinition{?%24expand,%24select}") end ## ## Role definition this assignment is part of. @@ -35,8 +35,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::RoleDefinition.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -46,17 +45,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a role_definition_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RoleDefinitionRequestBuilder.new(raw_url, @request_adapter) + end ## # Role definition this assignment is part of. diff --git a/lib/device_management/role_assignments/role_assignments_request_builder.rb b/lib/device_management/role_assignments/role_assignments_request_builder.rb index 60ae6399b4..2aa6c81eea 100644 --- a/lib/device_management/role_assignments/role_assignments_request_builder.rb +++ b/lib/device_management/role_assignments/role_assignments_request_builder.rb @@ -38,7 +38,7 @@ def by_device_and_app_management_role_assignment_id(device_and_app_management_ro ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/roleAssignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/roleAssignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the deviceAndAppManagementRoleAssignment objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceAndAppManagementRoleAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceAndAppManagementRoleAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a role_assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RoleAssignmentsRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the deviceAndAppManagementRoleAssignment objects. diff --git a/lib/device_management/role_definitions/count/count_request_builder.rb b/lib/device_management/role_definitions/count/count_request_builder.rb index 9017f5c5a4..1a1fdff6bf 100644 --- a/lib/device_management/role_definitions/count/count_request_builder.rb +++ b/lib/device_management/role_definitions/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/roleDefinitions/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/roleDefinitions/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/role_definitions/item/role_assignments/count/count_request_builder.rb b/lib/device_management/role_definitions/item/role_assignments/count/count_request_builder.rb index 3765b976c4..ebbe107bb5 100644 --- a/lib/device_management/role_definitions/item/role_assignments/count/count_request_builder.rb +++ b/lib/device_management/role_definitions/item/role_assignments/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/roleDefinitions/{roleDefinition%2Did}/roleAssignments/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/roleDefinitions/{roleDefinition%2Did}/roleAssignments/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/role_definitions/item/role_assignments/item/role_assignment_item_request_builder.rb b/lib/device_management/role_definitions/item/role_assignments/item/role_assignment_item_request_builder.rb index 091c78630d..95b8d2e0f2 100644 --- a/lib/device_management/role_definitions/item/role_assignments/item/role_assignment_item_request_builder.rb +++ b/lib/device_management/role_definitions/item/role_assignments/item/role_assignment_item_request_builder.rb @@ -31,7 +31,7 @@ def role_definition() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/roleDefinitions/{roleDefinition%2Did}/roleAssignments/{roleAssignment%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/roleDefinitions/{roleDefinition%2Did}/roleAssignments/{roleAssignment%2Did}{?%24expand,%24select}") end ## ## Deletes a roleAssignment. @@ -43,8 +43,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -57,8 +56,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::RoleAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -73,8 +71,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::RoleAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -84,13 +81,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -100,15 +98,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -120,17 +118,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a role_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RoleAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the roleAssignment object. diff --git a/lib/device_management/role_definitions/item/role_assignments/item/role_definition/role_definition_request_builder.rb b/lib/device_management/role_definitions/item/role_assignments/item/role_definition/role_definition_request_builder.rb index 5aff6dc40a..aae58d72e6 100644 --- a/lib/device_management/role_definitions/item/role_assignments/item/role_definition/role_definition_request_builder.rb +++ b/lib/device_management/role_definitions/item/role_assignments/item/role_definition/role_definition_request_builder.rb @@ -27,7 +27,7 @@ class RoleDefinitionRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuil ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/roleDefinitions/{roleDefinition%2Did}/roleAssignments/{roleAssignment%2Did}/roleDefinition{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/roleDefinitions/{roleDefinition%2Did}/roleAssignments/{roleAssignment%2Did}/roleDefinition{?%24expand,%24select}") end ## ## Role definition this assignment is part of. @@ -39,8 +39,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::RoleDefinition.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -50,17 +49,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a role_definition_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RoleDefinitionRequestBuilder.new(raw_url, @request_adapter) + end ## # Role definition this assignment is part of. diff --git a/lib/device_management/role_definitions/item/role_assignments/role_assignments_request_builder.rb b/lib/device_management/role_definitions/item/role_assignments/role_assignments_request_builder.rb index eade0aef66..3289dd0ca9 100644 --- a/lib/device_management/role_definitions/item/role_assignments/role_assignments_request_builder.rb +++ b/lib/device_management/role_definitions/item/role_assignments/role_assignments_request_builder.rb @@ -42,7 +42,7 @@ def by_role_assignment_id(role_assignment_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/roleDefinitions/{roleDefinition%2Did}/roleAssignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/roleDefinitions/{roleDefinition%2Did}/roleAssignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the roleAssignment objects. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::RoleAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::RoleAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a role_assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RoleAssignmentsRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the roleAssignment objects. diff --git a/lib/device_management/role_definitions/item/role_definition_item_request_builder.rb b/lib/device_management/role_definitions/item/role_definition_item_request_builder.rb index 94a8b68aa9..154dc3c214 100644 --- a/lib/device_management/role_definitions/item/role_definition_item_request_builder.rb +++ b/lib/device_management/role_definitions/item/role_definition_item_request_builder.rb @@ -27,10 +27,10 @@ def role_assignments() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/roleDefinitions/{roleDefinition%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/roleDefinitions/{roleDefinition%2Did}{?%24expand,%24select}") end ## - ## Deletes a deviceAndAppManagementRoleDefinition. + ## Deletes a roleDefinition. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void ## @@ -39,8 +39,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -53,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::RoleDefinition.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -69,24 +67,24 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::RoleDefinition.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Deletes a deviceAndAppManagementRoleDefinition. + ## Deletes a roleDefinition. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -96,15 +94,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -116,17 +114,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a role_definition_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RoleDefinitionItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the roleDefinition object. diff --git a/lib/device_management/role_definitions/role_definitions_request_builder.rb b/lib/device_management/role_definitions/role_definitions_request_builder.rb index 209de47b40..44163ed4e1 100644 --- a/lib/device_management/role_definitions/role_definitions_request_builder.rb +++ b/lib/device_management/role_definitions/role_definitions_request_builder.rb @@ -38,10 +38,10 @@ def by_role_definition_id(role_definition_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/roleDefinitions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/roleDefinitions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## List properties and relationships of the deviceAndAppManagementRoleDefinition objects. + ## List properties and relationships of the roleDefinition objects. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of role_definition_collection_response ## @@ -50,12 +50,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::RoleDefinitionCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Create a new roleDefinition object. + ## Create a new deviceAndAppManagementRoleDefinition object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of role_definition @@ -66,30 +65,29 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::RoleDefinition.create_from_discriminator_value(pn) }, error_mapping) end ## - ## List properties and relationships of the deviceAndAppManagementRoleDefinition objects. + ## List properties and relationships of the roleDefinition objects. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Create a new roleDefinition object. + ## Create a new deviceAndAppManagementRoleDefinition object. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -97,20 +95,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a role_definitions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RoleDefinitionsRequestBuilder.new(raw_url, @request_adapter) + end ## - # List properties and relationships of the deviceAndAppManagementRoleDefinition objects. + # List properties and relationships of the roleDefinition objects. class RoleDefinitionsRequestBuilderGetQueryParameters ## diff --git a/lib/device_management/software_update_status_summary/software_update_status_summary_request_builder.rb b/lib/device_management/software_update_status_summary/software_update_status_summary_request_builder.rb index 3b5f089289..982f406b79 100644 --- a/lib/device_management/software_update_status_summary/software_update_status_summary_request_builder.rb +++ b/lib/device_management/software_update_status_summary/software_update_status_summary_request_builder.rb @@ -19,7 +19,7 @@ class SoftwareUpdateStatusSummaryRequestBuilder < MicrosoftKiotaAbstractions::Ba ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/softwareUpdateStatusSummary{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/softwareUpdateStatusSummary{?%24expand,%24select}") end ## ## Read properties and relationships of the softwareUpdateStatusSummary object. @@ -31,8 +31,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SoftwareUpdateStatusSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -42,17 +41,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a software_update_status_summary_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SoftwareUpdateStatusSummaryRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the softwareUpdateStatusSummary object. diff --git a/lib/device_management/telecom_expense_management_partners/count/count_request_builder.rb b/lib/device_management/telecom_expense_management_partners/count/count_request_builder.rb index fe50012c63..c389f7a814 100644 --- a/lib/device_management/telecom_expense_management_partners/count/count_request_builder.rb +++ b/lib/device_management/telecom_expense_management_partners/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/telecomExpenseManagementPartners/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/telecomExpenseManagementPartners/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/telecom_expense_management_partners/item/telecom_expense_management_partner_item_request_builder.rb b/lib/device_management/telecom_expense_management_partners/item/telecom_expense_management_partner_item_request_builder.rb index af82db44d8..023f9fca14 100644 --- a/lib/device_management/telecom_expense_management_partners/item/telecom_expense_management_partner_item_request_builder.rb +++ b/lib/device_management/telecom_expense_management_partners/item/telecom_expense_management_partner_item_request_builder.rb @@ -21,7 +21,7 @@ class TelecomExpenseManagementPartnerItemRequestBuilder < MicrosoftKiotaAbstract ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/telecomExpenseManagementPartners/{telecomExpenseManagementPartner%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/telecomExpenseManagementPartners/{telecomExpenseManagementPartner%2Did}{?%24expand,%24select}") end ## ## Deletes a telecomExpenseManagementPartner. @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TelecomExpenseManagementPartner.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TelecomExpenseManagementPartner.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a telecom_expense_management_partner_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TelecomExpenseManagementPartnerItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the telecomExpenseManagementPartner object. diff --git a/lib/device_management/telecom_expense_management_partners/telecom_expense_management_partners_request_builder.rb b/lib/device_management/telecom_expense_management_partners/telecom_expense_management_partners_request_builder.rb index f0d96b0f4d..e76b645880 100644 --- a/lib/device_management/telecom_expense_management_partners/telecom_expense_management_partners_request_builder.rb +++ b/lib/device_management/telecom_expense_management_partners/telecom_expense_management_partners_request_builder.rb @@ -38,7 +38,7 @@ def by_telecom_expense_management_partner_id(telecom_expense_management_partner_ ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/telecomExpenseManagementPartners{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/telecomExpenseManagementPartners{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the telecomExpenseManagementPartner objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TelecomExpenseManagementPartnerCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TelecomExpenseManagementPartner.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a telecom_expense_management_partners_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TelecomExpenseManagementPartnersRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the telecomExpenseManagementPartner objects. diff --git a/lib/device_management/terms_and_conditions/count/count_request_builder.rb b/lib/device_management/terms_and_conditions/count/count_request_builder.rb index 02c4d3013a..b6d4e35306 100644 --- a/lib/device_management/terms_and_conditions/count/count_request_builder.rb +++ b/lib/device_management/terms_and_conditions/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/termsAndConditions/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/termsAndConditions/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/terms_and_conditions/item/acceptance_statuses/acceptance_statuses_request_builder.rb b/lib/device_management/terms_and_conditions/item/acceptance_statuses/acceptance_statuses_request_builder.rb index 3f9cb4cb53..179b4332a3 100644 --- a/lib/device_management/terms_and_conditions/item/acceptance_statuses/acceptance_statuses_request_builder.rb +++ b/lib/device_management/terms_and_conditions/item/acceptance_statuses/acceptance_statuses_request_builder.rb @@ -42,7 +42,7 @@ def by_terms_and_conditions_acceptance_status_id(terms_and_conditions_acceptance ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/termsAndConditions/{termsAndConditions%2Did}/acceptanceStatuses{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/termsAndConditions/{termsAndConditions%2Did}/acceptanceStatuses{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the termsAndConditionsAcceptanceStatus objects. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TermsAndConditionsAcceptanceStatusCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TermsAndConditionsAcceptanceStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a acceptance_statuses_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AcceptanceStatusesRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the termsAndConditionsAcceptanceStatus objects. diff --git a/lib/device_management/terms_and_conditions/item/acceptance_statuses/count/count_request_builder.rb b/lib/device_management/terms_and_conditions/item/acceptance_statuses/count/count_request_builder.rb index d4344db068..54c9f49c60 100644 --- a/lib/device_management/terms_and_conditions/item/acceptance_statuses/count/count_request_builder.rb +++ b/lib/device_management/terms_and_conditions/item/acceptance_statuses/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/termsAndConditions/{termsAndConditions%2Did}/acceptanceStatuses/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/termsAndConditions/{termsAndConditions%2Did}/acceptanceStatuses/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/terms_and_conditions/item/acceptance_statuses/item/terms_and_conditions/terms_and_conditions_request_builder.rb b/lib/device_management/terms_and_conditions/item/acceptance_statuses/item/terms_and_conditions/terms_and_conditions_request_builder.rb index 2bc3765659..7b7af19a34 100644 --- a/lib/device_management/terms_and_conditions/item/acceptance_statuses/item/terms_and_conditions/terms_and_conditions_request_builder.rb +++ b/lib/device_management/terms_and_conditions/item/acceptance_statuses/item/terms_and_conditions/terms_and_conditions_request_builder.rb @@ -27,7 +27,7 @@ class TermsAndConditionsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequest ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/termsAndConditions/{termsAndConditions%2Did}/acceptanceStatuses/{termsAndConditionsAcceptanceStatus%2Did}/termsAndConditions{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/termsAndConditions/{termsAndConditions%2Did}/acceptanceStatuses/{termsAndConditionsAcceptanceStatus%2Did}/termsAndConditions{?%24expand,%24select}") end ## ## Navigation link to the terms and conditions that are assigned. @@ -39,8 +39,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TermsAndConditions.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -50,17 +49,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a terms_and_conditions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TermsAndConditionsRequestBuilder.new(raw_url, @request_adapter) + end ## # Navigation link to the terms and conditions that are assigned. diff --git a/lib/device_management/terms_and_conditions/item/acceptance_statuses/item/terms_and_conditions_acceptance_status_item_request_builder.rb b/lib/device_management/terms_and_conditions/item/acceptance_statuses/item/terms_and_conditions_acceptance_status_item_request_builder.rb index eb7f3fe752..e89c010a8f 100644 --- a/lib/device_management/terms_and_conditions/item/acceptance_statuses/item/terms_and_conditions_acceptance_status_item_request_builder.rb +++ b/lib/device_management/terms_and_conditions/item/acceptance_statuses/item/terms_and_conditions_acceptance_status_item_request_builder.rb @@ -31,7 +31,7 @@ def terms_and_conditions() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/termsAndConditions/{termsAndConditions%2Did}/acceptanceStatuses/{termsAndConditionsAcceptanceStatus%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/termsAndConditions/{termsAndConditions%2Did}/acceptanceStatuses/{termsAndConditionsAcceptanceStatus%2Did}{?%24expand,%24select}") end ## ## Deletes a termsAndConditionsAcceptanceStatus. @@ -43,8 +43,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -57,8 +56,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TermsAndConditionsAcceptanceStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -73,8 +71,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TermsAndConditionsAcceptanceStatus.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -84,13 +81,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -100,15 +98,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -120,17 +118,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a terms_and_conditions_acceptance_status_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TermsAndConditionsAcceptanceStatusItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the termsAndConditionsAcceptanceStatus object. diff --git a/lib/device_management/terms_and_conditions/item/assignments/assignments_request_builder.rb b/lib/device_management/terms_and_conditions/item/assignments/assignments_request_builder.rb index fe9625578a..bd3a3bb87f 100644 --- a/lib/device_management/terms_and_conditions/item/assignments/assignments_request_builder.rb +++ b/lib/device_management/terms_and_conditions/item/assignments/assignments_request_builder.rb @@ -42,7 +42,7 @@ def by_terms_and_conditions_assignment_id(terms_and_conditions_assignment_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/termsAndConditions/{termsAndConditions%2Did}/assignments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/termsAndConditions/{termsAndConditions%2Did}/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the termsAndConditionsAssignment objects. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TermsAndConditionsAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TermsAndConditionsAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the termsAndConditionsAssignment objects. diff --git a/lib/device_management/terms_and_conditions/item/assignments/count/count_request_builder.rb b/lib/device_management/terms_and_conditions/item/assignments/count/count_request_builder.rb index 05bcfa963e..a5366f26f3 100644 --- a/lib/device_management/terms_and_conditions/item/assignments/count/count_request_builder.rb +++ b/lib/device_management/terms_and_conditions/item/assignments/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/termsAndConditions/{termsAndConditions%2Did}/assignments/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/termsAndConditions/{termsAndConditions%2Did}/assignments/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/terms_and_conditions/item/assignments/item/terms_and_conditions_assignment_item_request_builder.rb b/lib/device_management/terms_and_conditions/item/assignments/item/terms_and_conditions_assignment_item_request_builder.rb index 7c8c8a63b1..70b110c1f6 100644 --- a/lib/device_management/terms_and_conditions/item/assignments/item/terms_and_conditions_assignment_item_request_builder.rb +++ b/lib/device_management/terms_and_conditions/item/assignments/item/terms_and_conditions_assignment_item_request_builder.rb @@ -25,7 +25,7 @@ class TermsAndConditionsAssignmentItemRequestBuilder < MicrosoftKiotaAbstraction ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/termsAndConditions/{termsAndConditions%2Did}/assignments/{termsAndConditionsAssignment%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/termsAndConditions/{termsAndConditions%2Did}/assignments/{termsAndConditionsAssignment%2Did}{?%24expand,%24select}") end ## ## Deletes a termsAndConditionsAssignment. @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TermsAndConditionsAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TermsAndConditionsAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a terms_and_conditions_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TermsAndConditionsAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the termsAndConditionsAssignment object. diff --git a/lib/device_management/terms_and_conditions/item/terms_and_conditions_item_request_builder.rb b/lib/device_management/terms_and_conditions/item/terms_and_conditions_item_request_builder.rb index 36d873c900..3128bba959 100644 --- a/lib/device_management/terms_and_conditions/item/terms_and_conditions_item_request_builder.rb +++ b/lib/device_management/terms_and_conditions/item/terms_and_conditions_item_request_builder.rb @@ -33,7 +33,7 @@ def assignments() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/termsAndConditions/{termsAndConditions%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/termsAndConditions/{termsAndConditions%2Did}{?%24expand,%24select}") end ## ## Deletes a termsAndConditions. @@ -45,8 +45,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -59,8 +58,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TermsAndConditions.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -75,8 +73,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TermsAndConditions.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -86,13 +83,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -102,15 +100,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -122,17 +120,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a terms_and_conditions_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TermsAndConditionsItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the termsAndConditions object. diff --git a/lib/device_management/terms_and_conditions/terms_and_conditions_request_builder.rb b/lib/device_management/terms_and_conditions/terms_and_conditions_request_builder.rb index 9da18cc6fc..29a04c9f91 100644 --- a/lib/device_management/terms_and_conditions/terms_and_conditions_request_builder.rb +++ b/lib/device_management/terms_and_conditions/terms_and_conditions_request_builder.rb @@ -38,7 +38,7 @@ def by_terms_and_conditions_id(terms_and_conditions_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/termsAndConditions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/termsAndConditions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the termsAndConditions objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TermsAndConditionsCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::TermsAndConditions.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a terms_and_conditions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TermsAndConditionsRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the termsAndConditions objects. diff --git a/lib/device_management/troubleshooting_events/count/count_request_builder.rb b/lib/device_management/troubleshooting_events/count/count_request_builder.rb index c01ea83748..7427d1c95a 100644 --- a/lib/device_management/troubleshooting_events/count/count_request_builder.rb +++ b/lib/device_management/troubleshooting_events/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/troubleshootingEvents/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/troubleshootingEvents/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/troubleshooting_events/item/device_management_troubleshooting_event_item_request_builder.rb b/lib/device_management/troubleshooting_events/item/device_management_troubleshooting_event_item_request_builder.rb index c5fadc6eb7..68ac43b114 100644 --- a/lib/device_management/troubleshooting_events/item/device_management_troubleshooting_event_item_request_builder.rb +++ b/lib/device_management/troubleshooting_events/item/device_management_troubleshooting_event_item_request_builder.rb @@ -21,7 +21,7 @@ class DeviceManagementTroubleshootingEventItemRequestBuilder < MicrosoftKiotaAbs ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/troubleshootingEvents/{deviceManagementTroubleshootingEvent%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/troubleshootingEvents/{deviceManagementTroubleshootingEvent%2Did}{?%24expand,%24select}") end ## ## Delete navigation property troubleshootingEvents for deviceManagement @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceManagementTroubleshootingEvent.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceManagementTroubleshootingEvent.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_management_troubleshooting_event_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceManagementTroubleshootingEventItemRequestBuilder.new(raw_url, @request_adapter) + end ## # The list of troubleshooting events for the tenant. diff --git a/lib/device_management/troubleshooting_events/troubleshooting_events_request_builder.rb b/lib/device_management/troubleshooting_events/troubleshooting_events_request_builder.rb index d98bf05c4b..8a627a6e09 100644 --- a/lib/device_management/troubleshooting_events/troubleshooting_events_request_builder.rb +++ b/lib/device_management/troubleshooting_events/troubleshooting_events_request_builder.rb @@ -38,7 +38,7 @@ def by_device_management_troubleshooting_event_id(device_management_troubleshoot ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/troubleshootingEvents{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/troubleshootingEvents{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## The list of troubleshooting events for the tenant. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceManagementTroubleshootingEventCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceManagementTroubleshootingEvent.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a troubleshooting_events_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TroubleshootingEventsRequestBuilder.new(raw_url, @request_adapter) + end ## # The list of troubleshooting events for the tenant. diff --git a/lib/device_management/user_experience_analytics_app_health_application_performance/count/count_request_builder.rb b/lib/device_management/user_experience_analytics_app_health_application_performance/count/count_request_builder.rb index 17b3f305f1..488ab1fc71 100644 --- a/lib/device_management/user_experience_analytics_app_health_application_performance/count/count_request_builder.rb +++ b/lib/device_management/user_experience_analytics_app_health_application_performance/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformance/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformance/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/user_experience_analytics_app_health_application_performance/item/user_experience_analytics_app_health_application_performance_item_request_builder.rb b/lib/device_management/user_experience_analytics_app_health_application_performance/item/user_experience_analytics_app_health_application_performance_item_request_builder.rb index 903b671c5e..ef20e5b81b 100644 --- a/lib/device_management/user_experience_analytics_app_health_application_performance/item/user_experience_analytics_app_health_application_performance_item_request_builder.rb +++ b/lib/device_management/user_experience_analytics_app_health_application_performance/item/user_experience_analytics_app_health_application_performance_item_request_builder.rb @@ -21,7 +21,7 @@ class UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilder < ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformance/{userExperienceAnalyticsAppHealthApplicationPerformance%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformance/{userExperienceAnalyticsAppHealthApplicationPerformance%2Did}{?%24expand,%24select}") end ## ## Delete navigation property userExperienceAnalyticsAppHealthApplicationPerformance for deviceManagement @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthApplicationPerformance.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthApplicationPerformance.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_app_health_application_performance_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics appHealth Application Performance diff --git a/lib/device_management/user_experience_analytics_app_health_application_performance/user_experience_analytics_app_health_application_performance_request_builder.rb b/lib/device_management/user_experience_analytics_app_health_application_performance/user_experience_analytics_app_health_application_performance_request_builder.rb index 8267c25be1..567b1f40e9 100644 --- a/lib/device_management/user_experience_analytics_app_health_application_performance/user_experience_analytics_app_health_application_performance_request_builder.rb +++ b/lib/device_management/user_experience_analytics_app_health_application_performance/user_experience_analytics_app_health_application_performance_request_builder.rb @@ -38,7 +38,7 @@ def by_user_experience_analytics_app_health_application_performance_id(user_expe ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformance{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformance{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## User experience analytics appHealth Application Performance @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthApplicationPerformanceCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthApplicationPerformance.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_app_health_application_performance_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics appHealth Application Performance diff --git a/lib/device_management/user_experience_analytics_app_health_application_performance_by_app_version_details/b5977ca896bb8f07ba0110a16f7d5b9de7419efcedd12306c7bce008c6149c07.rb b/lib/device_management/user_experience_analytics_app_health_application_performance_by_app_version_details/b5977ca896bb8f07ba0110a16f7d5b9de7419efcedd12306c7bce008c6149c07.rb index 7be1f98855..926129caeb 100644 --- a/lib/device_management/user_experience_analytics_app_health_application_performance_by_app_version_details/b5977ca896bb8f07ba0110a16f7d5b9de7419efcedd12306c7bce008c6149c07.rb +++ b/lib/device_management/user_experience_analytics_app_health_application_performance_by_app_version_details/b5977ca896bb8f07ba0110a16f7d5b9de7419efcedd12306c7bce008c6149c07.rb @@ -38,7 +38,7 @@ def by_user_experience_analytics_app_health_app_performance_by_app_version_detai ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## User experience analytics appHealth Application Performance by App Version details @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_app_health_application_performance_by_app_version_details_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics appHealth Application Performance by App Version details diff --git a/lib/device_management/user_experience_analytics_app_health_application_performance_by_app_version_details/count/count_request_builder.rb b/lib/device_management/user_experience_analytics_app_health_application_performance_by_app_version_details/count/count_request_builder.rb index 316398856b..3f1ebc1ebb 100644 --- a/lib/device_management/user_experience_analytics_app_health_application_performance_by_app_version_details/count/count_request_builder.rb +++ b/lib/device_management/user_experience_analytics_app_health_application_performance_by_app_version_details/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/user_experience_analytics_app_health_application_performance_by_app_version_details/item/717f29c93ded4b80b57e573ed284eb4254e96ee97486643da30ad3475dd053d2.rb b/lib/device_management/user_experience_analytics_app_health_application_performance_by_app_version_details/item/717f29c93ded4b80b57e573ed284eb4254e96ee97486643da30ad3475dd053d2.rb index 10e4125c67..332a20a486 100644 --- a/lib/device_management/user_experience_analytics_app_health_application_performance_by_app_version_details/item/717f29c93ded4b80b57e573ed284eb4254e96ee97486643da30ad3475dd053d2.rb +++ b/lib/device_management/user_experience_analytics_app_health_application_performance_by_app_version_details/item/717f29c93ded4b80b57e573ed284eb4254e96ee97486643da30ad3475dd053d2.rb @@ -21,7 +21,7 @@ class UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemReque ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails/{userExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails/{userExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails%2Did}{?%24expand,%24select}") end ## ## Delete navigation property userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails for deviceManagement @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_app_health_app_performance_by_app_version_details_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics appHealth Application Performance by App Version details diff --git a/lib/device_management/user_experience_analytics_app_health_application_performance_by_app_version_device_id/5b8a65d5a63f0349825de135a809711610a9af8fe10a6b6cb11e3a107c3c85b6.rb b/lib/device_management/user_experience_analytics_app_health_application_performance_by_app_version_device_id/5b8a65d5a63f0349825de135a809711610a9af8fe10a6b6cb11e3a107c3c85b6.rb index 01a20ddbdd..a23b2502ed 100644 --- a/lib/device_management/user_experience_analytics_app_health_application_performance_by_app_version_device_id/5b8a65d5a63f0349825de135a809711610a9af8fe10a6b6cb11e3a107c3c85b6.rb +++ b/lib/device_management/user_experience_analytics_app_health_application_performance_by_app_version_device_id/5b8a65d5a63f0349825de135a809711610a9af8fe10a6b6cb11e3a107c3c85b6.rb @@ -38,7 +38,7 @@ def by_user_experience_analytics_app_health_app_performance_by_app_version_devic ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## User experience analytics appHealth Application Performance by App Version Device Id @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_app_health_application_performance_by_app_version_device_id_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics appHealth Application Performance by App Version Device Id diff --git a/lib/device_management/user_experience_analytics_app_health_application_performance_by_app_version_device_id/count/count_request_builder.rb b/lib/device_management/user_experience_analytics_app_health_application_performance_by_app_version_device_id/count/count_request_builder.rb index cef32b3d81..8af96307bd 100644 --- a/lib/device_management/user_experience_analytics_app_health_application_performance_by_app_version_device_id/count/count_request_builder.rb +++ b/lib/device_management/user_experience_analytics_app_health_application_performance_by_app_version_device_id/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/user_experience_analytics_app_health_application_performance_by_app_version_device_id/item/46c10a5e7dc0c8dec068c60364198d53762fabb8220b38c0d3c14867fcdcb46a.rb b/lib/device_management/user_experience_analytics_app_health_application_performance_by_app_version_device_id/item/46c10a5e7dc0c8dec068c60364198d53762fabb8220b38c0d3c14867fcdcb46a.rb index 0ed8fc9501..15158624b5 100644 --- a/lib/device_management/user_experience_analytics_app_health_application_performance_by_app_version_device_id/item/46c10a5e7dc0c8dec068c60364198d53762fabb8220b38c0d3c14867fcdcb46a.rb +++ b/lib/device_management/user_experience_analytics_app_health_application_performance_by_app_version_device_id/item/46c10a5e7dc0c8dec068c60364198d53762fabb8220b38c0d3c14867fcdcb46a.rb @@ -21,7 +21,7 @@ class UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequ ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId/{userExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId/{userExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId%2Did}{?%24expand,%24select}") end ## ## Delete navigation property userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId for deviceManagement @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_app_health_app_performance_by_app_version_device_id_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics appHealth Application Performance by App Version Device Id diff --git a/lib/device_management/user_experience_analytics_app_health_application_performance_by_o_s_version/count/count_request_builder.rb b/lib/device_management/user_experience_analytics_app_health_application_performance_by_o_s_version/count/count_request_builder.rb index 8434bae4f3..f4792d2142 100644 --- a/lib/device_management/user_experience_analytics_app_health_application_performance_by_o_s_version/count/count_request_builder.rb +++ b/lib/device_management/user_experience_analytics_app_health_application_performance_by_o_s_version/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/user_experience_analytics_app_health_application_performance_by_o_s_version/item/user_experience_analytics_app_health_app_performance_by_o_s_version_item_request_builder.rb b/lib/device_management/user_experience_analytics_app_health_application_performance_by_o_s_version/item/user_experience_analytics_app_health_app_performance_by_o_s_version_item_request_builder.rb index 5ff83fa424..f87fa27fda 100644 --- a/lib/device_management/user_experience_analytics_app_health_application_performance_by_o_s_version/item/user_experience_analytics_app_health_app_performance_by_o_s_version_item_request_builder.rb +++ b/lib/device_management/user_experience_analytics_app_health_application_performance_by_o_s_version/item/user_experience_analytics_app_health_app_performance_by_o_s_version_item_request_builder.rb @@ -21,7 +21,7 @@ class UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilde ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion/{userExperienceAnalyticsAppHealthAppPerformanceByOSVersion%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion/{userExperienceAnalyticsAppHealthAppPerformanceByOSVersion%2Did}{?%24expand,%24select}") end ## ## Delete navigation property userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion for deviceManagement @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_app_health_app_performance_by_o_s_version_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics appHealth Application Performance by OS Version diff --git a/lib/device_management/user_experience_analytics_app_health_application_performance_by_o_s_version/user_experience_analytics_app_health_application_performance_by_o_s_version_request_builder.rb b/lib/device_management/user_experience_analytics_app_health_application_performance_by_o_s_version/user_experience_analytics_app_health_application_performance_by_o_s_version_request_builder.rb index c66fe6b972..f5643919b8 100644 --- a/lib/device_management/user_experience_analytics_app_health_application_performance_by_o_s_version/user_experience_analytics_app_health_application_performance_by_o_s_version_request_builder.rb +++ b/lib/device_management/user_experience_analytics_app_health_application_performance_by_o_s_version/user_experience_analytics_app_health_application_performance_by_o_s_version_request_builder.rb @@ -38,7 +38,7 @@ def by_user_experience_analytics_app_health_app_performance_by_o_s_version_id(us ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## User experience analytics appHealth Application Performance by OS Version @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_app_health_application_performance_by_o_s_version_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics appHealth Application Performance by OS Version diff --git a/lib/device_management/user_experience_analytics_app_health_device_model_performance/count/count_request_builder.rb b/lib/device_management/user_experience_analytics_app_health_device_model_performance/count/count_request_builder.rb index 465fc1928b..58fc582516 100644 --- a/lib/device_management/user_experience_analytics_app_health_device_model_performance/count/count_request_builder.rb +++ b/lib/device_management/user_experience_analytics_app_health_device_model_performance/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDeviceModelPerformance/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDeviceModelPerformance/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/user_experience_analytics_app_health_device_model_performance/item/user_experience_analytics_app_health_device_model_performance_item_request_builder.rb b/lib/device_management/user_experience_analytics_app_health_device_model_performance/item/user_experience_analytics_app_health_device_model_performance_item_request_builder.rb index 95599cdf2a..a2d6911797 100644 --- a/lib/device_management/user_experience_analytics_app_health_device_model_performance/item/user_experience_analytics_app_health_device_model_performance_item_request_builder.rb +++ b/lib/device_management/user_experience_analytics_app_health_device_model_performance/item/user_experience_analytics_app_health_device_model_performance_item_request_builder.rb @@ -21,7 +21,7 @@ class UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilder < ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDeviceModelPerformance/{userExperienceAnalyticsAppHealthDeviceModelPerformance%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDeviceModelPerformance/{userExperienceAnalyticsAppHealthDeviceModelPerformance%2Did}{?%24expand,%24select}") end ## ## Delete navigation property userExperienceAnalyticsAppHealthDeviceModelPerformance for deviceManagement @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthDeviceModelPerformance.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthDeviceModelPerformance.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_app_health_device_model_performance_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics appHealth Model Performance diff --git a/lib/device_management/user_experience_analytics_app_health_device_model_performance/user_experience_analytics_app_health_device_model_performance_request_builder.rb b/lib/device_management/user_experience_analytics_app_health_device_model_performance/user_experience_analytics_app_health_device_model_performance_request_builder.rb index 0cc2804b44..86b66de2a8 100644 --- a/lib/device_management/user_experience_analytics_app_health_device_model_performance/user_experience_analytics_app_health_device_model_performance_request_builder.rb +++ b/lib/device_management/user_experience_analytics_app_health_device_model_performance/user_experience_analytics_app_health_device_model_performance_request_builder.rb @@ -38,7 +38,7 @@ def by_user_experience_analytics_app_health_device_model_performance_id(user_exp ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDeviceModelPerformance{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDeviceModelPerformance{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## User experience analytics appHealth Model Performance @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthDeviceModelPerformanceCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthDeviceModelPerformance.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_app_health_device_model_performance_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics appHealth Model Performance diff --git a/lib/device_management/user_experience_analytics_app_health_device_performance/count/count_request_builder.rb b/lib/device_management/user_experience_analytics_app_health_device_performance/count/count_request_builder.rb index bd12e76c8e..99ee24edee 100644 --- a/lib/device_management/user_experience_analytics_app_health_device_performance/count/count_request_builder.rb +++ b/lib/device_management/user_experience_analytics_app_health_device_performance/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDevicePerformance/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDevicePerformance/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/user_experience_analytics_app_health_device_performance/item/user_experience_analytics_app_health_device_performance_item_request_builder.rb b/lib/device_management/user_experience_analytics_app_health_device_performance/item/user_experience_analytics_app_health_device_performance_item_request_builder.rb index 5a843a3b03..4c0a34a614 100644 --- a/lib/device_management/user_experience_analytics_app_health_device_performance/item/user_experience_analytics_app_health_device_performance_item_request_builder.rb +++ b/lib/device_management/user_experience_analytics_app_health_device_performance/item/user_experience_analytics_app_health_device_performance_item_request_builder.rb @@ -21,7 +21,7 @@ class UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilder < Micr ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDevicePerformance/{userExperienceAnalyticsAppHealthDevicePerformance%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDevicePerformance/{userExperienceAnalyticsAppHealthDevicePerformance%2Did}{?%24expand,%24select}") end ## ## Delete navigation property userExperienceAnalyticsAppHealthDevicePerformance for deviceManagement @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthDevicePerformance.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthDevicePerformance.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_app_health_device_performance_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics appHealth Device Performance diff --git a/lib/device_management/user_experience_analytics_app_health_device_performance/user_experience_analytics_app_health_device_performance_request_builder.rb b/lib/device_management/user_experience_analytics_app_health_device_performance/user_experience_analytics_app_health_device_performance_request_builder.rb index dd01795c53..2d85163d12 100644 --- a/lib/device_management/user_experience_analytics_app_health_device_performance/user_experience_analytics_app_health_device_performance_request_builder.rb +++ b/lib/device_management/user_experience_analytics_app_health_device_performance/user_experience_analytics_app_health_device_performance_request_builder.rb @@ -38,7 +38,7 @@ def by_user_experience_analytics_app_health_device_performance_id(user_experienc ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDevicePerformance{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDevicePerformance{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## User experience analytics appHealth Device Performance @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthDevicePerformanceCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthDevicePerformance.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_app_health_device_performance_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics appHealth Device Performance diff --git a/lib/device_management/user_experience_analytics_app_health_device_performance_details/count/count_request_builder.rb b/lib/device_management/user_experience_analytics_app_health_device_performance_details/count/count_request_builder.rb index 1a5014c3a3..a2b26acd90 100644 --- a/lib/device_management/user_experience_analytics_app_health_device_performance_details/count/count_request_builder.rb +++ b/lib/device_management/user_experience_analytics_app_health_device_performance_details/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDevicePerformanceDetails/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDevicePerformanceDetails/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/user_experience_analytics_app_health_device_performance_details/item/user_experience_analytics_app_health_device_performance_details_item_request_builder.rb b/lib/device_management/user_experience_analytics_app_health_device_performance_details/item/user_experience_analytics_app_health_device_performance_details_item_request_builder.rb index 827c7bdfab..92751dc3af 100644 --- a/lib/device_management/user_experience_analytics_app_health_device_performance_details/item/user_experience_analytics_app_health_device_performance_details_item_request_builder.rb +++ b/lib/device_management/user_experience_analytics_app_health_device_performance_details/item/user_experience_analytics_app_health_device_performance_details_item_request_builder.rb @@ -21,7 +21,7 @@ class UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDevicePerformanceDetails/{userExperienceAnalyticsAppHealthDevicePerformanceDetails%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDevicePerformanceDetails/{userExperienceAnalyticsAppHealthDevicePerformanceDetails%2Did}{?%24expand,%24select}") end ## ## Delete navigation property userExperienceAnalyticsAppHealthDevicePerformanceDetails for deviceManagement @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthDevicePerformanceDetails.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthDevicePerformanceDetails.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_app_health_device_performance_details_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics device performance details diff --git a/lib/device_management/user_experience_analytics_app_health_device_performance_details/user_experience_analytics_app_health_device_performance_details_request_builder.rb b/lib/device_management/user_experience_analytics_app_health_device_performance_details/user_experience_analytics_app_health_device_performance_details_request_builder.rb index b4bdd7cc8b..df4e0d2b10 100644 --- a/lib/device_management/user_experience_analytics_app_health_device_performance_details/user_experience_analytics_app_health_device_performance_details_request_builder.rb +++ b/lib/device_management/user_experience_analytics_app_health_device_performance_details/user_experience_analytics_app_health_device_performance_details_request_builder.rb @@ -38,7 +38,7 @@ def by_user_experience_analytics_app_health_device_performance_details_id(user_e ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDevicePerformanceDetails{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthDevicePerformanceDetails{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## User experience analytics device performance details @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthDevicePerformanceDetailsCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthDevicePerformanceDetails.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_app_health_device_performance_details_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics device performance details diff --git a/lib/device_management/user_experience_analytics_app_health_o_s_version_performance/count/count_request_builder.rb b/lib/device_management/user_experience_analytics_app_health_o_s_version_performance/count/count_request_builder.rb index c966ebbb80..fbf122d459 100644 --- a/lib/device_management/user_experience_analytics_app_health_o_s_version_performance/count/count_request_builder.rb +++ b/lib/device_management/user_experience_analytics_app_health_o_s_version_performance/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthOSVersionPerformance/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthOSVersionPerformance/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/user_experience_analytics_app_health_o_s_version_performance/item/user_experience_analytics_app_health_o_s_version_performance_item_request_builder.rb b/lib/device_management/user_experience_analytics_app_health_o_s_version_performance/item/user_experience_analytics_app_health_o_s_version_performance_item_request_builder.rb index e067f31286..ade9e31adb 100644 --- a/lib/device_management/user_experience_analytics_app_health_o_s_version_performance/item/user_experience_analytics_app_health_o_s_version_performance_item_request_builder.rb +++ b/lib/device_management/user_experience_analytics_app_health_o_s_version_performance/item/user_experience_analytics_app_health_o_s_version_performance_item_request_builder.rb @@ -21,7 +21,7 @@ class UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilder < M ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthOSVersionPerformance/{userExperienceAnalyticsAppHealthOSVersionPerformance%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthOSVersionPerformance/{userExperienceAnalyticsAppHealthOSVersionPerformance%2Did}{?%24expand,%24select}") end ## ## Delete navigation property userExperienceAnalyticsAppHealthOSVersionPerformance for deviceManagement @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthOSVersionPerformance.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthOSVersionPerformance.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_app_health_o_s_version_performance_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics appHealth OS version Performance diff --git a/lib/device_management/user_experience_analytics_app_health_o_s_version_performance/user_experience_analytics_app_health_o_s_version_performance_request_builder.rb b/lib/device_management/user_experience_analytics_app_health_o_s_version_performance/user_experience_analytics_app_health_o_s_version_performance_request_builder.rb index 890c103fb3..d3b0ff9157 100644 --- a/lib/device_management/user_experience_analytics_app_health_o_s_version_performance/user_experience_analytics_app_health_o_s_version_performance_request_builder.rb +++ b/lib/device_management/user_experience_analytics_app_health_o_s_version_performance/user_experience_analytics_app_health_o_s_version_performance_request_builder.rb @@ -38,7 +38,7 @@ def by_user_experience_analytics_app_health_o_s_version_performance_id(user_expe ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthOSVersionPerformance{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthOSVersionPerformance{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## User experience analytics appHealth OS version Performance @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthOSVersionPerformanceCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsAppHealthOSVersionPerformance.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_app_health_o_s_version_performance_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics appHealth OS version Performance diff --git a/lib/device_management/user_experience_analytics_app_health_overview/metric_values/count/count_request_builder.rb b/lib/device_management/user_experience_analytics_app_health_overview/metric_values/count/count_request_builder.rb index aa50ce45d6..6efe009ac4 100644 --- a/lib/device_management/user_experience_analytics_app_health_overview/metric_values/count/count_request_builder.rb +++ b/lib/device_management/user_experience_analytics_app_health_overview/metric_values/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthOverview/metricValues/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthOverview/metricValues/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/user_experience_analytics_app_health_overview/metric_values/item/user_experience_analytics_metric_item_request_builder.rb b/lib/device_management/user_experience_analytics_app_health_overview/metric_values/item/user_experience_analytics_metric_item_request_builder.rb index 03381deb9e..e3e6e07db9 100644 --- a/lib/device_management/user_experience_analytics_app_health_overview/metric_values/item/user_experience_analytics_metric_item_request_builder.rb +++ b/lib/device_management/user_experience_analytics_app_health_overview/metric_values/item/user_experience_analytics_metric_item_request_builder.rb @@ -23,7 +23,7 @@ class UserExperienceAnalyticsMetricItemRequestBuilder < MicrosoftKiotaAbstractio ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthOverview/metricValues/{userExperienceAnalyticsMetric%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthOverview/metricValues/{userExperienceAnalyticsMetric%2Did}{?%24expand,%24select}") end ## ## Delete navigation property metricValues for deviceManagement @@ -35,8 +35,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsMetric.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -65,8 +63,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsMetric.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,13 +73,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -92,15 +90,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,17 +110,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_metric_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsMetricItemRequestBuilder.new(raw_url, @request_adapter) + end ## # The metric values for the user experience analytics category. Read-only. diff --git a/lib/device_management/user_experience_analytics_app_health_overview/metric_values/metric_values_request_builder.rb b/lib/device_management/user_experience_analytics_app_health_overview/metric_values/metric_values_request_builder.rb index b843c72bfc..41d55a98da 100644 --- a/lib/device_management/user_experience_analytics_app_health_overview/metric_values/metric_values_request_builder.rb +++ b/lib/device_management/user_experience_analytics_app_health_overview/metric_values/metric_values_request_builder.rb @@ -40,7 +40,7 @@ def by_user_experience_analytics_metric_id(user_experience_analytics_metric_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthOverview/metricValues{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthOverview/metricValues{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## The metric values for the user experience analytics category. Read-only. @@ -52,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsMetricCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -68,8 +67,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsMetric.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -79,15 +77,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -99,17 +97,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a metric_values_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MetricValuesRequestBuilder.new(raw_url, @request_adapter) + end ## # The metric values for the user experience analytics category. Read-only. diff --git a/lib/device_management/user_experience_analytics_app_health_overview/user_experience_analytics_app_health_overview_request_builder.rb b/lib/device_management/user_experience_analytics_app_health_overview/user_experience_analytics_app_health_overview_request_builder.rb index fe288cce16..5d1be91cff 100644 --- a/lib/device_management/user_experience_analytics_app_health_overview/user_experience_analytics_app_health_overview_request_builder.rb +++ b/lib/device_management/user_experience_analytics_app_health_overview/user_experience_analytics_app_health_overview_request_builder.rb @@ -25,7 +25,7 @@ def metric_values() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthOverview{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsAppHealthOverview{?%24expand,%24select}") end ## ## Delete navigation property userExperienceAnalyticsAppHealthOverview for deviceManagement @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsCategory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsCategory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_app_health_overview_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsAppHealthOverviewRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics appHealth overview diff --git a/lib/device_management/user_experience_analytics_baselines/count/count_request_builder.rb b/lib/device_management/user_experience_analytics_baselines/count/count_request_builder.rb index 605eba6f7b..aa399c095a 100644 --- a/lib/device_management/user_experience_analytics_baselines/count/count_request_builder.rb +++ b/lib/device_management/user_experience_analytics_baselines/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/user_experience_analytics_baselines/item/app_health_metrics/app_health_metrics_request_builder.rb b/lib/device_management/user_experience_analytics_baselines/item/app_health_metrics/app_health_metrics_request_builder.rb index fbbbb80942..16b8ec5e7f 100644 --- a/lib/device_management/user_experience_analytics_baselines/item/app_health_metrics/app_health_metrics_request_builder.rb +++ b/lib/device_management/user_experience_analytics_baselines/item/app_health_metrics/app_health_metrics_request_builder.rb @@ -23,7 +23,7 @@ class AppHealthMetricsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBu ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/appHealthMetrics{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/appHealthMetrics{?%24expand,%24select}") end ## ## The scores and insights for the application health metrics. @@ -35,8 +35,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsCategory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -46,17 +45,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a app_health_metrics_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AppHealthMetricsRequestBuilder.new(raw_url, @request_adapter) + end ## # The scores and insights for the application health metrics. diff --git a/lib/device_management/user_experience_analytics_baselines/item/battery_health_metrics/battery_health_metrics_request_builder.rb b/lib/device_management/user_experience_analytics_baselines/item/battery_health_metrics/battery_health_metrics_request_builder.rb index 7c1b2ad0ad..d58d182031 100644 --- a/lib/device_management/user_experience_analytics_baselines/item/battery_health_metrics/battery_health_metrics_request_builder.rb +++ b/lib/device_management/user_experience_analytics_baselines/item/battery_health_metrics/battery_health_metrics_request_builder.rb @@ -23,7 +23,7 @@ class BatteryHealthMetricsRequestBuilder < MicrosoftKiotaAbstractions::BaseReque ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/batteryHealthMetrics{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/batteryHealthMetrics{?%24expand,%24select}") end ## ## The scores and insights for the battery health metrics. @@ -35,8 +35,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsCategory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -46,17 +45,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a battery_health_metrics_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BatteryHealthMetricsRequestBuilder.new(raw_url, @request_adapter) + end ## # The scores and insights for the battery health metrics. diff --git a/lib/device_management/user_experience_analytics_baselines/item/best_practices_metrics/best_practices_metrics_request_builder.rb b/lib/device_management/user_experience_analytics_baselines/item/best_practices_metrics/best_practices_metrics_request_builder.rb index fcf1bfc639..378af6c337 100644 --- a/lib/device_management/user_experience_analytics_baselines/item/best_practices_metrics/best_practices_metrics_request_builder.rb +++ b/lib/device_management/user_experience_analytics_baselines/item/best_practices_metrics/best_practices_metrics_request_builder.rb @@ -23,7 +23,7 @@ class BestPracticesMetricsRequestBuilder < MicrosoftKiotaAbstractions::BaseReque ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/bestPracticesMetrics{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/bestPracticesMetrics{?%24expand,%24select}") end ## ## The scores and insights for the best practices metrics. @@ -35,8 +35,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsCategory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -46,17 +45,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a best_practices_metrics_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BestPracticesMetricsRequestBuilder.new(raw_url, @request_adapter) + end ## # The scores and insights for the best practices metrics. diff --git a/lib/device_management/user_experience_analytics_baselines/item/device_boot_performance_metrics/device_boot_performance_metrics_request_builder.rb b/lib/device_management/user_experience_analytics_baselines/item/device_boot_performance_metrics/device_boot_performance_metrics_request_builder.rb index 8a0b294ce0..cb752d6280 100644 --- a/lib/device_management/user_experience_analytics_baselines/item/device_boot_performance_metrics/device_boot_performance_metrics_request_builder.rb +++ b/lib/device_management/user_experience_analytics_baselines/item/device_boot_performance_metrics/device_boot_performance_metrics_request_builder.rb @@ -23,7 +23,7 @@ class DeviceBootPerformanceMetricsRequestBuilder < MicrosoftKiotaAbstractions::B ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/deviceBootPerformanceMetrics{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/deviceBootPerformanceMetrics{?%24expand,%24select}") end ## ## The scores and insights for the device boot performance metrics. @@ -35,8 +35,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsCategory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -46,17 +45,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_boot_performance_metrics_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceBootPerformanceMetricsRequestBuilder.new(raw_url, @request_adapter) + end ## # The scores and insights for the device boot performance metrics. diff --git a/lib/device_management/user_experience_analytics_baselines/item/reboot_analytics_metrics/reboot_analytics_metrics_request_builder.rb b/lib/device_management/user_experience_analytics_baselines/item/reboot_analytics_metrics/reboot_analytics_metrics_request_builder.rb index 60f9e67670..5835eb64b7 100644 --- a/lib/device_management/user_experience_analytics_baselines/item/reboot_analytics_metrics/reboot_analytics_metrics_request_builder.rb +++ b/lib/device_management/user_experience_analytics_baselines/item/reboot_analytics_metrics/reboot_analytics_metrics_request_builder.rb @@ -23,7 +23,7 @@ class RebootAnalyticsMetricsRequestBuilder < MicrosoftKiotaAbstractions::BaseReq ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/rebootAnalyticsMetrics{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/rebootAnalyticsMetrics{?%24expand,%24select}") end ## ## The scores and insights for the reboot analytics metrics. @@ -35,8 +35,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsCategory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -46,17 +45,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a reboot_analytics_metrics_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RebootAnalyticsMetricsRequestBuilder.new(raw_url, @request_adapter) + end ## # The scores and insights for the reboot analytics metrics. diff --git a/lib/device_management/user_experience_analytics_baselines/item/resource_performance_metrics/resource_performance_metrics_request_builder.rb b/lib/device_management/user_experience_analytics_baselines/item/resource_performance_metrics/resource_performance_metrics_request_builder.rb index f000ed6e25..0a8a425171 100644 --- a/lib/device_management/user_experience_analytics_baselines/item/resource_performance_metrics/resource_performance_metrics_request_builder.rb +++ b/lib/device_management/user_experience_analytics_baselines/item/resource_performance_metrics/resource_performance_metrics_request_builder.rb @@ -23,7 +23,7 @@ class ResourcePerformanceMetricsRequestBuilder < MicrosoftKiotaAbstractions::Bas ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/resourcePerformanceMetrics{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/resourcePerformanceMetrics{?%24expand,%24select}") end ## ## The scores and insights for the resource performance metrics. @@ -35,8 +35,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsCategory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -46,17 +45,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a resource_performance_metrics_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ResourcePerformanceMetricsRequestBuilder.new(raw_url, @request_adapter) + end ## # The scores and insights for the resource performance metrics. diff --git a/lib/device_management/user_experience_analytics_baselines/item/user_experience_analytics_baseline_item_request_builder.rb b/lib/device_management/user_experience_analytics_baselines/item/user_experience_analytics_baseline_item_request_builder.rb index 62ecf2daf8..9c563ac685 100644 --- a/lib/device_management/user_experience_analytics_baselines/item/user_experience_analytics_baseline_item_request_builder.rb +++ b/lib/device_management/user_experience_analytics_baselines/item/user_experience_analytics_baseline_item_request_builder.rb @@ -63,7 +63,7 @@ def work_from_anywhere_metrics() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}{?%24expand,%24select}") end ## ## Delete navigation property userExperienceAnalyticsBaselines for deviceManagement @@ -75,8 +75,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -89,8 +88,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsBaseline.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -105,8 +103,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsBaseline.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -116,13 +113,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -132,15 +130,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -152,17 +150,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_baseline_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsBaselineItemRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics baselines diff --git a/lib/device_management/user_experience_analytics_baselines/item/work_from_anywhere_metrics/work_from_anywhere_metrics_request_builder.rb b/lib/device_management/user_experience_analytics_baselines/item/work_from_anywhere_metrics/work_from_anywhere_metrics_request_builder.rb index 303beeb6fc..1a848f38e1 100644 --- a/lib/device_management/user_experience_analytics_baselines/item/work_from_anywhere_metrics/work_from_anywhere_metrics_request_builder.rb +++ b/lib/device_management/user_experience_analytics_baselines/item/work_from_anywhere_metrics/work_from_anywhere_metrics_request_builder.rb @@ -23,7 +23,7 @@ class WorkFromAnywhereMetricsRequestBuilder < MicrosoftKiotaAbstractions::BaseRe ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/workFromAnywhereMetrics{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines/{userExperienceAnalyticsBaseline%2Did}/workFromAnywhereMetrics{?%24expand,%24select}") end ## ## The scores and insights for the work from anywhere metrics. @@ -35,8 +35,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsCategory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -46,17 +45,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a work_from_anywhere_metrics_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return WorkFromAnywhereMetricsRequestBuilder.new(raw_url, @request_adapter) + end ## # The scores and insights for the work from anywhere metrics. diff --git a/lib/device_management/user_experience_analytics_baselines/user_experience_analytics_baselines_request_builder.rb b/lib/device_management/user_experience_analytics_baselines/user_experience_analytics_baselines_request_builder.rb index 17e183c506..9f3c7a9ee7 100644 --- a/lib/device_management/user_experience_analytics_baselines/user_experience_analytics_baselines_request_builder.rb +++ b/lib/device_management/user_experience_analytics_baselines/user_experience_analytics_baselines_request_builder.rb @@ -38,7 +38,7 @@ def by_user_experience_analytics_baseline_id(user_experience_analytics_baseline_ ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsBaselines{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## User experience analytics baselines @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsBaselineCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsBaseline.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_baselines_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsBaselinesRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics baselines diff --git a/lib/device_management/user_experience_analytics_categories/count/count_request_builder.rb b/lib/device_management/user_experience_analytics_categories/count/count_request_builder.rb index 0a06468ff2..6b2553693b 100644 --- a/lib/device_management/user_experience_analytics_categories/count/count_request_builder.rb +++ b/lib/device_management/user_experience_analytics_categories/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsCategories/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsCategories/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/user_experience_analytics_categories/item/metric_values/count/count_request_builder.rb b/lib/device_management/user_experience_analytics_categories/item/metric_values/count/count_request_builder.rb index f33fe94138..e53d8c4ded 100644 --- a/lib/device_management/user_experience_analytics_categories/item/metric_values/count/count_request_builder.rb +++ b/lib/device_management/user_experience_analytics_categories/item/metric_values/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsCategories/{userExperienceAnalyticsCategory%2Did}/metricValues/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsCategories/{userExperienceAnalyticsCategory%2Did}/metricValues/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/user_experience_analytics_categories/item/metric_values/item/user_experience_analytics_metric_item_request_builder.rb b/lib/device_management/user_experience_analytics_categories/item/metric_values/item/user_experience_analytics_metric_item_request_builder.rb index 796d7b4394..e02208c39d 100644 --- a/lib/device_management/user_experience_analytics_categories/item/metric_values/item/user_experience_analytics_metric_item_request_builder.rb +++ b/lib/device_management/user_experience_analytics_categories/item/metric_values/item/user_experience_analytics_metric_item_request_builder.rb @@ -25,7 +25,7 @@ class UserExperienceAnalyticsMetricItemRequestBuilder < MicrosoftKiotaAbstractio ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsCategories/{userExperienceAnalyticsCategory%2Did}/metricValues/{userExperienceAnalyticsMetric%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsCategories/{userExperienceAnalyticsCategory%2Did}/metricValues/{userExperienceAnalyticsMetric%2Did}{?%24expand,%24select}") end ## ## Delete navigation property metricValues for deviceManagement @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsMetric.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsMetric.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_metric_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsMetricItemRequestBuilder.new(raw_url, @request_adapter) + end ## # The metric values for the user experience analytics category. Read-only. diff --git a/lib/device_management/user_experience_analytics_categories/item/metric_values/metric_values_request_builder.rb b/lib/device_management/user_experience_analytics_categories/item/metric_values/metric_values_request_builder.rb index 9441992fee..01f224fa2c 100644 --- a/lib/device_management/user_experience_analytics_categories/item/metric_values/metric_values_request_builder.rb +++ b/lib/device_management/user_experience_analytics_categories/item/metric_values/metric_values_request_builder.rb @@ -42,7 +42,7 @@ def by_user_experience_analytics_metric_id(user_experience_analytics_metric_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsCategories/{userExperienceAnalyticsCategory%2Did}/metricValues{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsCategories/{userExperienceAnalyticsCategory%2Did}/metricValues{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## The metric values for the user experience analytics category. Read-only. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsMetricCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsMetric.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a metric_values_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MetricValuesRequestBuilder.new(raw_url, @request_adapter) + end ## # The metric values for the user experience analytics category. Read-only. diff --git a/lib/device_management/user_experience_analytics_categories/item/user_experience_analytics_category_item_request_builder.rb b/lib/device_management/user_experience_analytics_categories/item/user_experience_analytics_category_item_request_builder.rb index 170223b0b5..932d44e960 100644 --- a/lib/device_management/user_experience_analytics_categories/item/user_experience_analytics_category_item_request_builder.rb +++ b/lib/device_management/user_experience_analytics_categories/item/user_experience_analytics_category_item_request_builder.rb @@ -27,7 +27,7 @@ def metric_values() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsCategories/{userExperienceAnalyticsCategory%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsCategories/{userExperienceAnalyticsCategory%2Did}{?%24expand,%24select}") end ## ## Delete navigation property userExperienceAnalyticsCategories for deviceManagement @@ -39,8 +39,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -53,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsCategory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -69,8 +67,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsCategory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -80,13 +77,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -96,15 +94,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -116,17 +114,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_category_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsCategoryItemRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics categories diff --git a/lib/device_management/user_experience_analytics_categories/user_experience_analytics_categories_request_builder.rb b/lib/device_management/user_experience_analytics_categories/user_experience_analytics_categories_request_builder.rb index 5708b0394d..194237a77e 100644 --- a/lib/device_management/user_experience_analytics_categories/user_experience_analytics_categories_request_builder.rb +++ b/lib/device_management/user_experience_analytics_categories/user_experience_analytics_categories_request_builder.rb @@ -38,7 +38,7 @@ def by_user_experience_analytics_category_id(user_experience_analytics_category_ ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsCategories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsCategories{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## User experience analytics categories @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsCategoryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsCategory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_categories_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsCategoriesRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics categories diff --git a/lib/device_management/user_experience_analytics_device_performance/count/count_request_builder.rb b/lib/device_management/user_experience_analytics_device_performance/count/count_request_builder.rb index 83971df9d2..4c19fe2824 100644 --- a/lib/device_management/user_experience_analytics_device_performance/count/count_request_builder.rb +++ b/lib/device_management/user_experience_analytics_device_performance/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDevicePerformance/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDevicePerformance/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/user_experience_analytics_device_performance/item/user_experience_analytics_device_performance_item_request_builder.rb b/lib/device_management/user_experience_analytics_device_performance/item/user_experience_analytics_device_performance_item_request_builder.rb index 58a1dadaa6..c3c82c5423 100644 --- a/lib/device_management/user_experience_analytics_device_performance/item/user_experience_analytics_device_performance_item_request_builder.rb +++ b/lib/device_management/user_experience_analytics_device_performance/item/user_experience_analytics_device_performance_item_request_builder.rb @@ -21,7 +21,7 @@ class UserExperienceAnalyticsDevicePerformanceItemRequestBuilder < MicrosoftKiot ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDevicePerformance/{userExperienceAnalyticsDevicePerformance%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDevicePerformance/{userExperienceAnalyticsDevicePerformance%2Did}{?%24expand,%24select}") end ## ## Delete navigation property userExperienceAnalyticsDevicePerformance for deviceManagement @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsDevicePerformance.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsDevicePerformance.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_device_performance_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsDevicePerformanceItemRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics device performance diff --git a/lib/device_management/user_experience_analytics_device_performance/summarize_device_performance_devices_with_summarize_by/summarize_device_performance_devices_with_summarize_by.rb b/lib/device_management/user_experience_analytics_device_performance/summarize_device_performance_devices_with_summarize_by/summarize_device_performance_devices_with_summarize_by.rb index 2f53530bfd..8afcb3181b 100644 --- a/lib/device_management/user_experience_analytics_device_performance/summarize_device_performance_devices_with_summarize_by/summarize_device_performance_devices_with_summarize_by.rb +++ b/lib/device_management/user_experience_analytics_device_performance/summarize_device_performance_devices_with_summarize_by/summarize_device_performance_devices_with_summarize_by.rb @@ -1 +1 @@ -require_relative 'summarize_device_performance_devices_with_summarize_by_response' +require_relative 'summarize_device_performance_devices_with_summarize_by_get_response' diff --git a/lib/device_management/user_experience_analytics_device_performance/summarize_device_performance_devices_with_summarize_by/summarize_device_performance_devices_with_summarize_by_get_response.rb b/lib/device_management/user_experience_analytics_device_performance/summarize_device_performance_devices_with_summarize_by/summarize_device_performance_devices_with_summarize_by_get_response.rb new file mode 100644 index 0000000000..92e684776a --- /dev/null +++ b/lib/device_management/user_experience_analytics_device_performance/summarize_device_performance_devices_with_summarize_by/summarize_device_performance_devices_with_summarize_by_get_response.rb @@ -0,0 +1,72 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../../models/user_experience_analytics_device_performance' +require_relative '../../device_management' +require_relative '../user_experience_analytics_device_performance' +require_relative './summarize_device_performance_devices_with_summarize_by' + +module MicrosoftGraph + module DeviceManagement + module UserExperienceAnalyticsDevicePerformance + module SummarizeDevicePerformanceDevicesWithSummarizeBy + class SummarizeDevicePerformanceDevicesWithSummarizeByGetResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new SummarizeDevicePerformanceDevicesWithSummarizeByGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a summarize_device_performance_devices_with_summarize_by_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return SummarizeDevicePerformanceDevicesWithSummarizeByGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsDevicePerformance.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a user_experience_analytics_device_performance + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/device_management/user_experience_analytics_device_performance/summarize_device_performance_devices_with_summarize_by/summarize_device_performance_devices_with_summarize_by_request_builder.rb b/lib/device_management/user_experience_analytics_device_performance/summarize_device_performance_devices_with_summarize_by/summarize_device_performance_devices_with_summarize_by_request_builder.rb index 0a5367a7dd..a65a55f373 100644 --- a/lib/device_management/user_experience_analytics_device_performance/summarize_device_performance_devices_with_summarize_by/summarize_device_performance_devices_with_summarize_by_request_builder.rb +++ b/lib/device_management/user_experience_analytics_device_performance/summarize_device_performance_devices_with_summarize_by/summarize_device_performance_devices_with_summarize_by_request_builder.rb @@ -21,21 +21,20 @@ class SummarizeDevicePerformanceDevicesWithSummarizeByRequestBuilder < Microsoft ## @return a void ## def initialize(path_parameters, request_adapter, summarize_by=nil) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDevicePerformance/summarizeDevicePerformanceDevices(summarizeBy='{summarizeBy}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDevicePerformance/summarizeDevicePerformanceDevices(summarizeBy='{summarizeBy}'){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Invoke function summarizeDevicePerformanceDevices ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of summarize_device_performance_devices_with_summarize_by_response + ## @return a Fiber of summarize_device_performance_devices_with_summarize_by_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceManagement::UserExperienceAnalyticsDevicePerformance::SummarizeDevicePerformanceDevicesWithSummarizeBy::SummarizeDevicePerformanceDevicesWithSummarizeByResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceManagement::UserExperienceAnalyticsDevicePerformance::SummarizeDevicePerformanceDevicesWithSummarizeBy::SummarizeDevicePerformanceDevicesWithSummarizeByGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Invoke function summarizeDevicePerformanceDevices @@ -44,17 +43,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a summarize_device_performance_devices_with_summarize_by_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SummarizeDevicePerformanceDevicesWithSummarizeByRequestBuilder.new(raw_url, @request_adapter) + end ## # Invoke function summarizeDevicePerformanceDevices @@ -64,6 +72,9 @@ class SummarizeDevicePerformanceDevicesWithSummarizeByRequestBuilderGetQueryPara # Include count of items attr_accessor :count ## + # Expand related entities + attr_accessor :expand + ## # Filter items by property values attr_accessor :filter ## @@ -91,6 +102,8 @@ def get_query_parameter(original_name) case original_name when "count" return "%24count" + when "expand" + return "%24expand" when "filter" return "%24filter" when "orderby" diff --git a/lib/device_management/user_experience_analytics_device_performance/summarize_device_performance_devices_with_summarize_by/summarize_device_performance_devices_with_summarize_by_response.rb b/lib/device_management/user_experience_analytics_device_performance/summarize_device_performance_devices_with_summarize_by/summarize_device_performance_devices_with_summarize_by_response.rb deleted file mode 100644 index 168be22a5d..0000000000 --- a/lib/device_management/user_experience_analytics_device_performance/summarize_device_performance_devices_with_summarize_by/summarize_device_performance_devices_with_summarize_by_response.rb +++ /dev/null @@ -1,72 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../../models/user_experience_analytics_device_performance' -require_relative '../../device_management' -require_relative '../user_experience_analytics_device_performance' -require_relative './summarize_device_performance_devices_with_summarize_by' - -module MicrosoftGraph - module DeviceManagement - module UserExperienceAnalyticsDevicePerformance - module SummarizeDevicePerformanceDevicesWithSummarizeBy - class SummarizeDevicePerformanceDevicesWithSummarizeByResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new summarizeDevicePerformanceDevicesWithSummarizeByResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a summarize_device_performance_devices_with_summarize_by_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return SummarizeDevicePerformanceDevicesWithSummarizeByResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsDevicePerformance.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a user_experience_analytics_device_performance - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/device_management/user_experience_analytics_device_performance/user_experience_analytics_device_performance_request_builder.rb b/lib/device_management/user_experience_analytics_device_performance/user_experience_analytics_device_performance_request_builder.rb index 3ed16e92b5..3344797a87 100644 --- a/lib/device_management/user_experience_analytics_device_performance/user_experience_analytics_device_performance_request_builder.rb +++ b/lib/device_management/user_experience_analytics_device_performance/user_experience_analytics_device_performance_request_builder.rb @@ -39,7 +39,7 @@ def by_user_experience_analytics_device_performance_id(user_experience_analytics ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDevicePerformance{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDevicePerformance{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## User experience analytics device performance @@ -51,8 +51,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsDevicePerformanceCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +66,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsDevicePerformance.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -87,15 +85,15 @@ def summarize_device_performance_devices_with_summarize_by(summarize_by) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -107,17 +105,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_device_performance_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsDevicePerformanceRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics device performance diff --git a/lib/device_management/user_experience_analytics_device_scores/count/count_request_builder.rb b/lib/device_management/user_experience_analytics_device_scores/count/count_request_builder.rb index 52e57c7415..404b046858 100644 --- a/lib/device_management/user_experience_analytics_device_scores/count/count_request_builder.rb +++ b/lib/device_management/user_experience_analytics_device_scores/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceScores/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceScores/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/user_experience_analytics_device_scores/item/user_experience_analytics_device_scores_item_request_builder.rb b/lib/device_management/user_experience_analytics_device_scores/item/user_experience_analytics_device_scores_item_request_builder.rb index 943b6d7ca4..ecf9373b96 100644 --- a/lib/device_management/user_experience_analytics_device_scores/item/user_experience_analytics_device_scores_item_request_builder.rb +++ b/lib/device_management/user_experience_analytics_device_scores/item/user_experience_analytics_device_scores_item_request_builder.rb @@ -21,7 +21,7 @@ class UserExperienceAnalyticsDeviceScoresItemRequestBuilder < MicrosoftKiotaAbst ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceScores/{userExperienceAnalyticsDeviceScores%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceScores/{userExperienceAnalyticsDeviceScores%2Did}{?%24expand,%24select}") end ## ## Delete navigation property userExperienceAnalyticsDeviceScores for deviceManagement @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsDeviceScores.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsDeviceScores.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_device_scores_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsDeviceScoresItemRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics device scores diff --git a/lib/device_management/user_experience_analytics_device_scores/user_experience_analytics_device_scores_request_builder.rb b/lib/device_management/user_experience_analytics_device_scores/user_experience_analytics_device_scores_request_builder.rb index 11b35fdafc..5dbe9720b2 100644 --- a/lib/device_management/user_experience_analytics_device_scores/user_experience_analytics_device_scores_request_builder.rb +++ b/lib/device_management/user_experience_analytics_device_scores/user_experience_analytics_device_scores_request_builder.rb @@ -38,7 +38,7 @@ def by_user_experience_analytics_device_scores_id(user_experience_analytics_devi ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceScores{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceScores{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## User experience analytics device scores @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsDeviceScoresCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsDeviceScores.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_device_scores_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsDeviceScoresRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics device scores diff --git a/lib/device_management/user_experience_analytics_device_startup_history/count/count_request_builder.rb b/lib/device_management/user_experience_analytics_device_startup_history/count/count_request_builder.rb index 7c6fee3fd6..7ddaf24f4e 100644 --- a/lib/device_management/user_experience_analytics_device_startup_history/count/count_request_builder.rb +++ b/lib/device_management/user_experience_analytics_device_startup_history/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceStartupHistory/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceStartupHistory/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/user_experience_analytics_device_startup_history/item/user_experience_analytics_device_startup_history_item_request_builder.rb b/lib/device_management/user_experience_analytics_device_startup_history/item/user_experience_analytics_device_startup_history_item_request_builder.rb index 103ded93aa..2658c3f2ee 100644 --- a/lib/device_management/user_experience_analytics_device_startup_history/item/user_experience_analytics_device_startup_history_item_request_builder.rb +++ b/lib/device_management/user_experience_analytics_device_startup_history/item/user_experience_analytics_device_startup_history_item_request_builder.rb @@ -21,7 +21,7 @@ class UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilder < MicrosoftK ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceStartupHistory/{userExperienceAnalyticsDeviceStartupHistory%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceStartupHistory/{userExperienceAnalyticsDeviceStartupHistory%2Did}{?%24expand,%24select}") end ## ## Delete navigation property userExperienceAnalyticsDeviceStartupHistory for deviceManagement @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsDeviceStartupHistory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsDeviceStartupHistory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_device_startup_history_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics device Startup History diff --git a/lib/device_management/user_experience_analytics_device_startup_history/user_experience_analytics_device_startup_history_request_builder.rb b/lib/device_management/user_experience_analytics_device_startup_history/user_experience_analytics_device_startup_history_request_builder.rb index 68b88ae069..97275f5a0d 100644 --- a/lib/device_management/user_experience_analytics_device_startup_history/user_experience_analytics_device_startup_history_request_builder.rb +++ b/lib/device_management/user_experience_analytics_device_startup_history/user_experience_analytics_device_startup_history_request_builder.rb @@ -38,7 +38,7 @@ def by_user_experience_analytics_device_startup_history_id(user_experience_analy ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceStartupHistory{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceStartupHistory{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## User experience analytics device Startup History @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsDeviceStartupHistoryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsDeviceStartupHistory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_device_startup_history_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsDeviceStartupHistoryRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics device Startup History diff --git a/lib/me/chats/item/pinned_messages/count/count.rb b/lib/device_management/user_experience_analytics_device_startup_process_performance/count/count.rb similarity index 100% rename from lib/me/chats/item/pinned_messages/count/count.rb rename to lib/device_management/user_experience_analytics_device_startup_process_performance/count/count.rb diff --git a/lib/device_management/user_experience_analytics_device_startup_process_performance/count/count_request_builder.rb b/lib/device_management/user_experience_analytics_device_startup_process_performance/count/count_request_builder.rb new file mode 100644 index 0000000000..0105f5bf2d --- /dev/null +++ b/lib/device_management/user_experience_analytics_device_startup_process_performance/count/count_request_builder.rb @@ -0,0 +1,97 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../device_management' +require_relative '../user_experience_analytics_device_startup_process_performance' +require_relative './count' + +module MicrosoftGraph + module DeviceManagement + module UserExperienceAnalyticsDeviceStartupProcessPerformance + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceStartupProcessPerformance/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/events/item/item.rb b/lib/device_management/user_experience_analytics_device_startup_process_performance/item/item.rb similarity index 100% rename from lib/me/calendars/item/events/item/item.rb rename to lib/device_management/user_experience_analytics_device_startup_process_performance/item/item.rb diff --git a/lib/device_management/user_experience_analytics_device_startup_process_performance/item/user_experience_analytics_device_startup_process_performance_item_request_builder.rb b/lib/device_management/user_experience_analytics_device_startup_process_performance/item/user_experience_analytics_device_startup_process_performance_item_request_builder.rb new file mode 100644 index 0000000000..60dee52b6e --- /dev/null +++ b/lib/device_management/user_experience_analytics_device_startup_process_performance/item/user_experience_analytics_device_startup_process_performance_item_request_builder.rb @@ -0,0 +1,163 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../../models/user_experience_analytics_device_startup_process_performance' +require_relative '../../device_management' +require_relative '../user_experience_analytics_device_startup_process_performance' +require_relative './item' + +module MicrosoftGraph + module DeviceManagement + module UserExperienceAnalyticsDeviceStartupProcessPerformance + module Item + ## + # Provides operations to manage the userExperienceAnalyticsDeviceStartupProcessPerformance property of the microsoft.graph.deviceManagement entity. + class UserExperienceAnalyticsDeviceStartupProcessPerformanceItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new UserExperienceAnalyticsDeviceStartupProcessPerformanceItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceStartupProcessPerformance/{userExperienceAnalyticsDeviceStartupProcessPerformance%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property userExperienceAnalyticsDeviceStartupProcessPerformance for deviceManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## User experience analytics device Startup Process Performance + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of user_experience_analytics_device_startup_process_performance + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsDeviceStartupProcessPerformance.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property userExperienceAnalyticsDeviceStartupProcessPerformance in deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of user_experience_analytics_device_startup_process_performance + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsDeviceStartupProcessPerformance.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property userExperienceAnalyticsDeviceStartupProcessPerformance for deviceManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## User experience analytics device Startup Process Performance + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property userExperienceAnalyticsDeviceStartupProcessPerformance in deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_device_startup_process_performance_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsDeviceStartupProcessPerformanceItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # User experience analytics device Startup Process Performance + class UserExperienceAnalyticsDeviceStartupProcessPerformanceItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/calendar_view/item/instances/instances.rb b/lib/device_management/user_experience_analytics_device_startup_process_performance/user_experience_analytics_device_startup_process_performance.rb similarity index 100% rename from lib/me/calendars/item/calendar_view/item/instances/instances.rb rename to lib/device_management/user_experience_analytics_device_startup_process_performance/user_experience_analytics_device_startup_process_performance.rb diff --git a/lib/device_management/user_experience_analytics_device_startup_process_performance/user_experience_analytics_device_startup_process_performance_request_builder.rb b/lib/device_management/user_experience_analytics_device_startup_process_performance/user_experience_analytics_device_startup_process_performance_request_builder.rb new file mode 100644 index 0000000000..86a6e2f514 --- /dev/null +++ b/lib/device_management/user_experience_analytics_device_startup_process_performance/user_experience_analytics_device_startup_process_performance_request_builder.rb @@ -0,0 +1,179 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/o_data_errors_o_data_error' +require_relative '../../models/user_experience_analytics_device_startup_process_performance' +require_relative '../../models/user_experience_analytics_device_startup_process_performance_collection_response' +require_relative '../device_management' +require_relative './count/count_request_builder' +require_relative './item/user_experience_analytics_device_startup_process_performance_item_request_builder' +require_relative './user_experience_analytics_device_startup_process_performance' + +module MicrosoftGraph + module DeviceManagement + module UserExperienceAnalyticsDeviceStartupProcessPerformance + ## + # Provides operations to manage the userExperienceAnalyticsDeviceStartupProcessPerformance property of the microsoft.graph.deviceManagement entity. + class UserExperienceAnalyticsDeviceStartupProcessPerformanceRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceManagement::UserExperienceAnalyticsDeviceStartupProcessPerformance::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the userExperienceAnalyticsDeviceStartupProcessPerformance property of the microsoft.graph.deviceManagement entity. + ## @param user_experience_analytics_device_startup_process_performance_id The unique identifier of userExperienceAnalyticsDeviceStartupProcessPerformance + ## @return a user_experience_analytics_device_startup_process_performance_item_request_builder + ## + def by_user_experience_analytics_device_startup_process_performance_id(user_experience_analytics_device_startup_process_performance_id) + raise StandardError, 'user_experience_analytics_device_startup_process_performance_id cannot be null' if user_experience_analytics_device_startup_process_performance_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["userExperienceAnalyticsDeviceStartupProcessPerformance%2Did"] = user_experience_analytics_device_startup_process_performance_id + return MicrosoftGraph::DeviceManagement::UserExperienceAnalyticsDeviceStartupProcessPerformance::Item::UserExperienceAnalyticsDeviceStartupProcessPerformanceItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new UserExperienceAnalyticsDeviceStartupProcessPerformanceRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceStartupProcessPerformance{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## User experience analytics device Startup Process Performance + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of user_experience_analytics_device_startup_process_performance_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsDeviceStartupProcessPerformanceCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to userExperienceAnalyticsDeviceStartupProcessPerformance for deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of user_experience_analytics_device_startup_process_performance + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsDeviceStartupProcessPerformance.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## User experience analytics device Startup Process Performance + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to userExperienceAnalyticsDeviceStartupProcessPerformance for deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_device_startup_process_performance_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsDeviceStartupProcessPerformanceRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # User experience analytics device Startup Process Performance + class UserExperienceAnalyticsDeviceStartupProcessPerformanceRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end +end diff --git a/lib/device_management/user_experience_analytics_device_startup_processes/count/count_request_builder.rb b/lib/device_management/user_experience_analytics_device_startup_processes/count/count_request_builder.rb index d1e110905a..6d68d62fa1 100644 --- a/lib/device_management/user_experience_analytics_device_startup_processes/count/count_request_builder.rb +++ b/lib/device_management/user_experience_analytics_device_startup_processes/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceStartupProcesses/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceStartupProcesses/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/user_experience_analytics_device_startup_processes/item/user_experience_analytics_device_startup_process_item_request_builder.rb b/lib/device_management/user_experience_analytics_device_startup_processes/item/user_experience_analytics_device_startup_process_item_request_builder.rb index 8eda8c4c84..a15687e2d6 100644 --- a/lib/device_management/user_experience_analytics_device_startup_processes/item/user_experience_analytics_device_startup_process_item_request_builder.rb +++ b/lib/device_management/user_experience_analytics_device_startup_processes/item/user_experience_analytics_device_startup_process_item_request_builder.rb @@ -21,7 +21,7 @@ class UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilder < MicrosoftK ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceStartupProcesses/{userExperienceAnalyticsDeviceStartupProcess%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceStartupProcesses/{userExperienceAnalyticsDeviceStartupProcess%2Did}{?%24expand,%24select}") end ## ## Delete navigation property userExperienceAnalyticsDeviceStartupProcesses for deviceManagement @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsDeviceStartupProcess.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsDeviceStartupProcess.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_device_startup_process_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics device Startup Processes diff --git a/lib/device_management/user_experience_analytics_device_startup_processes/user_experience_analytics_device_startup_processes_request_builder.rb b/lib/device_management/user_experience_analytics_device_startup_processes/user_experience_analytics_device_startup_processes_request_builder.rb index b2d5c1783f..d955e3028f 100644 --- a/lib/device_management/user_experience_analytics_device_startup_processes/user_experience_analytics_device_startup_processes_request_builder.rb +++ b/lib/device_management/user_experience_analytics_device_startup_processes/user_experience_analytics_device_startup_processes_request_builder.rb @@ -38,7 +38,7 @@ def by_user_experience_analytics_device_startup_process_id(user_experience_analy ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceStartupProcesses{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsDeviceStartupProcesses{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## User experience analytics device Startup Processes @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsDeviceStartupProcessCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsDeviceStartupProcess.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_device_startup_processes_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsDeviceStartupProcessesRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics device Startup Processes diff --git a/lib/device_management/user_experience_analytics_metric_history/count/count_request_builder.rb b/lib/device_management/user_experience_analytics_metric_history/count/count_request_builder.rb index 9f8052c22d..c0abb440dd 100644 --- a/lib/device_management/user_experience_analytics_metric_history/count/count_request_builder.rb +++ b/lib/device_management/user_experience_analytics_metric_history/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsMetricHistory/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsMetricHistory/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/user_experience_analytics_metric_history/item/user_experience_analytics_metric_history_item_request_builder.rb b/lib/device_management/user_experience_analytics_metric_history/item/user_experience_analytics_metric_history_item_request_builder.rb index e301a7471f..747a03c8a2 100644 --- a/lib/device_management/user_experience_analytics_metric_history/item/user_experience_analytics_metric_history_item_request_builder.rb +++ b/lib/device_management/user_experience_analytics_metric_history/item/user_experience_analytics_metric_history_item_request_builder.rb @@ -21,7 +21,7 @@ class UserExperienceAnalyticsMetricHistoryItemRequestBuilder < MicrosoftKiotaAbs ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsMetricHistory/{userExperienceAnalyticsMetricHistory%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsMetricHistory/{userExperienceAnalyticsMetricHistory%2Did}{?%24expand,%24select}") end ## ## Delete navigation property userExperienceAnalyticsMetricHistory for deviceManagement @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsMetricHistory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsMetricHistory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_metric_history_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsMetricHistoryItemRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics metric history diff --git a/lib/device_management/user_experience_analytics_metric_history/user_experience_analytics_metric_history_request_builder.rb b/lib/device_management/user_experience_analytics_metric_history/user_experience_analytics_metric_history_request_builder.rb index 443d228abe..efae68e3eb 100644 --- a/lib/device_management/user_experience_analytics_metric_history/user_experience_analytics_metric_history_request_builder.rb +++ b/lib/device_management/user_experience_analytics_metric_history/user_experience_analytics_metric_history_request_builder.rb @@ -38,7 +38,7 @@ def by_user_experience_analytics_metric_history_id(user_experience_analytics_met ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsMetricHistory{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsMetricHistory{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## User experience analytics metric history @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsMetricHistoryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsMetricHistory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_metric_history_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsMetricHistoryRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics metric history diff --git a/lib/device_management/user_experience_analytics_model_scores/count/count_request_builder.rb b/lib/device_management/user_experience_analytics_model_scores/count/count_request_builder.rb index 622811b6aa..b0df2288e5 100644 --- a/lib/device_management/user_experience_analytics_model_scores/count/count_request_builder.rb +++ b/lib/device_management/user_experience_analytics_model_scores/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsModelScores/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsModelScores/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/user_experience_analytics_model_scores/item/user_experience_analytics_model_scores_item_request_builder.rb b/lib/device_management/user_experience_analytics_model_scores/item/user_experience_analytics_model_scores_item_request_builder.rb index 5e6e5ec8bd..665ee3cb3f 100644 --- a/lib/device_management/user_experience_analytics_model_scores/item/user_experience_analytics_model_scores_item_request_builder.rb +++ b/lib/device_management/user_experience_analytics_model_scores/item/user_experience_analytics_model_scores_item_request_builder.rb @@ -21,7 +21,7 @@ class UserExperienceAnalyticsModelScoresItemRequestBuilder < MicrosoftKiotaAbstr ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsModelScores/{userExperienceAnalyticsModelScores%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsModelScores/{userExperienceAnalyticsModelScores%2Did}{?%24expand,%24select}") end ## ## Delete navigation property userExperienceAnalyticsModelScores for deviceManagement @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsModelScores.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsModelScores.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_model_scores_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsModelScoresItemRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics model scores diff --git a/lib/device_management/user_experience_analytics_model_scores/user_experience_analytics_model_scores_request_builder.rb b/lib/device_management/user_experience_analytics_model_scores/user_experience_analytics_model_scores_request_builder.rb index 8783cec0f5..e94fdc8154 100644 --- a/lib/device_management/user_experience_analytics_model_scores/user_experience_analytics_model_scores_request_builder.rb +++ b/lib/device_management/user_experience_analytics_model_scores/user_experience_analytics_model_scores_request_builder.rb @@ -38,7 +38,7 @@ def by_user_experience_analytics_model_scores_id(user_experience_analytics_model ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsModelScores{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsModelScores{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## User experience analytics model scores @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsModelScoresCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsModelScores.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_model_scores_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsModelScoresRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics model scores diff --git a/lib/device_management/user_experience_analytics_overview/user_experience_analytics_overview_request_builder.rb b/lib/device_management/user_experience_analytics_overview/user_experience_analytics_overview_request_builder.rb index 8019f45ff3..940afcf099 100644 --- a/lib/device_management/user_experience_analytics_overview/user_experience_analytics_overview_request_builder.rb +++ b/lib/device_management/user_experience_analytics_overview/user_experience_analytics_overview_request_builder.rb @@ -19,7 +19,7 @@ class UserExperienceAnalyticsOverviewRequestBuilder < MicrosoftKiotaAbstractions ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsOverview{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsOverview{?%24expand,%24select}") end ## ## Delete navigation property userExperienceAnalyticsOverview for deviceManagement @@ -31,8 +31,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,8 +44,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsOverview.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -61,8 +59,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsOverview.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -72,13 +69,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -88,15 +86,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -108,17 +106,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_overview_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsOverviewRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics overview diff --git a/lib/device_management/user_experience_analytics_score_history/count/count_request_builder.rb b/lib/device_management/user_experience_analytics_score_history/count/count_request_builder.rb index 8b2a3a79ad..dc940fcf1d 100644 --- a/lib/device_management/user_experience_analytics_score_history/count/count_request_builder.rb +++ b/lib/device_management/user_experience_analytics_score_history/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsScoreHistory/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsScoreHistory/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/user_experience_analytics_score_history/item/user_experience_analytics_score_history_item_request_builder.rb b/lib/device_management/user_experience_analytics_score_history/item/user_experience_analytics_score_history_item_request_builder.rb index 31134741bb..1e35a4f6e2 100644 --- a/lib/device_management/user_experience_analytics_score_history/item/user_experience_analytics_score_history_item_request_builder.rb +++ b/lib/device_management/user_experience_analytics_score_history/item/user_experience_analytics_score_history_item_request_builder.rb @@ -21,7 +21,7 @@ class UserExperienceAnalyticsScoreHistoryItemRequestBuilder < MicrosoftKiotaAbst ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsScoreHistory/{userExperienceAnalyticsScoreHistory%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsScoreHistory/{userExperienceAnalyticsScoreHistory%2Did}{?%24expand,%24select}") end ## ## Delete navigation property userExperienceAnalyticsScoreHistory for deviceManagement @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsScoreHistory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsScoreHistory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_score_history_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsScoreHistoryItemRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics device Startup Score History diff --git a/lib/device_management/user_experience_analytics_score_history/user_experience_analytics_score_history_request_builder.rb b/lib/device_management/user_experience_analytics_score_history/user_experience_analytics_score_history_request_builder.rb index 999e3c5ab9..6c7929b9d3 100644 --- a/lib/device_management/user_experience_analytics_score_history/user_experience_analytics_score_history_request_builder.rb +++ b/lib/device_management/user_experience_analytics_score_history/user_experience_analytics_score_history_request_builder.rb @@ -38,7 +38,7 @@ def by_user_experience_analytics_score_history_id(user_experience_analytics_scor ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsScoreHistory{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsScoreHistory{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## User experience analytics device Startup Score History @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsScoreHistoryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsScoreHistory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_score_history_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsScoreHistoryRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics device Startup Score History diff --git a/lib/device_management/user_experience_analytics_summarize_work_from_anywhere_devices/user_experience_analytics_summarize_work_from_anywhere_devices_request_builder.rb b/lib/device_management/user_experience_analytics_summarize_work_from_anywhere_devices/user_experience_analytics_summarize_work_from_anywhere_devices_request_builder.rb index fabdda64cc..1eb9a68b3d 100644 --- a/lib/device_management/user_experience_analytics_summarize_work_from_anywhere_devices/user_experience_analytics_summarize_work_from_anywhere_devices_request_builder.rb +++ b/lib/device_management/user_experience_analytics_summarize_work_from_anywhere_devices/user_experience_analytics_summarize_work_from_anywhere_devices_request_builder.rb @@ -31,8 +31,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsWorkFromAnywhereDevicesSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -42,16 +41,25 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_summarize_work_from_anywhere_devices_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsSummarizeWorkFromAnywhereDevicesRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/user_experience_analytics_work_from_anywhere_hardware_readiness_metric/user_experience_analytics_work_from_anywhere_hardware_readiness_metric_request_builder.rb b/lib/device_management/user_experience_analytics_work_from_anywhere_hardware_readiness_metric/user_experience_analytics_work_from_anywhere_hardware_readiness_metric_request_builder.rb index 801f66fbf4..0678bffd79 100644 --- a/lib/device_management/user_experience_analytics_work_from_anywhere_hardware_readiness_metric/user_experience_analytics_work_from_anywhere_hardware_readiness_metric_request_builder.rb +++ b/lib/device_management/user_experience_analytics_work_from_anywhere_hardware_readiness_metric/user_experience_analytics_work_from_anywhere_hardware_readiness_metric_request_builder.rb @@ -19,7 +19,7 @@ class UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuild ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric{?%24expand,%24select}") end ## ## Delete navigation property userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric for deviceManagement @@ -31,8 +31,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,8 +44,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -61,8 +59,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -72,13 +69,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -88,15 +86,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -108,17 +106,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_work_from_anywhere_hardware_readiness_metric_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics work from anywhere hardware readiness metrics. diff --git a/lib/device_management/user_experience_analytics_work_from_anywhere_metrics/count/count_request_builder.rb b/lib/device_management/user_experience_analytics_work_from_anywhere_metrics/count/count_request_builder.rb index a346868159..7187aafaaf 100644 --- a/lib/device_management/user_experience_analytics_work_from_anywhere_metrics/count/count_request_builder.rb +++ b/lib/device_management/user_experience_analytics_work_from_anywhere_metrics/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereMetrics/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereMetrics/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/user_experience_analytics_work_from_anywhere_metrics/item/metric_devices/count/count_request_builder.rb b/lib/device_management/user_experience_analytics_work_from_anywhere_metrics/item/metric_devices/count/count_request_builder.rb index f06fb2576a..7d3f090ca4 100644 --- a/lib/device_management/user_experience_analytics_work_from_anywhere_metrics/item/metric_devices/count/count_request_builder.rb +++ b/lib/device_management/user_experience_analytics_work_from_anywhere_metrics/item/metric_devices/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereMetrics/{userExperienceAnalyticsWorkFromAnywhereMetric%2Did}/metricDevices/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereMetrics/{userExperienceAnalyticsWorkFromAnywhereMetric%2Did}/metricDevices/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/user_experience_analytics_work_from_anywhere_metrics/item/metric_devices/item/user_experience_analytics_work_from_anywhere_device_item_request_builder.rb b/lib/device_management/user_experience_analytics_work_from_anywhere_metrics/item/metric_devices/item/user_experience_analytics_work_from_anywhere_device_item_request_builder.rb index 4474275b0c..cd8f38d7f6 100644 --- a/lib/device_management/user_experience_analytics_work_from_anywhere_metrics/item/metric_devices/item/user_experience_analytics_work_from_anywhere_device_item_request_builder.rb +++ b/lib/device_management/user_experience_analytics_work_from_anywhere_metrics/item/metric_devices/item/user_experience_analytics_work_from_anywhere_device_item_request_builder.rb @@ -25,7 +25,7 @@ class UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilder < Microsof ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereMetrics/{userExperienceAnalyticsWorkFromAnywhereMetric%2Did}/metricDevices/{userExperienceAnalyticsWorkFromAnywhereDevice%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereMetrics/{userExperienceAnalyticsWorkFromAnywhereMetric%2Did}/metricDevices/{userExperienceAnalyticsWorkFromAnywhereDevice%2Did}{?%24expand,%24select}") end ## ## Delete navigation property metricDevices for deviceManagement @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsWorkFromAnywhereDevice.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsWorkFromAnywhereDevice.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_work_from_anywhere_device_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilder.new(raw_url, @request_adapter) + end ## # The work from anywhere metric devices. Read-only. diff --git a/lib/device_management/user_experience_analytics_work_from_anywhere_metrics/item/metric_devices/metric_devices_request_builder.rb b/lib/device_management/user_experience_analytics_work_from_anywhere_metrics/item/metric_devices/metric_devices_request_builder.rb index 697ba1f2aa..9a499bd247 100644 --- a/lib/device_management/user_experience_analytics_work_from_anywhere_metrics/item/metric_devices/metric_devices_request_builder.rb +++ b/lib/device_management/user_experience_analytics_work_from_anywhere_metrics/item/metric_devices/metric_devices_request_builder.rb @@ -42,7 +42,7 @@ def by_user_experience_analytics_work_from_anywhere_device_id(user_experience_an ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereMetrics/{userExperienceAnalyticsWorkFromAnywhereMetric%2Did}/metricDevices{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereMetrics/{userExperienceAnalyticsWorkFromAnywhereMetric%2Did}/metricDevices{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## The work from anywhere metric devices. Read-only. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsWorkFromAnywhereDeviceCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsWorkFromAnywhereDevice.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a metric_devices_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MetricDevicesRequestBuilder.new(raw_url, @request_adapter) + end ## # The work from anywhere metric devices. Read-only. diff --git a/lib/device_management/user_experience_analytics_work_from_anywhere_metrics/item/user_experience_analytics_work_from_anywhere_metric_item_request_builder.rb b/lib/device_management/user_experience_analytics_work_from_anywhere_metrics/item/user_experience_analytics_work_from_anywhere_metric_item_request_builder.rb index 7524bc5f78..64c281cf62 100644 --- a/lib/device_management/user_experience_analytics_work_from_anywhere_metrics/item/user_experience_analytics_work_from_anywhere_metric_item_request_builder.rb +++ b/lib/device_management/user_experience_analytics_work_from_anywhere_metrics/item/user_experience_analytics_work_from_anywhere_metric_item_request_builder.rb @@ -27,7 +27,7 @@ def metric_devices() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereMetrics/{userExperienceAnalyticsWorkFromAnywhereMetric%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereMetrics/{userExperienceAnalyticsWorkFromAnywhereMetric%2Did}{?%24expand,%24select}") end ## ## Delete navigation property userExperienceAnalyticsWorkFromAnywhereMetrics for deviceManagement @@ -39,8 +39,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -53,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsWorkFromAnywhereMetric.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -69,8 +67,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsWorkFromAnywhereMetric.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -80,13 +77,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -96,15 +94,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -116,17 +114,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_work_from_anywhere_metric_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics work from anywhere metrics. diff --git a/lib/device_management/user_experience_analytics_work_from_anywhere_metrics/user_experience_analytics_work_from_anywhere_metrics_request_builder.rb b/lib/device_management/user_experience_analytics_work_from_anywhere_metrics/user_experience_analytics_work_from_anywhere_metrics_request_builder.rb index 15b7e3660f..f105363eed 100644 --- a/lib/device_management/user_experience_analytics_work_from_anywhere_metrics/user_experience_analytics_work_from_anywhere_metrics_request_builder.rb +++ b/lib/device_management/user_experience_analytics_work_from_anywhere_metrics/user_experience_analytics_work_from_anywhere_metrics_request_builder.rb @@ -38,7 +38,7 @@ def by_user_experience_analytics_work_from_anywhere_metric_id(user_experience_an ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereMetrics{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereMetrics{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## User experience analytics work from anywhere metrics. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsWorkFromAnywhereMetricCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsWorkFromAnywhereMetric.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_work_from_anywhere_metrics_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilder.new(raw_url, @request_adapter) + end ## # User experience analytics work from anywhere metrics. diff --git a/lib/device_management/user_experience_analytics_work_from_anywhere_model_performance/count/count_request_builder.rb b/lib/device_management/user_experience_analytics_work_from_anywhere_model_performance/count/count_request_builder.rb index d26861d44d..6ba1dc091d 100644 --- a/lib/device_management/user_experience_analytics_work_from_anywhere_model_performance/count/count_request_builder.rb +++ b/lib/device_management/user_experience_analytics_work_from_anywhere_model_performance/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereModelPerformance/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereModelPerformance/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/user_experience_analytics_work_from_anywhere_model_performance/item/user_experience_analytics_work_from_anywhere_model_performance_item_request_builder.rb b/lib/device_management/user_experience_analytics_work_from_anywhere_model_performance/item/user_experience_analytics_work_from_anywhere_model_performance_item_request_builder.rb index 4e581b3574..327a734c3e 100644 --- a/lib/device_management/user_experience_analytics_work_from_anywhere_model_performance/item/user_experience_analytics_work_from_anywhere_model_performance_item_request_builder.rb +++ b/lib/device_management/user_experience_analytics_work_from_anywhere_model_performance/item/user_experience_analytics_work_from_anywhere_model_performance_item_request_builder.rb @@ -21,7 +21,7 @@ class UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereModelPerformance/{userExperienceAnalyticsWorkFromAnywhereModelPerformance%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereModelPerformance/{userExperienceAnalyticsWorkFromAnywhereModelPerformance%2Did}{?%24expand,%24select}") end ## ## Delete navigation property userExperienceAnalyticsWorkFromAnywhereModelPerformance for deviceManagement @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsWorkFromAnywhereModelPerformance.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsWorkFromAnywhereModelPerformance.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_work_from_anywhere_model_performance_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilder.new(raw_url, @request_adapter) + end ## # The user experience analytics work from anywhere model performance diff --git a/lib/device_management/user_experience_analytics_work_from_anywhere_model_performance/user_experience_analytics_work_from_anywhere_model_performance_request_builder.rb b/lib/device_management/user_experience_analytics_work_from_anywhere_model_performance/user_experience_analytics_work_from_anywhere_model_performance_request_builder.rb index cda6ad9c5d..bc77f3f708 100644 --- a/lib/device_management/user_experience_analytics_work_from_anywhere_model_performance/user_experience_analytics_work_from_anywhere_model_performance_request_builder.rb +++ b/lib/device_management/user_experience_analytics_work_from_anywhere_model_performance/user_experience_analytics_work_from_anywhere_model_performance_request_builder.rb @@ -38,7 +38,7 @@ def by_user_experience_analytics_work_from_anywhere_model_performance_id(user_ex ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereModelPerformance{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/userExperienceAnalyticsWorkFromAnywhereModelPerformance{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## The user experience analytics work from anywhere model performance @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsWorkFromAnywhereModelPerformanceCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyticsWorkFromAnywhereModelPerformance.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_experience_analytics_work_from_anywhere_model_performance_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilder.new(raw_url, @request_adapter) + end ## # The user experience analytics work from anywhere model performance diff --git a/lib/device_management/verify_windows_enrollment_auto_discovery_with_domain_name/verify_windows_enrollment_auto_discovery_with_domain_name.rb b/lib/device_management/verify_windows_enrollment_auto_discovery_with_domain_name/verify_windows_enrollment_auto_discovery_with_domain_name.rb index ab6637ba7e..64eea21011 100644 --- a/lib/device_management/verify_windows_enrollment_auto_discovery_with_domain_name/verify_windows_enrollment_auto_discovery_with_domain_name.rb +++ b/lib/device_management/verify_windows_enrollment_auto_discovery_with_domain_name/verify_windows_enrollment_auto_discovery_with_domain_name.rb @@ -1 +1 @@ -require_relative 'verify_windows_enrollment_auto_discovery_with_domain_name_response' +require_relative 'verify_windows_enrollment_auto_discovery_with_domain_name_get_response' diff --git a/lib/device_management/verify_windows_enrollment_auto_discovery_with_domain_name/verify_windows_enrollment_auto_discovery_with_domain_name_get_response.rb b/lib/device_management/verify_windows_enrollment_auto_discovery_with_domain_name/verify_windows_enrollment_auto_discovery_with_domain_name_get_response.rb new file mode 100644 index 0000000000..306b0580fb --- /dev/null +++ b/lib/device_management/verify_windows_enrollment_auto_discovery_with_domain_name/verify_windows_enrollment_auto_discovery_with_domain_name_get_response.rb @@ -0,0 +1,85 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../device_management' +require_relative './verify_windows_enrollment_auto_discovery_with_domain_name' + +module MicrosoftGraph + module DeviceManagement + module VerifyWindowsEnrollmentAutoDiscoveryWithDomainName + class VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameGetResponse + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The value property + @value + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameGetResponse and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a verify_windows_enrollment_auto_discovery_with_domain_name_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "value" => lambda {|n| @value = n.get_boolean_value() }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_boolean_value("value", @value) + writer.write_additional_data(@additional_data) + end + ## + ## Gets the value property value. The value property + ## @return a boolean + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/device_management/verify_windows_enrollment_auto_discovery_with_domain_name/verify_windows_enrollment_auto_discovery_with_domain_name_request_builder.rb b/lib/device_management/verify_windows_enrollment_auto_discovery_with_domain_name/verify_windows_enrollment_auto_discovery_with_domain_name_request_builder.rb index ac420c5782..7bd6e01e89 100644 --- a/lib/device_management/verify_windows_enrollment_auto_discovery_with_domain_name/verify_windows_enrollment_auto_discovery_with_domain_name_request_builder.rb +++ b/lib/device_management/verify_windows_enrollment_auto_discovery_with_domain_name/verify_windows_enrollment_auto_discovery_with_domain_name_request_builder.rb @@ -24,16 +24,15 @@ def initialize(path_parameters, request_adapter, domain_name=nil) ## ## Invoke function verifyWindowsEnrollmentAutoDiscovery ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of verify_windows_enrollment_auto_discovery_with_domain_name_response + ## @return a Fiber of verify_windows_enrollment_auto_discovery_with_domain_name_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceManagement::VerifyWindowsEnrollmentAutoDiscoveryWithDomainName::VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceManagement::VerifyWindowsEnrollmentAutoDiscoveryWithDomainName::VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Invoke function verifyWindowsEnrollmentAutoDiscovery @@ -42,16 +41,25 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a verify_windows_enrollment_auto_discovery_with_domain_name_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/verify_windows_enrollment_auto_discovery_with_domain_name/verify_windows_enrollment_auto_discovery_with_domain_name_response.rb b/lib/device_management/verify_windows_enrollment_auto_discovery_with_domain_name/verify_windows_enrollment_auto_discovery_with_domain_name_response.rb deleted file mode 100644 index 00809a7460..0000000000 --- a/lib/device_management/verify_windows_enrollment_auto_discovery_with_domain_name/verify_windows_enrollment_auto_discovery_with_domain_name_response.rb +++ /dev/null @@ -1,85 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../microsoft_graph' -require_relative '../device_management' -require_relative './verify_windows_enrollment_auto_discovery_with_domain_name' - -module MicrosoftGraph - module DeviceManagement - module VerifyWindowsEnrollmentAutoDiscoveryWithDomainName - class VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameResponse - include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable - ## - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - @additional_data - ## - # The value property - @value - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @return a i_dictionary - ## - def additional_data - return @additional_data - end - ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. - ## @return a void - ## - def additional_data=(value) - @additional_data = value - end - ## - ## Instantiates a new verifyWindowsEnrollmentAutoDiscoveryWithDomainNameResponse and sets the default values. - ## @return a void - ## - def initialize() - @additional_data = Hash.new - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a verify_windows_enrollment_auto_discovery_with_domain_name_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return { - "value" => lambda {|n| @value = n.get_boolean_value() }, - } - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_boolean_value("value", @value) - writer.write_additional_data(@additional_data) - end - ## - ## Gets the value property value. The value property - ## @return a boolean - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end -end diff --git a/lib/me/calendars/item/calendar_view/item/instances/item/attachments/attachments.rb b/lib/device_management/virtual_endpoint/audit_events/audit_events.rb similarity index 100% rename from lib/me/calendars/item/calendar_view/item/instances/item/attachments/attachments.rb rename to lib/device_management/virtual_endpoint/audit_events/audit_events.rb diff --git a/lib/device_management/virtual_endpoint/audit_events/audit_events_request_builder.rb b/lib/device_management/virtual_endpoint/audit_events/audit_events_request_builder.rb new file mode 100644 index 0000000000..2208dcea3a --- /dev/null +++ b/lib/device_management/virtual_endpoint/audit_events/audit_events_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/cloud_pc_audit_event' +require_relative '../../../models/cloud_pc_audit_event_collection_response' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../device_management' +require_relative '../virtual_endpoint' +require_relative './audit_events' +require_relative './count/count_request_builder' +require_relative './get_audit_activity_types/get_audit_activity_types_request_builder' +require_relative './item/cloud_pc_audit_event_item_request_builder' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module AuditEvents + ## + # Provides operations to manage the auditEvents property of the microsoft.graph.virtualEndpoint entity. + class AuditEventsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::AuditEvents::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to call the getAuditActivityTypes method. + def get_audit_activity_types() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::AuditEvents::GetAuditActivityTypes::GetAuditActivityTypesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the auditEvents property of the microsoft.graph.virtualEndpoint entity. + ## @param cloud_pc_audit_event_id The unique identifier of cloudPcAuditEvent + ## @return a cloud_pc_audit_event_item_request_builder + ## + def by_cloud_pc_audit_event_id(cloud_pc_audit_event_id) + raise StandardError, 'cloud_pc_audit_event_id cannot be null' if cloud_pc_audit_event_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["cloudPcAuditEvent%2Did"] = cloud_pc_audit_event_id + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::AuditEvents::Item::CloudPcAuditEventItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new AuditEventsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/auditEvents{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## List all the cloudPcAuditEvent objects for the tenant. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_audit_event_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcAuditEventCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to auditEvents for deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_audit_event + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcAuditEvent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## List all the cloudPcAuditEvent objects for the tenant. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to auditEvents for deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a audit_events_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AuditEventsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # List all the cloudPcAuditEvent objects for the tenant. + class AuditEventsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/tabs/count/count.rb b/lib/device_management/virtual_endpoint/audit_events/count/count.rb similarity index 100% rename from lib/me/chats/item/tabs/count/count.rb rename to lib/device_management/virtual_endpoint/audit_events/count/count.rb diff --git a/lib/device_management/virtual_endpoint/audit_events/count/count_request_builder.rb b/lib/device_management/virtual_endpoint/audit_events/count/count_request_builder.rb new file mode 100644 index 0000000000..d5779dcafc --- /dev/null +++ b/lib/device_management/virtual_endpoint/audit_events/count/count_request_builder.rb @@ -0,0 +1,100 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_management' +require_relative '../../virtual_endpoint' +require_relative '../audit_events' +require_relative './count' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module AuditEvents + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/auditEvents/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/device_management/virtual_endpoint/audit_events/get_audit_activity_types/get_audit_activity_types.rb b/lib/device_management/virtual_endpoint/audit_events/get_audit_activity_types/get_audit_activity_types.rb new file mode 100644 index 0000000000..99b1f05a04 --- /dev/null +++ b/lib/device_management/virtual_endpoint/audit_events/get_audit_activity_types/get_audit_activity_types.rb @@ -0,0 +1 @@ +require_relative 'get_audit_activity_types_get_response' diff --git a/lib/device_management/virtual_endpoint/audit_events/get_audit_activity_types/get_audit_activity_types_get_response.rb b/lib/device_management/virtual_endpoint/audit_events/get_audit_activity_types/get_audit_activity_types_get_response.rb new file mode 100644 index 0000000000..c159a0aca7 --- /dev/null +++ b/lib/device_management/virtual_endpoint/audit_events/get_audit_activity_types/get_audit_activity_types_get_response.rb @@ -0,0 +1,74 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/base_collection_pagination_count_response' +require_relative '../../../device_management' +require_relative '../../virtual_endpoint' +require_relative '../audit_events' +require_relative './get_audit_activity_types' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module AuditEvents + module GetAuditActivityTypes + class GetAuditActivityTypesGetResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetAuditActivityTypesGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_audit_activity_types_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetAuditActivityTypesGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end +end diff --git a/lib/device_management/virtual_endpoint/audit_events/get_audit_activity_types/get_audit_activity_types_request_builder.rb b/lib/device_management/virtual_endpoint/audit_events/get_audit_activity_types/get_audit_activity_types_request_builder.rb new file mode 100644 index 0000000000..e3214870dc --- /dev/null +++ b/lib/device_management/virtual_endpoint/audit_events/get_audit_activity_types/get_audit_activity_types_request_builder.rb @@ -0,0 +1,115 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_management' +require_relative '../../virtual_endpoint' +require_relative '../audit_events' +require_relative './get_audit_activity_types' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module AuditEvents + module GetAuditActivityTypes + ## + # Provides operations to call the getAuditActivityTypes method. + class GetAuditActivityTypesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new GetAuditActivityTypesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/auditEvents/getAuditActivityTypes(){?%24count,%24filter,%24search,%24skip,%24top}") + end + ## + ## Get audit activity types by tenant ID. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of get_audit_activity_types_get_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceManagement::VirtualEndpoint::AuditEvents::GetAuditActivityTypes::GetAuditActivityTypesGetResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get audit activity types by tenant ID. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_audit_activity_types_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetAuditActivityTypesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get audit activity types by tenant ID. + class GetAuditActivityTypesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "filter" + return "%24filter" + when "search" + return "%24search" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/device_management/virtual_endpoint/audit_events/item/cloud_pc_audit_event_item_request_builder.rb b/lib/device_management/virtual_endpoint/audit_events/item/cloud_pc_audit_event_item_request_builder.rb new file mode 100644 index 0000000000..d00369a2c1 --- /dev/null +++ b/lib/device_management/virtual_endpoint/audit_events/item/cloud_pc_audit_event_item_request_builder.rb @@ -0,0 +1,166 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/cloud_pc_audit_event' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_management' +require_relative '../../virtual_endpoint' +require_relative '../audit_events' +require_relative './item' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module AuditEvents + module Item + ## + # Provides operations to manage the auditEvents property of the microsoft.graph.virtualEndpoint entity. + class CloudPcAuditEventItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CloudPcAuditEventItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/auditEvents/{cloudPcAuditEvent%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property auditEvents for deviceManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Read the properties and relationships of a cloudPcAuditEvent object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_audit_event + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcAuditEvent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property auditEvents in deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_audit_event + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcAuditEvent.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property auditEvents for deviceManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Read the properties and relationships of a cloudPcAuditEvent object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property auditEvents in deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a cloud_pc_audit_event_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CloudPcAuditEventItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Read the properties and relationships of a cloudPcAuditEvent object. + class CloudPcAuditEventItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/item.rb b/lib/device_management/virtual_endpoint/audit_events/item/item.rb similarity index 100% rename from lib/me/calendars/item/item.rb rename to lib/device_management/virtual_endpoint/audit_events/item/item.rb diff --git a/lib/me/calendars/item/calendar_view/item/instances/item/calendar/calendar.rb b/lib/device_management/virtual_endpoint/cloud_p_cs/cloud_p_cs.rb similarity index 100% rename from lib/me/calendars/item/calendar_view/item/instances/item/calendar/calendar.rb rename to lib/device_management/virtual_endpoint/cloud_p_cs/cloud_p_cs.rb diff --git a/lib/device_management/virtual_endpoint/cloud_p_cs/cloud_p_cs_request_builder.rb b/lib/device_management/virtual_endpoint/cloud_p_cs/cloud_p_cs_request_builder.rb new file mode 100644 index 0000000000..357e9b2238 --- /dev/null +++ b/lib/device_management/virtual_endpoint/cloud_p_cs/cloud_p_cs_request_builder.rb @@ -0,0 +1,182 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/cloud_p_c' +require_relative '../../../models/cloud_p_c_collection_response' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../device_management' +require_relative '../virtual_endpoint' +require_relative './cloud_p_cs' +require_relative './count/count_request_builder' +require_relative './item/cloud_p_c_item_request_builder' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module CloudPCs + ## + # Provides operations to manage the cloudPCs property of the microsoft.graph.virtualEndpoint entity. + class CloudPCsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::CloudPCs::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the cloudPCs property of the microsoft.graph.virtualEndpoint entity. + ## @param cloud_p_c_id The unique identifier of cloudPC + ## @return a cloud_p_c_item_request_builder + ## + def by_cloud_p_c_id(cloud_p_c_id) + raise StandardError, 'cloud_p_c_id cannot be null' if cloud_p_c_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["cloudPC%2Did"] = cloud_p_c_id + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::CloudPCs::Item::CloudPCItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new CloudPCsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/cloudPCs{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## List the cloudPC devices in a tenant. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_p_c_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPCCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to cloudPCs for deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_p_c + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPC.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## List the cloudPC devices in a tenant. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to cloudPCs for deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a cloud_p_cs_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CloudPCsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # List the cloudPC devices in a tenant. + class CloudPCsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/me/contact_folders/count/count.rb b/lib/device_management/virtual_endpoint/cloud_p_cs/count/count.rb similarity index 100% rename from lib/me/contact_folders/count/count.rb rename to lib/device_management/virtual_endpoint/cloud_p_cs/count/count.rb diff --git a/lib/device_management/virtual_endpoint/cloud_p_cs/count/count_request_builder.rb b/lib/device_management/virtual_endpoint/cloud_p_cs/count/count_request_builder.rb new file mode 100644 index 0000000000..2437d4d150 --- /dev/null +++ b/lib/device_management/virtual_endpoint/cloud_p_cs/count/count_request_builder.rb @@ -0,0 +1,100 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_management' +require_relative '../../virtual_endpoint' +require_relative '../cloud_p_cs' +require_relative './count' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module CloudPCs + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/cloudPCs/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/device_management/virtual_endpoint/cloud_p_cs/item/cloud_p_c_item_request_builder.rb b/lib/device_management/virtual_endpoint/cloud_p_cs/item/cloud_p_c_item_request_builder.rb new file mode 100644 index 0000000000..e7d0291599 --- /dev/null +++ b/lib/device_management/virtual_endpoint/cloud_p_cs/item/cloud_p_c_item_request_builder.rb @@ -0,0 +1,196 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/cloud_p_c' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_management' +require_relative '../../virtual_endpoint' +require_relative '../cloud_p_cs' +require_relative './end_grace_period/end_grace_period_request_builder' +require_relative './item' +require_relative './reboot/reboot_request_builder' +require_relative './rename/rename_request_builder' +require_relative './restore/restore_request_builder' +require_relative './troubleshoot/troubleshoot_request_builder' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module CloudPCs + module Item + ## + # Provides operations to manage the cloudPCs property of the microsoft.graph.virtualEndpoint entity. + class CloudPCItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to call the endGracePeriod method. + def end_grace_period() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::CloudPCs::Item::EndGracePeriod::EndGracePeriodRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to call the reboot method. + def reboot() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::CloudPCs::Item::Reboot::RebootRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to call the rename method. + def rename() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::CloudPCs::Item::Rename::RenameRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to call the restore method. + def restore() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::CloudPCs::Item::Restore::RestoreRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to call the troubleshoot method. + def troubleshoot() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::CloudPCs::Item::Troubleshoot::TroubleshootRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new CloudPCItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/cloudPCs/{cloudPC%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property cloudPCs for deviceManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Read the properties and relationships of a specific cloudPC object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_p_c + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPC.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property cloudPCs in deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_p_c + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPC.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property cloudPCs for deviceManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Read the properties and relationships of a specific cloudPC object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property cloudPCs in deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a cloud_p_c_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CloudPCItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Read the properties and relationships of a specific cloudPC object. + class CloudPCItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder.rb b/lib/device_management/virtual_endpoint/cloud_p_cs/item/end_grace_period/end_grace_period.rb similarity index 100% rename from lib/me/calendars/item/calendar_view/item/instances/item/dismiss_reminder/dismiss_reminder.rb rename to lib/device_management/virtual_endpoint/cloud_p_cs/item/end_grace_period/end_grace_period.rb diff --git a/lib/device_management/virtual_endpoint/cloud_p_cs/item/end_grace_period/end_grace_period_request_builder.rb b/lib/device_management/virtual_endpoint/cloud_p_cs/item/end_grace_period/end_grace_period_request_builder.rb new file mode 100644 index 0000000000..832a68db22 --- /dev/null +++ b/lib/device_management/virtual_endpoint/cloud_p_cs/item/end_grace_period/end_grace_period_request_builder.rb @@ -0,0 +1,74 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_management' +require_relative '../../../virtual_endpoint' +require_relative '../../cloud_p_cs' +require_relative '../item' +require_relative './end_grace_period' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module CloudPCs + module Item + module EndGracePeriod + ## + # Provides operations to call the endGracePeriod method. + class EndGracePeriodRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new EndGracePeriodRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/cloudPCs/{cloudPC%2Did}/endGracePeriod") + end + ## + ## End the grace period for a specific cloudPC object. The grace period is triggered when the Cloud PC license is removed or the provisioning policy is unassigned. It allows users to access Cloud PCs for up to seven days before deprovisioning occurs. Ending the grace period immediately deprovisions the Cloud PC without waiting the seven days. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(request_configuration=nil) + request_info = self.to_post_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## End the grace period for a specific cloudPC object. The grace period is triggered when the Cloud PC license is removed or the provisioning policy is unassigned. It allows users to access Cloud PCs for up to seven days before deprovisioning occurs. Ending the grace period immediately deprovisions the Cloud PC without waiting the seven days. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a end_grace_period_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return EndGracePeriodRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/installed_apps/item/item.rb b/lib/device_management/virtual_endpoint/cloud_p_cs/item/item.rb similarity index 100% rename from lib/me/chats/item/installed_apps/item/item.rb rename to lib/device_management/virtual_endpoint/cloud_p_cs/item/item.rb diff --git a/lib/me/calendars/item/calendar_view/item/instances/item/extensions/extensions.rb b/lib/device_management/virtual_endpoint/cloud_p_cs/item/reboot/reboot.rb similarity index 100% rename from lib/me/calendars/item/calendar_view/item/instances/item/extensions/extensions.rb rename to lib/device_management/virtual_endpoint/cloud_p_cs/item/reboot/reboot.rb diff --git a/lib/device_management/virtual_endpoint/cloud_p_cs/item/reboot/reboot_request_builder.rb b/lib/device_management/virtual_endpoint/cloud_p_cs/item/reboot/reboot_request_builder.rb new file mode 100644 index 0000000000..3c691af154 --- /dev/null +++ b/lib/device_management/virtual_endpoint/cloud_p_cs/item/reboot/reboot_request_builder.rb @@ -0,0 +1,74 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_management' +require_relative '../../../virtual_endpoint' +require_relative '../../cloud_p_cs' +require_relative '../item' +require_relative './reboot' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module CloudPCs + module Item + module Reboot + ## + # Provides operations to call the reboot method. + class RebootRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new RebootRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/cloudPCs/{cloudPC%2Did}/reboot") + end + ## + ## Reboot a specific cloudPC object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(request_configuration=nil) + request_info = self.to_post_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Reboot a specific cloudPC object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a reboot_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RebootRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end +end diff --git a/lib/device_management/virtual_endpoint/cloud_p_cs/item/rename/rename.rb b/lib/device_management/virtual_endpoint/cloud_p_cs/item/rename/rename.rb new file mode 100644 index 0000000000..7efbc40e6d --- /dev/null +++ b/lib/device_management/virtual_endpoint/cloud_p_cs/item/rename/rename.rb @@ -0,0 +1 @@ +require_relative 'rename_post_request_body' diff --git a/lib/device_management/virtual_endpoint/cloud_p_cs/item/rename/rename_post_request_body.rb b/lib/device_management/virtual_endpoint/cloud_p_cs/item/rename/rename_post_request_body.rb new file mode 100644 index 0000000000..ea45d5bdc3 --- /dev/null +++ b/lib/device_management/virtual_endpoint/cloud_p_cs/item/rename/rename_post_request_body.rb @@ -0,0 +1,94 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../device_management' +require_relative '../../../virtual_endpoint' +require_relative '../../cloud_p_cs' +require_relative '../item' +require_relative './rename' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module CloudPCs + module Item + module Rename + class RenamePostRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The displayName property + @display_name + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new RenamePostRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a rename_post_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return RenamePostRequestBody.new + end + ## + ## Gets the displayName property value. The displayName property + ## @return a string + ## + def display_name + return @display_name + end + ## + ## Sets the displayName property value. The displayName property + ## @param value Value to set for the displayName property. + ## @return a void + ## + def display_name=(value) + @display_name = value + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "displayName" => lambda {|n| @display_name = n.get_string_value() }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_string_value("displayName", @display_name) + writer.write_additional_data(@additional_data) + end + end + end + end + end + end + end +end diff --git a/lib/device_management/virtual_endpoint/cloud_p_cs/item/rename/rename_request_builder.rb b/lib/device_management/virtual_endpoint/cloud_p_cs/item/rename/rename_request_builder.rb new file mode 100644 index 0000000000..35eea3744a --- /dev/null +++ b/lib/device_management/virtual_endpoint/cloud_p_cs/item/rename/rename_request_builder.rb @@ -0,0 +1,79 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_management' +require_relative '../../../virtual_endpoint' +require_relative '../../cloud_p_cs' +require_relative '../item' +require_relative './rename' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module CloudPCs + module Item + module Rename + ## + # Provides operations to call the rename method. + class RenameRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new RenameRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/cloudPCs/{cloudPC%2Did}/rename") + end + ## + ## Rename a specific cloudPC object. Use this API to update the displayName of a Cloud PC entity. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Rename a specific cloudPC object. Use this API to update the displayName of a Cloud PC entity. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a rename_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RenameRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end +end diff --git a/lib/device_management/virtual_endpoint/cloud_p_cs/item/restore/restore.rb b/lib/device_management/virtual_endpoint/cloud_p_cs/item/restore/restore.rb new file mode 100644 index 0000000000..94107de110 --- /dev/null +++ b/lib/device_management/virtual_endpoint/cloud_p_cs/item/restore/restore.rb @@ -0,0 +1 @@ +require_relative 'restore_post_request_body' diff --git a/lib/device_management/virtual_endpoint/cloud_p_cs/item/restore/restore_post_request_body.rb b/lib/device_management/virtual_endpoint/cloud_p_cs/item/restore/restore_post_request_body.rb new file mode 100644 index 0000000000..f870a24ae3 --- /dev/null +++ b/lib/device_management/virtual_endpoint/cloud_p_cs/item/restore/restore_post_request_body.rb @@ -0,0 +1,94 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../device_management' +require_relative '../../../virtual_endpoint' +require_relative '../../cloud_p_cs' +require_relative '../item' +require_relative './restore' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module CloudPCs + module Item + module Restore + class RestorePostRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The cloudPcSnapshotId property + @cloud_pc_snapshot_id + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Gets the cloudPcSnapshotId property value. The cloudPcSnapshotId property + ## @return a string + ## + def cloud_pc_snapshot_id + return @cloud_pc_snapshot_id + end + ## + ## Sets the cloudPcSnapshotId property value. The cloudPcSnapshotId property + ## @param value Value to set for the cloudPcSnapshotId property. + ## @return a void + ## + def cloud_pc_snapshot_id=(value) + @cloud_pc_snapshot_id = value + end + ## + ## Instantiates a new RestorePostRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a restore_post_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return RestorePostRequestBody.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "cloudPcSnapshotId" => lambda {|n| @cloud_pc_snapshot_id = n.get_string_value() }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_string_value("cloudPcSnapshotId", @cloud_pc_snapshot_id) + writer.write_additional_data(@additional_data) + end + end + end + end + end + end + end +end diff --git a/lib/device_management/virtual_endpoint/cloud_p_cs/item/restore/restore_request_builder.rb b/lib/device_management/virtual_endpoint/cloud_p_cs/item/restore/restore_request_builder.rb new file mode 100644 index 0000000000..b4e0bd49c0 --- /dev/null +++ b/lib/device_management/virtual_endpoint/cloud_p_cs/item/restore/restore_request_builder.rb @@ -0,0 +1,79 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_management' +require_relative '../../../virtual_endpoint' +require_relative '../../cloud_p_cs' +require_relative '../item' +require_relative './restore' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module CloudPCs + module Item + module Restore + ## + # Provides operations to call the restore method. + class RestoreRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new RestoreRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/cloudPCs/{cloudPC%2Did}/restore") + end + ## + ## Restore a specific cloudPC object to a previous state from a snapshot. Use this API to trigger a remote action that restores a Cloud PC device to a previous state. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Restore a specific cloudPC object to a previous state from a snapshot. Use this API to trigger a remote action that restores a Cloud PC device to a previous state. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a restore_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RestoreRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/events/events.rb b/lib/device_management/virtual_endpoint/cloud_p_cs/item/troubleshoot/troubleshoot.rb similarity index 100% rename from lib/me/calendars/item/events/events.rb rename to lib/device_management/virtual_endpoint/cloud_p_cs/item/troubleshoot/troubleshoot.rb diff --git a/lib/device_management/virtual_endpoint/cloud_p_cs/item/troubleshoot/troubleshoot_request_builder.rb b/lib/device_management/virtual_endpoint/cloud_p_cs/item/troubleshoot/troubleshoot_request_builder.rb new file mode 100644 index 0000000000..db2cb6796f --- /dev/null +++ b/lib/device_management/virtual_endpoint/cloud_p_cs/item/troubleshoot/troubleshoot_request_builder.rb @@ -0,0 +1,74 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_management' +require_relative '../../../virtual_endpoint' +require_relative '../../cloud_p_cs' +require_relative '../item' +require_relative './troubleshoot' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module CloudPCs + module Item + module Troubleshoot + ## + # Provides operations to call the troubleshoot method. + class TroubleshootRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new TroubleshootRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/cloudPCs/{cloudPC%2Did}/troubleshoot") + end + ## + ## Troubleshoot a specific cloudPC object. Use this API to check the health status of the Cloud PC and the session host. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(request_configuration=nil) + request_info = self.to_post_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Troubleshoot a specific cloudPC object. Use this API to check the health status of the Cloud PC and the session host. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a troubleshoot_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TroubleshootRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end +end diff --git a/lib/me/contact_folders/item/child_folders/count/count.rb b/lib/device_management/virtual_endpoint/device_images/count/count.rb similarity index 100% rename from lib/me/contact_folders/item/child_folders/count/count.rb rename to lib/device_management/virtual_endpoint/device_images/count/count.rb diff --git a/lib/device_management/virtual_endpoint/device_images/count/count_request_builder.rb b/lib/device_management/virtual_endpoint/device_images/count/count_request_builder.rb new file mode 100644 index 0000000000..a9a906f461 --- /dev/null +++ b/lib/device_management/virtual_endpoint/device_images/count/count_request_builder.rb @@ -0,0 +1,100 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_management' +require_relative '../../virtual_endpoint' +require_relative '../device_images' +require_relative './count' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module DeviceImages + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/deviceImages/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/events/item/attachments/attachments.rb b/lib/device_management/virtual_endpoint/device_images/device_images.rb similarity index 100% rename from lib/me/calendars/item/events/item/attachments/attachments.rb rename to lib/device_management/virtual_endpoint/device_images/device_images.rb diff --git a/lib/device_management/virtual_endpoint/device_images/device_images_request_builder.rb b/lib/device_management/virtual_endpoint/device_images/device_images_request_builder.rb new file mode 100644 index 0000000000..07579e4820 --- /dev/null +++ b/lib/device_management/virtual_endpoint/device_images/device_images_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/cloud_pc_device_image' +require_relative '../../../models/cloud_pc_device_image_collection_response' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../device_management' +require_relative '../virtual_endpoint' +require_relative './count/count_request_builder' +require_relative './device_images' +require_relative './get_source_images/get_source_images_request_builder' +require_relative './item/cloud_pc_device_image_item_request_builder' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module DeviceImages + ## + # Provides operations to manage the deviceImages property of the microsoft.graph.virtualEndpoint entity. + class DeviceImagesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::DeviceImages::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to call the getSourceImages method. + def get_source_images() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::DeviceImages::GetSourceImages::GetSourceImagesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the deviceImages property of the microsoft.graph.virtualEndpoint entity. + ## @param cloud_pc_device_image_id The unique identifier of cloudPcDeviceImage + ## @return a cloud_pc_device_image_item_request_builder + ## + def by_cloud_pc_device_image_id(cloud_pc_device_image_id) + raise StandardError, 'cloud_pc_device_image_id cannot be null' if cloud_pc_device_image_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["cloudPcDeviceImage%2Did"] = cloud_pc_device_image_id + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::DeviceImages::Item::CloudPcDeviceImageItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new DeviceImagesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/deviceImages{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## List the properties and relationships of cloudPcDeviceImage objects (operating system images) uploaded to Cloud PC. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_device_image_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcDeviceImageCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create a new cloudPcDeviceImage object. Upload a custom OS image that you can later provision on Cloud PCs. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_device_image + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcDeviceImage.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## List the properties and relationships of cloudPcDeviceImage objects (operating system images) uploaded to Cloud PC. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create a new cloudPcDeviceImage object. Upload a custom OS image that you can later provision on Cloud PCs. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_images_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceImagesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # List the properties and relationships of cloudPcDeviceImage objects (operating system images) uploaded to Cloud PC. + class DeviceImagesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/device_management/virtual_endpoint/device_images/get_source_images/get_source_images.rb b/lib/device_management/virtual_endpoint/device_images/get_source_images/get_source_images.rb new file mode 100644 index 0000000000..d72bf0fc6f --- /dev/null +++ b/lib/device_management/virtual_endpoint/device_images/get_source_images/get_source_images.rb @@ -0,0 +1 @@ +require_relative 'get_source_images_get_response' diff --git a/lib/device_management/virtual_endpoint/device_images/get_source_images/get_source_images_get_response.rb b/lib/device_management/virtual_endpoint/device_images/get_source_images/get_source_images_get_response.rb new file mode 100644 index 0000000000..9892c64df3 --- /dev/null +++ b/lib/device_management/virtual_endpoint/device_images/get_source_images/get_source_images_get_response.rb @@ -0,0 +1,75 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/base_collection_pagination_count_response' +require_relative '../../../../models/cloud_pc_source_device_image' +require_relative '../../../device_management' +require_relative '../../virtual_endpoint' +require_relative '../device_images' +require_relative './get_source_images' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module DeviceImages + module GetSourceImages + class GetSourceImagesGetResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetSourceImagesGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_source_images_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetSourceImagesGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::CloudPcSourceDeviceImage.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a cloud_pc_source_device_image + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end +end diff --git a/lib/device_management/virtual_endpoint/device_images/get_source_images/get_source_images_request_builder.rb b/lib/device_management/virtual_endpoint/device_images/get_source_images/get_source_images_request_builder.rb new file mode 100644 index 0000000000..5a2dcde789 --- /dev/null +++ b/lib/device_management/virtual_endpoint/device_images/get_source_images/get_source_images_request_builder.rb @@ -0,0 +1,115 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_management' +require_relative '../../virtual_endpoint' +require_relative '../device_images' +require_relative './get_source_images' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module DeviceImages + module GetSourceImages + ## + # Provides operations to call the getSourceImages method. + class GetSourceImagesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new GetSourceImagesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/deviceImages/getSourceImages(){?%24count,%24filter,%24search,%24skip,%24top}") + end + ## + ## Get cloudPcSourceDeviceImage objects that can be uploaded and used on Cloud PCs. View a list of all the managed image resources from your Microsoft Entra subscriptions. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of get_source_images_get_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DeviceManagement::VirtualEndpoint::DeviceImages::GetSourceImages::GetSourceImagesGetResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get cloudPcSourceDeviceImage objects that can be uploaded and used on Cloud PCs. View a list of all the managed image resources from your Microsoft Entra subscriptions. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_source_images_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetSourceImagesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get cloudPcSourceDeviceImage objects that can be uploaded and used on Cloud PCs. View a list of all the managed image resources from your Microsoft Entra subscriptions. + class GetSourceImagesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "filter" + return "%24filter" + when "search" + return "%24search" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/device_management/virtual_endpoint/device_images/item/cloud_pc_device_image_item_request_builder.rb b/lib/device_management/virtual_endpoint/device_images/item/cloud_pc_device_image_item_request_builder.rb new file mode 100644 index 0000000000..5cbd17363a --- /dev/null +++ b/lib/device_management/virtual_endpoint/device_images/item/cloud_pc_device_image_item_request_builder.rb @@ -0,0 +1,166 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/cloud_pc_device_image' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_management' +require_relative '../../virtual_endpoint' +require_relative '../device_images' +require_relative './item' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module DeviceImages + module Item + ## + # Provides operations to manage the deviceImages property of the microsoft.graph.virtualEndpoint entity. + class CloudPcDeviceImageItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CloudPcDeviceImageItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/deviceImages/{cloudPcDeviceImage%2Did}{?%24expand,%24select}") + end + ## + ## Delete a cloudPcDeviceImage object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Read the properties and relationships of a specific cloudPcDeviceImage object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_device_image + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcDeviceImage.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property deviceImages in deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_device_image + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcDeviceImage.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete a cloudPcDeviceImage object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Read the properties and relationships of a specific cloudPcDeviceImage object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property deviceImages in deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a cloud_pc_device_image_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CloudPcDeviceImageItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Read the properties and relationships of a specific cloudPcDeviceImage object. + class CloudPcDeviceImageItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/item.rb b/lib/device_management/virtual_endpoint/device_images/item/item.rb similarity index 100% rename from lib/me/chats/item/item.rb rename to lib/device_management/virtual_endpoint/device_images/item/item.rb diff --git a/lib/me/contact_folders/item/child_folders/item/contacts/count/count.rb b/lib/device_management/virtual_endpoint/gallery_images/count/count.rb similarity index 100% rename from lib/me/contact_folders/item/child_folders/item/contacts/count/count.rb rename to lib/device_management/virtual_endpoint/gallery_images/count/count.rb diff --git a/lib/device_management/virtual_endpoint/gallery_images/count/count_request_builder.rb b/lib/device_management/virtual_endpoint/gallery_images/count/count_request_builder.rb new file mode 100644 index 0000000000..a2935a0c05 --- /dev/null +++ b/lib/device_management/virtual_endpoint/gallery_images/count/count_request_builder.rb @@ -0,0 +1,100 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_management' +require_relative '../../virtual_endpoint' +require_relative '../gallery_images' +require_relative './count' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module GalleryImages + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/galleryImages/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/events/item/calendar/calendar.rb b/lib/device_management/virtual_endpoint/gallery_images/gallery_images.rb similarity index 100% rename from lib/me/calendars/item/events/item/calendar/calendar.rb rename to lib/device_management/virtual_endpoint/gallery_images/gallery_images.rb diff --git a/lib/device_management/virtual_endpoint/gallery_images/gallery_images_request_builder.rb b/lib/device_management/virtual_endpoint/gallery_images/gallery_images_request_builder.rb new file mode 100644 index 0000000000..cf540db8ee --- /dev/null +++ b/lib/device_management/virtual_endpoint/gallery_images/gallery_images_request_builder.rb @@ -0,0 +1,182 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/cloud_pc_gallery_image' +require_relative '../../../models/cloud_pc_gallery_image_collection_response' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../device_management' +require_relative '../virtual_endpoint' +require_relative './count/count_request_builder' +require_relative './gallery_images' +require_relative './item/cloud_pc_gallery_image_item_request_builder' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module GalleryImages + ## + # Provides operations to manage the galleryImages property of the microsoft.graph.virtualEndpoint entity. + class GalleryImagesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::GalleryImages::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the galleryImages property of the microsoft.graph.virtualEndpoint entity. + ## @param cloud_pc_gallery_image_id The unique identifier of cloudPcGalleryImage + ## @return a cloud_pc_gallery_image_item_request_builder + ## + def by_cloud_pc_gallery_image_id(cloud_pc_gallery_image_id) + raise StandardError, 'cloud_pc_gallery_image_id cannot be null' if cloud_pc_gallery_image_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["cloudPcGalleryImage%2Did"] = cloud_pc_gallery_image_id + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::GalleryImages::Item::CloudPcGalleryImageItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new GalleryImagesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/galleryImages{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## List the properties and relationships of cloudPcGalleryImage objects. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_gallery_image_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcGalleryImageCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to galleryImages for deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_gallery_image + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcGalleryImage.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## List the properties and relationships of cloudPcGalleryImage objects. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to galleryImages for deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a gallery_images_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GalleryImagesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # List the properties and relationships of cloudPcGalleryImage objects. + class GalleryImagesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/device_management/virtual_endpoint/gallery_images/item/cloud_pc_gallery_image_item_request_builder.rb b/lib/device_management/virtual_endpoint/gallery_images/item/cloud_pc_gallery_image_item_request_builder.rb new file mode 100644 index 0000000000..2f46ae2ce5 --- /dev/null +++ b/lib/device_management/virtual_endpoint/gallery_images/item/cloud_pc_gallery_image_item_request_builder.rb @@ -0,0 +1,166 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/cloud_pc_gallery_image' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_management' +require_relative '../../virtual_endpoint' +require_relative '../gallery_images' +require_relative './item' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module GalleryImages + module Item + ## + # Provides operations to manage the galleryImages property of the microsoft.graph.virtualEndpoint entity. + class CloudPcGalleryImageItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CloudPcGalleryImageItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/galleryImages/{cloudPcGalleryImage%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property galleryImages for deviceManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Read the properties and relationships of a specific cloudPcGalleryImage object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_gallery_image + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcGalleryImage.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property galleryImages in deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_gallery_image + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcGalleryImage.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property galleryImages for deviceManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Read the properties and relationships of a specific cloudPcGalleryImage object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property galleryImages in deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a cloud_pc_gallery_image_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CloudPcGalleryImageItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Read the properties and relationships of a specific cloudPcGalleryImage object. + class CloudPcGalleryImageItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/members/item/item.rb b/lib/device_management/virtual_endpoint/gallery_images/item/item.rb similarity index 100% rename from lib/me/chats/item/members/item/item.rb rename to lib/device_management/virtual_endpoint/gallery_images/item/item.rb diff --git a/lib/me/contact_folders/item/child_folders/item/contacts/item/extensions/count/count.rb b/lib/device_management/virtual_endpoint/on_premises_connections/count/count.rb similarity index 100% rename from lib/me/contact_folders/item/child_folders/item/contacts/item/extensions/count/count.rb rename to lib/device_management/virtual_endpoint/on_premises_connections/count/count.rb diff --git a/lib/device_management/virtual_endpoint/on_premises_connections/count/count_request_builder.rb b/lib/device_management/virtual_endpoint/on_premises_connections/count/count_request_builder.rb new file mode 100644 index 0000000000..b116646a31 --- /dev/null +++ b/lib/device_management/virtual_endpoint/on_premises_connections/count/count_request_builder.rb @@ -0,0 +1,100 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_management' +require_relative '../../virtual_endpoint' +require_relative '../on_premises_connections' +require_relative './count' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module OnPremisesConnections + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/onPremisesConnections/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/device_management/virtual_endpoint/on_premises_connections/item/cloud_pc_on_premises_connection_item_request_builder.rb b/lib/device_management/virtual_endpoint/on_premises_connections/item/cloud_pc_on_premises_connection_item_request_builder.rb new file mode 100644 index 0000000000..effde2c158 --- /dev/null +++ b/lib/device_management/virtual_endpoint/on_premises_connections/item/cloud_pc_on_premises_connection_item_request_builder.rb @@ -0,0 +1,172 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/cloud_pc_on_premises_connection' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_management' +require_relative '../../virtual_endpoint' +require_relative '../on_premises_connections' +require_relative './item' +require_relative './run_health_checks/run_health_checks_request_builder' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module OnPremisesConnections + module Item + ## + # Provides operations to manage the onPremisesConnections property of the microsoft.graph.virtualEndpoint entity. + class CloudPcOnPremisesConnectionItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to call the runHealthChecks method. + def run_health_checks() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::OnPremisesConnections::Item::RunHealthChecks::RunHealthChecksRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new CloudPcOnPremisesConnectionItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/onPremisesConnections/{cloudPcOnPremisesConnection%2Did}{?%24expand,%24select}") + end + ## + ## Delete a specific cloudPcOnPremisesConnection object. When you delete an Azure network connection, permissions to the service are removed from the specified Azure resources. You cannot delete an Azure network connection when it's in use, as indicated by the inUse property. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Read the properties and relationships of the cloudPcOnPremisesConnection object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_on_premises_connection + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcOnPremisesConnection.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the properties of a cloudPcOnPremisesConnection object. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_on_premises_connection + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcOnPremisesConnection.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete a specific cloudPcOnPremisesConnection object. When you delete an Azure network connection, permissions to the service are removed from the specified Azure resources. You cannot delete an Azure network connection when it's in use, as indicated by the inUse property. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Read the properties and relationships of the cloudPcOnPremisesConnection object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the properties of a cloudPcOnPremisesConnection object. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a cloud_pc_on_premises_connection_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CloudPcOnPremisesConnectionItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Read the properties and relationships of the cloudPcOnPremisesConnection object. + class CloudPcOnPremisesConnectionItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/messages/item/hosted_contents/item/item.rb b/lib/device_management/virtual_endpoint/on_premises_connections/item/item.rb similarity index 100% rename from lib/me/chats/item/messages/item/hosted_contents/item/item.rb rename to lib/device_management/virtual_endpoint/on_premises_connections/item/item.rb diff --git a/lib/me/calendars/item/events/item/dismiss_reminder/dismiss_reminder.rb b/lib/device_management/virtual_endpoint/on_premises_connections/item/run_health_checks/run_health_checks.rb similarity index 100% rename from lib/me/calendars/item/events/item/dismiss_reminder/dismiss_reminder.rb rename to lib/device_management/virtual_endpoint/on_premises_connections/item/run_health_checks/run_health_checks.rb diff --git a/lib/device_management/virtual_endpoint/on_premises_connections/item/run_health_checks/run_health_checks_request_builder.rb b/lib/device_management/virtual_endpoint/on_premises_connections/item/run_health_checks/run_health_checks_request_builder.rb new file mode 100644 index 0000000000..21b9e24aa0 --- /dev/null +++ b/lib/device_management/virtual_endpoint/on_premises_connections/item/run_health_checks/run_health_checks_request_builder.rb @@ -0,0 +1,74 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_management' +require_relative '../../../virtual_endpoint' +require_relative '../../on_premises_connections' +require_relative '../item' +require_relative './run_health_checks' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module OnPremisesConnections + module Item + module RunHealthChecks + ## + # Provides operations to call the runHealthChecks method. + class RunHealthChecksRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new RunHealthChecksRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/onPremisesConnections/{cloudPcOnPremisesConnection%2Did}/runHealthChecks") + end + ## + ## Run health checks on the cloudPcOnPremisesConnection object. It triggers a new health check for the cloudPcOnPremisesConnection (../resources/cloudpconpremisesconnection.md) object and changes the healthCheckStatus and [healthCheckStatusDetail properties when check finished. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(request_configuration=nil) + request_info = self.to_post_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Run health checks on the cloudPcOnPremisesConnection object. It triggers a new health check for the cloudPcOnPremisesConnection (../resources/cloudpconpremisesconnection.md) object and changes the healthCheckStatus and [healthCheckStatusDetail properties when check finished. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a run_health_checks_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RunHealthChecksRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/events/item/extensions/extensions.rb b/lib/device_management/virtual_endpoint/on_premises_connections/on_premises_connections.rb similarity index 100% rename from lib/me/calendars/item/events/item/extensions/extensions.rb rename to lib/device_management/virtual_endpoint/on_premises_connections/on_premises_connections.rb diff --git a/lib/device_management/virtual_endpoint/on_premises_connections/on_premises_connections_request_builder.rb b/lib/device_management/virtual_endpoint/on_premises_connections/on_premises_connections_request_builder.rb new file mode 100644 index 0000000000..13ec54e395 --- /dev/null +++ b/lib/device_management/virtual_endpoint/on_premises_connections/on_premises_connections_request_builder.rb @@ -0,0 +1,182 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/cloud_pc_on_premises_connection' +require_relative '../../../models/cloud_pc_on_premises_connection_collection_response' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../device_management' +require_relative '../virtual_endpoint' +require_relative './count/count_request_builder' +require_relative './item/cloud_pc_on_premises_connection_item_request_builder' +require_relative './on_premises_connections' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module OnPremisesConnections + ## + # Provides operations to manage the onPremisesConnections property of the microsoft.graph.virtualEndpoint entity. + class OnPremisesConnectionsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::OnPremisesConnections::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the onPremisesConnections property of the microsoft.graph.virtualEndpoint entity. + ## @param cloud_pc_on_premises_connection_id The unique identifier of cloudPcOnPremisesConnection + ## @return a cloud_pc_on_premises_connection_item_request_builder + ## + def by_cloud_pc_on_premises_connection_id(cloud_pc_on_premises_connection_id) + raise StandardError, 'cloud_pc_on_premises_connection_id cannot be null' if cloud_pc_on_premises_connection_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["cloudPcOnPremisesConnection%2Did"] = cloud_pc_on_premises_connection_id + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::OnPremisesConnections::Item::CloudPcOnPremisesConnectionItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new OnPremisesConnectionsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/onPremisesConnections{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## List properties and relationships of the cloudPcOnPremisesConnection objects. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_on_premises_connection_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcOnPremisesConnectionCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create a new cloudPcOnPremisesConnection object for provisioning Cloud PCs. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_on_premises_connection + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcOnPremisesConnection.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## List properties and relationships of the cloudPcOnPremisesConnection objects. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create a new cloudPcOnPremisesConnection object for provisioning Cloud PCs. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a on_premises_connections_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return OnPremisesConnectionsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # List properties and relationships of the cloudPcOnPremisesConnection objects. + class OnPremisesConnectionsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/me/contact_folders/item/contacts/count/count.rb b/lib/device_management/virtual_endpoint/provisioning_policies/count/count.rb similarity index 100% rename from lib/me/contact_folders/item/contacts/count/count.rb rename to lib/device_management/virtual_endpoint/provisioning_policies/count/count.rb diff --git a/lib/device_management/virtual_endpoint/provisioning_policies/count/count_request_builder.rb b/lib/device_management/virtual_endpoint/provisioning_policies/count/count_request_builder.rb new file mode 100644 index 0000000000..760524ba00 --- /dev/null +++ b/lib/device_management/virtual_endpoint/provisioning_policies/count/count_request_builder.rb @@ -0,0 +1,100 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_management' +require_relative '../../virtual_endpoint' +require_relative '../provisioning_policies' +require_relative './count' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module ProvisioningPolicies + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/provisioningPolicies/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/device_management/virtual_endpoint/provisioning_policies/item/assign/assign.rb b/lib/device_management/virtual_endpoint/provisioning_policies/item/assign/assign.rb new file mode 100644 index 0000000000..6d568921e5 --- /dev/null +++ b/lib/device_management/virtual_endpoint/provisioning_policies/item/assign/assign.rb @@ -0,0 +1 @@ +require_relative 'assign_post_request_body' diff --git a/lib/device_management/virtual_endpoint/provisioning_policies/item/assign/assign_post_request_body.rb b/lib/device_management/virtual_endpoint/provisioning_policies/item/assign/assign_post_request_body.rb new file mode 100644 index 0000000000..65513e0fad --- /dev/null +++ b/lib/device_management/virtual_endpoint/provisioning_policies/item/assign/assign_post_request_body.rb @@ -0,0 +1,95 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/cloud_pc_provisioning_policy_assignment' +require_relative '../../../../device_management' +require_relative '../../../virtual_endpoint' +require_relative '../../provisioning_policies' +require_relative '../item' +require_relative './assign' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module ProvisioningPolicies + module Item + module Assign + class AssignPostRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The assignments property + @assignments + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Gets the assignments property value. The assignments property + ## @return a cloud_pc_provisioning_policy_assignment + ## + def assignments + return @assignments + end + ## + ## Sets the assignments property value. The assignments property + ## @param value Value to set for the assignments property. + ## @return a void + ## + def assignments=(value) + @assignments = value + end + ## + ## Instantiates a new AssignPostRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a assign_post_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return AssignPostRequestBody.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "assignments" => lambda {|n| @assignments = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::CloudPcProvisioningPolicyAssignment.create_from_discriminator_value(pn) }) }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_collection_of_object_values("assignments", @assignments) + writer.write_additional_data(@additional_data) + end + end + end + end + end + end + end +end diff --git a/lib/device_management/virtual_endpoint/provisioning_policies/item/assign/assign_request_builder.rb b/lib/device_management/virtual_endpoint/provisioning_policies/item/assign/assign_request_builder.rb new file mode 100644 index 0000000000..95c026e7a0 --- /dev/null +++ b/lib/device_management/virtual_endpoint/provisioning_policies/item/assign/assign_request_builder.rb @@ -0,0 +1,79 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_management' +require_relative '../../../virtual_endpoint' +require_relative '../../provisioning_policies' +require_relative '../item' +require_relative './assign' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module ProvisioningPolicies + module Item + module Assign + ## + # Provides operations to call the assign method. + class AssignRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new AssignRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/provisioningPolicies/{cloudPcProvisioningPolicy%2Did}/assign") + end + ## + ## Assign a cloudPcProvisioningPolicy to user groups. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Assign a cloudPcProvisioningPolicy to user groups. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assign_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/events/item/instances/instances.rb b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/assignments.rb similarity index 100% rename from lib/me/calendars/item/events/item/instances/instances.rb rename to lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/assignments.rb diff --git a/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/assignments_request_builder.rb b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/assignments_request_builder.rb new file mode 100644 index 0000000000..ecd7fe2007 --- /dev/null +++ b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/assignments_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/cloud_pc_provisioning_policy_assignment' +require_relative '../../../../../models/cloud_pc_provisioning_policy_assignment_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_management' +require_relative '../../../virtual_endpoint' +require_relative '../../provisioning_policies' +require_relative '../item' +require_relative './assignments' +require_relative './count/count_request_builder' +require_relative './item/cloud_pc_provisioning_policy_assignment_item_request_builder' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module ProvisioningPolicies + module Item + module Assignments + ## + # Provides operations to manage the assignments property of the microsoft.graph.cloudPcProvisioningPolicy entity. + class AssignmentsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::ProvisioningPolicies::Item::Assignments::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the assignments property of the microsoft.graph.cloudPcProvisioningPolicy entity. + ## @param cloud_pc_provisioning_policy_assignment_id The unique identifier of cloudPcProvisioningPolicyAssignment + ## @return a cloud_pc_provisioning_policy_assignment_item_request_builder + ## + def by_cloud_pc_provisioning_policy_assignment_id(cloud_pc_provisioning_policy_assignment_id) + raise StandardError, 'cloud_pc_provisioning_policy_assignment_id cannot be null' if cloud_pc_provisioning_policy_assignment_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["cloudPcProvisioningPolicyAssignment%2Did"] = cloud_pc_provisioning_policy_assignment_id + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::ProvisioningPolicies::Item::Assignments::Item::CloudPcProvisioningPolicyAssignmentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new AssignmentsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/provisioningPolicies/{cloudPcProvisioningPolicy%2Did}/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## A defined collection of provisioning policy assignments. Represents the set of Microsoft 365 groups and security groups in Microsoft Entra ID that have provisioning policy assigned. Returned only on $expand. For an example about how to get the assignments relationship, see Get cloudPcProvisioningPolicy. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_provisioning_policy_assignment_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcProvisioningPolicyAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to assignments for deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_provisioning_policy_assignment + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcProvisioningPolicyAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## A defined collection of provisioning policy assignments. Represents the set of Microsoft 365 groups and security groups in Microsoft Entra ID that have provisioning policy assigned. Returned only on $expand. For an example about how to get the assignments relationship, see Get cloudPcProvisioningPolicy. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to assignments for deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # A defined collection of provisioning policy assignments. Represents the set of Microsoft 365 groups and security groups in Microsoft Entra ID that have provisioning policy assigned. Returned only on $expand. For an example about how to get the assignments relationship, see Get cloudPcProvisioningPolicy. + class AssignmentsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/contact_folders/item/contacts/item/extensions/count/count.rb b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/count/count.rb similarity index 100% rename from lib/me/contact_folders/item/contacts/item/extensions/count/count.rb rename to lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/count/count.rb diff --git a/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/count/count_request_builder.rb b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/count/count_request_builder.rb new file mode 100644 index 0000000000..4a1a26a6d6 --- /dev/null +++ b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_management' +require_relative '../../../../virtual_endpoint' +require_relative '../../../provisioning_policies' +require_relative '../../item' +require_relative '../assignments' +require_relative './count' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module ProvisioningPolicies + module Item + module Assignments + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/provisioningPolicies/{cloudPcProvisioningPolicy%2Did}/assignments/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/events/item/instances/item/attachments/attachments.rb b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/assigned_users.rb similarity index 100% rename from lib/me/calendars/item/events/item/instances/item/attachments/attachments.rb rename to lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/assigned_users.rb diff --git a/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/assigned_users_request_builder.rb b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/assigned_users_request_builder.rb new file mode 100644 index 0000000000..5e01cb8890 --- /dev/null +++ b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/assigned_users_request_builder.rb @@ -0,0 +1,158 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../models/user_collection_response' +require_relative '../../../../../../device_management' +require_relative '../../../../../virtual_endpoint' +require_relative '../../../../provisioning_policies' +require_relative '../../../item' +require_relative '../../assignments' +require_relative '../item' +require_relative './assigned_users' +require_relative './count/count_request_builder' +require_relative './item/user_item_request_builder' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module ProvisioningPolicies + module Item + module Assignments + module Item + module AssignedUsers + ## + # Provides operations to manage the assignedUsers property of the microsoft.graph.cloudPcProvisioningPolicyAssignment entity. + class AssignedUsersRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::ProvisioningPolicies::Item::Assignments::Item::AssignedUsers::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the assignedUsers property of the microsoft.graph.cloudPcProvisioningPolicyAssignment entity. + ## @param user_id The unique identifier of user + ## @return a user_item_request_builder + ## + def by_user_id(user_id) + raise StandardError, 'user_id cannot be null' if user_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["user%2Did"] = user_id + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::ProvisioningPolicies::Item::Assignments::Item::AssignedUsers::Item::UserItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new AssignedUsersRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/provisioningPolicies/{cloudPcProvisioningPolicy%2Did}/assignments/{cloudPcProvisioningPolicyAssignment%2Did}/assignedUsers{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## The assignment targeted users for the provisioning policy. This list of users is computed based on assignments, licenses, group memberships, and policies. Read-only. Supports$expand. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of user_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The assignment targeted users for the provisioning policy. This list of users is computed based on assignments, licenses, group memberships, and policies. Read-only. Supports$expand. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assigned_users_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignedUsersRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The assignment targeted users for the provisioning policy. This list of users is computed based on assignments, licenses, group memberships, and policies. Read-only. Supports$expand. + class AssignedUsersRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/contacts/count/count.rb b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/count/count.rb similarity index 100% rename from lib/me/contacts/count/count.rb rename to lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/count/count.rb diff --git a/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/count/count_request_builder.rb b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/count/count_request_builder.rb new file mode 100644 index 0000000000..8bb4ede2fa --- /dev/null +++ b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/count/count_request_builder.rb @@ -0,0 +1,112 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../device_management' +require_relative '../../../../../../virtual_endpoint' +require_relative '../../../../../provisioning_policies' +require_relative '../../../../item' +require_relative '../../../assignments' +require_relative '../../item' +require_relative '../assigned_users' +require_relative './count' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module ProvisioningPolicies + module Item + module Assignments + module Item + module AssignedUsers + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/provisioningPolicies/{cloudPcProvisioningPolicy%2Did}/assignments/{cloudPcProvisioningPolicyAssignment%2Did}/assignedUsers/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/messages/item/item.rb b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/item/item.rb similarity index 100% rename from lib/me/chats/item/messages/item/item.rb rename to lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/item/item.rb diff --git a/lib/me/calendars/item/events/item/instances/item/calendar/calendar.rb b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/item/mailbox_settings/mailbox_settings.rb similarity index 100% rename from lib/me/calendars/item/events/item/instances/item/calendar/calendar.rb rename to lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/item/mailbox_settings/mailbox_settings.rb diff --git a/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/item/mailbox_settings/mailbox_settings_request_builder.rb b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/item/mailbox_settings/mailbox_settings_request_builder.rb new file mode 100644 index 0000000000..337530cf63 --- /dev/null +++ b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/item/mailbox_settings/mailbox_settings_request_builder.rb @@ -0,0 +1,151 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/mailbox_settings' +require_relative '../../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../device_management' +require_relative '../../../../../../../virtual_endpoint' +require_relative '../../../../../../provisioning_policies' +require_relative '../../../../../item' +require_relative '../../../../assignments' +require_relative '../../../item' +require_relative '../../assigned_users' +require_relative '../item' +require_relative './mailbox_settings' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module ProvisioningPolicies + module Item + module Assignments + module Item + module AssignedUsers + module Item + module MailboxSettings + ## + # Builds and executes requests for operations under \deviceManagement\virtualEndpoint\provisioningPolicies\{cloudPcProvisioningPolicy-id}\assignments\{cloudPcProvisioningPolicyAssignment-id}\assignedUsers\{user-id}\mailboxSettings + class MailboxSettingsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/provisioningPolicies/{cloudPcProvisioningPolicy%2Did}/assignments/{cloudPcProvisioningPolicyAssignment%2Did}/assignedUsers/{user%2Did}/mailboxSettings{?%24expand,%24select}") + end + ## + ## Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mailbox_settings + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MailboxSettings.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update property mailboxSettings value. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of mailbox_settings + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MailboxSettings.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update property mailboxSettings value. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mailbox_settings_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MailboxSettingsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + class MailboxSettingsRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/contacts/item/extensions/count/count.rb b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/item/service_provisioning_errors/count/count.rb similarity index 100% rename from lib/me/contacts/item/extensions/count/count.rb rename to lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/item/service_provisioning_errors/count/count.rb diff --git a/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/item/service_provisioning_errors/count/count_request_builder.rb b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/item/service_provisioning_errors/count/count_request_builder.rb new file mode 100644 index 0000000000..4c29c3cace --- /dev/null +++ b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/item/service_provisioning_errors/count/count_request_builder.rb @@ -0,0 +1,118 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../../device_management' +require_relative '../../../../../../../../virtual_endpoint' +require_relative '../../../../../../../provisioning_policies' +require_relative '../../../../../../item' +require_relative '../../../../../assignments' +require_relative '../../../../item' +require_relative '../../../assigned_users' +require_relative '../../item' +require_relative '../service_provisioning_errors' +require_relative './count' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module ProvisioningPolicies + module Item + module Assignments + module Item + module AssignedUsers + module Item + module ServiceProvisioningErrors + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/provisioningPolicies/{cloudPcProvisioningPolicy%2Did}/assignments/{cloudPcProvisioningPolicyAssignment%2Did}/assignedUsers/{user%2Did}/serviceProvisioningErrors/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/events/item/instances/item/dismiss_reminder/dismiss_reminder.rb b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/item/service_provisioning_errors/service_provisioning_errors.rb similarity index 100% rename from lib/me/calendars/item/events/item/instances/item/dismiss_reminder/dismiss_reminder.rb rename to lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/item/service_provisioning_errors/service_provisioning_errors.rb diff --git a/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/item/service_provisioning_errors/service_provisioning_errors_request_builder.rb b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/item/service_provisioning_errors/service_provisioning_errors_request_builder.rb new file mode 100644 index 0000000000..f9f1b188c3 --- /dev/null +++ b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/item/service_provisioning_errors/service_provisioning_errors_request_builder.rb @@ -0,0 +1,152 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../../models/service_provisioning_error_collection_response' +require_relative '../../../../../../../../device_management' +require_relative '../../../../../../../virtual_endpoint' +require_relative '../../../../../../provisioning_policies' +require_relative '../../../../../item' +require_relative '../../../../assignments' +require_relative '../../../item' +require_relative '../../assigned_users' +require_relative '../item' +require_relative './count/count_request_builder' +require_relative './service_provisioning_errors' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module ProvisioningPolicies + module Item + module Assignments + module Item + module AssignedUsers + module Item + module ServiceProvisioningErrors + ## + # Builds and executes requests for operations under \deviceManagement\virtualEndpoint\provisioningPolicies\{cloudPcProvisioningPolicy-id}\assignments\{cloudPcProvisioningPolicyAssignment-id}\assignedUsers\{user-id}\serviceProvisioningErrors + class ServiceProvisioningErrorsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::ProvisioningPolicies::Item::Assignments::Item::AssignedUsers::Item::ServiceProvisioningErrors::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/provisioningPolicies/{cloudPcProvisioningPolicy%2Did}/assignments/{cloudPcProvisioningPolicyAssignment%2Did}/assignedUsers/{user%2Did}/serviceProvisioningErrors{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of service_provisioning_error_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceProvisioningErrorCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a service_provisioning_errors_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ServiceProvisioningErrorsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/item/user_item_request_builder.rb b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/item/user_item_request_builder.rb new file mode 100644 index 0000000000..1f25a40485 --- /dev/null +++ b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users/item/user_item_request_builder.rb @@ -0,0 +1,125 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../../microsoft_graph' +require_relative '../../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../../models/user' +require_relative '../../../../../../../device_management' +require_relative '../../../../../../virtual_endpoint' +require_relative '../../../../../provisioning_policies' +require_relative '../../../../item' +require_relative '../../../assignments' +require_relative '../../item' +require_relative '../assigned_users' +require_relative './item' +require_relative './mailbox_settings/mailbox_settings_request_builder' +require_relative './service_provisioning_errors/service_provisioning_errors_request_builder' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module ProvisioningPolicies + module Item + module Assignments + module Item + module AssignedUsers + module Item + ## + # Provides operations to manage the assignedUsers property of the microsoft.graph.cloudPcProvisioningPolicyAssignment entity. + class UserItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # The mailboxSettings property + def mailbox_settings() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::ProvisioningPolicies::Item::Assignments::Item::AssignedUsers::Item::MailboxSettings::MailboxSettingsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # The serviceProvisioningErrors property + def service_provisioning_errors() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::ProvisioningPolicies::Item::Assignments::Item::AssignedUsers::Item::ServiceProvisioningErrors::ServiceProvisioningErrorsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new UserItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/provisioningPolicies/{cloudPcProvisioningPolicy%2Did}/assignments/{cloudPcProvisioningPolicyAssignment%2Did}/assignedUsers/{user%2Did}{?%24expand,%24select}") + end + ## + ## The assignment targeted users for the provisioning policy. This list of users is computed based on assignments, licenses, group memberships, and policies. Read-only. Supports$expand. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of user + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::User.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The assignment targeted users for the provisioning policy. This list of users is computed based on assignments, licenses, group memberships, and policies. Read-only. Supports$expand. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The assignment targeted users for the provisioning policy. This list of users is computed based on assignments, licenses, group memberships, and policies. Read-only. Supports$expand. + class UserItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/calendars/item/events/item/instances/item/extensions/extensions.rb b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users_with_user_principal_name/assigned_users_with_user_principal_name.rb similarity index 100% rename from lib/me/calendars/item/events/item/instances/item/extensions/extensions.rb rename to lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users_with_user_principal_name/assigned_users_with_user_principal_name.rb diff --git a/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users_with_user_principal_name/assigned_users_with_user_principal_name_request_builder.rb b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users_with_user_principal_name/assigned_users_with_user_principal_name_request_builder.rb new file mode 100644 index 0000000000..e6252fb881 --- /dev/null +++ b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/assigned_users_with_user_principal_name/assigned_users_with_user_principal_name_request_builder.rb @@ -0,0 +1,111 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../../models/user' +require_relative '../../../../../../device_management' +require_relative '../../../../../virtual_endpoint' +require_relative '../../../../provisioning_policies' +require_relative '../../../item' +require_relative '../../assignments' +require_relative '../item' +require_relative './assigned_users_with_user_principal_name' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module ProvisioningPolicies + module Item + module Assignments + module Item + module AssignedUsersWithUserPrincipalName + ## + # Provides operations to manage the assignedUsers property of the microsoft.graph.cloudPcProvisioningPolicyAssignment entity. + class AssignedUsersWithUserPrincipalNameRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new AssignedUsersWithUserPrincipalNameRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @param user_principal_name Alternate key of user + ## @return a void + ## + def initialize(path_parameters, request_adapter, user_principal_name=nil) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/provisioningPolicies/{cloudPcProvisioningPolicy%2Did}/assignments/{cloudPcProvisioningPolicyAssignment%2Did}/assignedUsers(userPrincipalName='{userPrincipalName}'){?%24expand,%24select}") + end + ## + ## The assignment targeted users for the provisioning policy. This list of users is computed based on assignments, licenses, group memberships, and policies. Read-only. Supports$expand. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of user + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::User.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## The assignment targeted users for the provisioning policy. This list of users is computed based on assignments, licenses, group memberships, and policies. Read-only. Supports$expand. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assigned_users_with_user_principal_name_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignedUsersWithUserPrincipalNameRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The assignment targeted users for the provisioning policy. This list of users is computed based on assignments, licenses, group memberships, and policies. Read-only. Supports$expand. + class AssignedUsersWithUserPrincipalNameRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/cloud_pc_provisioning_policy_assignment_item_request_builder.rb b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/cloud_pc_provisioning_policy_assignment_item_request_builder.rb new file mode 100644 index 0000000000..8b559de93d --- /dev/null +++ b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/cloud_pc_provisioning_policy_assignment_item_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/cloud_pc_provisioning_policy_assignment' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_management' +require_relative '../../../../virtual_endpoint' +require_relative '../../../provisioning_policies' +require_relative '../../item' +require_relative '../assignments' +require_relative './assigned_users/assigned_users_request_builder' +require_relative './assigned_users_with_user_principal_name/assigned_users_with_user_principal_name_request_builder' +require_relative './item' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module ProvisioningPolicies + module Item + module Assignments + module Item + ## + # Provides operations to manage the assignments property of the microsoft.graph.cloudPcProvisioningPolicy entity. + class CloudPcProvisioningPolicyAssignmentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the assignedUsers property of the microsoft.graph.cloudPcProvisioningPolicyAssignment entity. + def assigned_users() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::ProvisioningPolicies::Item::Assignments::Item::AssignedUsers::AssignedUsersRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the assignedUsers property of the microsoft.graph.cloudPcProvisioningPolicyAssignment entity. + ## @param user_principal_name Alternate key of user + ## @return a assigned_users_with_user_principal_name_request_builder + ## + def assigned_users_with_user_principal_name(user_principal_name) + raise StandardError, 'user_principal_name cannot be null' if user_principal_name.nil? + return AssignedUsersWithUserPrincipalNameRequestBuilder.new(@path_parameters, @request_adapter, userPrincipalName) + end + ## + ## Instantiates a new CloudPcProvisioningPolicyAssignmentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/provisioningPolicies/{cloudPcProvisioningPolicy%2Did}/assignments/{cloudPcProvisioningPolicyAssignment%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property assignments for deviceManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## A defined collection of provisioning policy assignments. Represents the set of Microsoft 365 groups and security groups in Microsoft Entra ID that have provisioning policy assigned. Returned only on $expand. For an example about how to get the assignments relationship, see Get cloudPcProvisioningPolicy. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_provisioning_policy_assignment + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcProvisioningPolicyAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property assignments in deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_provisioning_policy_assignment + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcProvisioningPolicyAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property assignments for deviceManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## A defined collection of provisioning policy assignments. Represents the set of Microsoft 365 groups and security groups in Microsoft Entra ID that have provisioning policy assigned. Returned only on $expand. For an example about how to get the assignments relationship, see Get cloudPcProvisioningPolicy. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property assignments in deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a cloud_pc_provisioning_policy_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CloudPcProvisioningPolicyAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # A defined collection of provisioning policy assignments. Represents the set of Microsoft 365 groups and security groups in Microsoft Entra ID that have provisioning policy assigned. Returned only on $expand. For an example about how to get the assignments relationship, see Get cloudPcProvisioningPolicy. + class CloudPcProvisioningPolicyAssignmentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/messages/item/replies/item/hosted_contents/item/item.rb b/lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/item.rb similarity index 100% rename from lib/me/chats/item/messages/item/replies/item/hosted_contents/item/item.rb rename to lib/device_management/virtual_endpoint/provisioning_policies/item/assignments/item/item.rb diff --git a/lib/device_management/virtual_endpoint/provisioning_policies/item/cloud_pc_provisioning_policy_item_request_builder.rb b/lib/device_management/virtual_endpoint/provisioning_policies/item/cloud_pc_provisioning_policy_item_request_builder.rb new file mode 100644 index 0000000000..0da80f3d1b --- /dev/null +++ b/lib/device_management/virtual_endpoint/provisioning_policies/item/cloud_pc_provisioning_policy_item_request_builder.rb @@ -0,0 +1,178 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/cloud_pc_provisioning_policy' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_management' +require_relative '../../virtual_endpoint' +require_relative '../provisioning_policies' +require_relative './assign/assign_request_builder' +require_relative './assignments/assignments_request_builder' +require_relative './item' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module ProvisioningPolicies + module Item + ## + # Provides operations to manage the provisioningPolicies property of the microsoft.graph.virtualEndpoint entity. + class CloudPcProvisioningPolicyItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to call the assign method. + def assign() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::ProvisioningPolicies::Item::Assign::AssignRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the assignments property of the microsoft.graph.cloudPcProvisioningPolicy entity. + def assignments() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::ProvisioningPolicies::Item::Assignments::AssignmentsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new CloudPcProvisioningPolicyItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/provisioningPolicies/{cloudPcProvisioningPolicy%2Did}{?%24expand,%24select}") + end + ## + ## Delete a cloudPcProvisioningPolicy object. You can’t delete a policy that’s in use. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Read the properties and relationships of a cloudPcProvisioningPolicy object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_provisioning_policy + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcProvisioningPolicy.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the properties of a cloudPcProvisioningPolicy object. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_provisioning_policy + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcProvisioningPolicy.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete a cloudPcProvisioningPolicy object. You can’t delete a policy that’s in use. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Read the properties and relationships of a cloudPcProvisioningPolicy object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the properties of a cloudPcProvisioningPolicy object. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a cloud_pc_provisioning_policy_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CloudPcProvisioningPolicyItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Read the properties and relationships of a cloudPcProvisioningPolicy object. + class CloudPcProvisioningPolicyItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/messages/item/replies/item/item.rb b/lib/device_management/virtual_endpoint/provisioning_policies/item/item.rb similarity index 100% rename from lib/me/chats/item/messages/item/replies/item/item.rb rename to lib/device_management/virtual_endpoint/provisioning_policies/item/item.rb diff --git a/lib/me/chats/chats.rb b/lib/device_management/virtual_endpoint/provisioning_policies/provisioning_policies.rb similarity index 100% rename from lib/me/chats/chats.rb rename to lib/device_management/virtual_endpoint/provisioning_policies/provisioning_policies.rb diff --git a/lib/device_management/virtual_endpoint/provisioning_policies/provisioning_policies_request_builder.rb b/lib/device_management/virtual_endpoint/provisioning_policies/provisioning_policies_request_builder.rb new file mode 100644 index 0000000000..3623d6240b --- /dev/null +++ b/lib/device_management/virtual_endpoint/provisioning_policies/provisioning_policies_request_builder.rb @@ -0,0 +1,182 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/cloud_pc_provisioning_policy' +require_relative '../../../models/cloud_pc_provisioning_policy_collection_response' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../device_management' +require_relative '../virtual_endpoint' +require_relative './count/count_request_builder' +require_relative './item/cloud_pc_provisioning_policy_item_request_builder' +require_relative './provisioning_policies' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module ProvisioningPolicies + ## + # Provides operations to manage the provisioningPolicies property of the microsoft.graph.virtualEndpoint entity. + class ProvisioningPoliciesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::ProvisioningPolicies::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the provisioningPolicies property of the microsoft.graph.virtualEndpoint entity. + ## @param cloud_pc_provisioning_policy_id The unique identifier of cloudPcProvisioningPolicy + ## @return a cloud_pc_provisioning_policy_item_request_builder + ## + def by_cloud_pc_provisioning_policy_id(cloud_pc_provisioning_policy_id) + raise StandardError, 'cloud_pc_provisioning_policy_id cannot be null' if cloud_pc_provisioning_policy_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["cloudPcProvisioningPolicy%2Did"] = cloud_pc_provisioning_policy_id + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::ProvisioningPolicies::Item::CloudPcProvisioningPolicyItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new ProvisioningPoliciesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/provisioningPolicies{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## List properties and relationships of the cloudPcProvisioningPolicy objects. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_provisioning_policy_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcProvisioningPolicyCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create a new cloudPcProvisioningPolicy object. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_provisioning_policy + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcProvisioningPolicy.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## List properties and relationships of the cloudPcProvisioningPolicy objects. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create a new cloudPcProvisioningPolicy object. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a provisioning_policies_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ProvisioningPoliciesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # List properties and relationships of the cloudPcProvisioningPolicy objects. + class ProvisioningPoliciesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/me/created_objects/count/count.rb b/lib/device_management/virtual_endpoint/user_settings/count/count.rb similarity index 100% rename from lib/me/created_objects/count/count.rb rename to lib/device_management/virtual_endpoint/user_settings/count/count.rb diff --git a/lib/device_management/virtual_endpoint/user_settings/count/count_request_builder.rb b/lib/device_management/virtual_endpoint/user_settings/count/count_request_builder.rb new file mode 100644 index 0000000000..967c4c9258 --- /dev/null +++ b/lib/device_management/virtual_endpoint/user_settings/count/count_request_builder.rb @@ -0,0 +1,100 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_management' +require_relative '../../virtual_endpoint' +require_relative '../user_settings' +require_relative './count' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module UserSettings + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/userSettings/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/device_management/virtual_endpoint/user_settings/item/assign/assign.rb b/lib/device_management/virtual_endpoint/user_settings/item/assign/assign.rb new file mode 100644 index 0000000000..6d568921e5 --- /dev/null +++ b/lib/device_management/virtual_endpoint/user_settings/item/assign/assign.rb @@ -0,0 +1 @@ +require_relative 'assign_post_request_body' diff --git a/lib/device_management/virtual_endpoint/user_settings/item/assign/assign_post_request_body.rb b/lib/device_management/virtual_endpoint/user_settings/item/assign/assign_post_request_body.rb new file mode 100644 index 0000000000..de4e86ba36 --- /dev/null +++ b/lib/device_management/virtual_endpoint/user_settings/item/assign/assign_post_request_body.rb @@ -0,0 +1,95 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/cloud_pc_user_setting_assignment' +require_relative '../../../../device_management' +require_relative '../../../virtual_endpoint' +require_relative '../../user_settings' +require_relative '../item' +require_relative './assign' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module UserSettings + module Item + module Assign + class AssignPostRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The assignments property + @assignments + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Gets the assignments property value. The assignments property + ## @return a cloud_pc_user_setting_assignment + ## + def assignments + return @assignments + end + ## + ## Sets the assignments property value. The assignments property + ## @param value Value to set for the assignments property. + ## @return a void + ## + def assignments=(value) + @assignments = value + end + ## + ## Instantiates a new AssignPostRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a assign_post_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return AssignPostRequestBody.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "assignments" => lambda {|n| @assignments = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::CloudPcUserSettingAssignment.create_from_discriminator_value(pn) }) }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_collection_of_object_values("assignments", @assignments) + writer.write_additional_data(@additional_data) + end + end + end + end + end + end + end +end diff --git a/lib/device_management/virtual_endpoint/user_settings/item/assign/assign_request_builder.rb b/lib/device_management/virtual_endpoint/user_settings/item/assign/assign_request_builder.rb new file mode 100644 index 0000000000..d3b9c3f8fd --- /dev/null +++ b/lib/device_management/virtual_endpoint/user_settings/item/assign/assign_request_builder.rb @@ -0,0 +1,79 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_management' +require_relative '../../../virtual_endpoint' +require_relative '../../user_settings' +require_relative '../item' +require_relative './assign' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module UserSettings + module Item + module Assign + ## + # Provides operations to call the assign method. + class AssignRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new AssignRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/userSettings/{cloudPcUserSetting%2Did}/assign") + end + ## + ## Assign a cloudPcUserSetting to user groups. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Assign a cloudPcUserSetting to user groups. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assign_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/installed_apps/installed_apps.rb b/lib/device_management/virtual_endpoint/user_settings/item/assignments/assignments.rb similarity index 100% rename from lib/me/chats/item/installed_apps/installed_apps.rb rename to lib/device_management/virtual_endpoint/user_settings/item/assignments/assignments.rb diff --git a/lib/device_management/virtual_endpoint/user_settings/item/assignments/assignments_request_builder.rb b/lib/device_management/virtual_endpoint/user_settings/item/assignments/assignments_request_builder.rb new file mode 100644 index 0000000000..ddcaaba3fa --- /dev/null +++ b/lib/device_management/virtual_endpoint/user_settings/item/assignments/assignments_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/cloud_pc_user_setting_assignment' +require_relative '../../../../../models/cloud_pc_user_setting_assignment_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../device_management' +require_relative '../../../virtual_endpoint' +require_relative '../../user_settings' +require_relative '../item' +require_relative './assignments' +require_relative './count/count_request_builder' +require_relative './item/cloud_pc_user_setting_assignment_item_request_builder' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module UserSettings + module Item + module Assignments + ## + # Provides operations to manage the assignments property of the microsoft.graph.cloudPcUserSetting entity. + class AssignmentsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::UserSettings::Item::Assignments::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the assignments property of the microsoft.graph.cloudPcUserSetting entity. + ## @param cloud_pc_user_setting_assignment_id The unique identifier of cloudPcUserSettingAssignment + ## @return a cloud_pc_user_setting_assignment_item_request_builder + ## + def by_cloud_pc_user_setting_assignment_id(cloud_pc_user_setting_assignment_id) + raise StandardError, 'cloud_pc_user_setting_assignment_id cannot be null' if cloud_pc_user_setting_assignment_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["cloudPcUserSettingAssignment%2Did"] = cloud_pc_user_setting_assignment_id + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::UserSettings::Item::Assignments::Item::CloudPcUserSettingAssignmentItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new AssignmentsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/userSettings/{cloudPcUserSetting%2Did}/assignments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Represents the set of Microsoft 365 groups and security groups in Microsoft Entra ID that have cloudPCUserSetting assigned. Returned only on $expand. For an example, see Get cloudPcUserSetting. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_user_setting_assignment_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcUserSettingAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to assignments for deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_user_setting_assignment + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcUserSettingAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Represents the set of Microsoft 365 groups and security groups in Microsoft Entra ID that have cloudPCUserSetting assigned. Returned only on $expand. For an example, see Get cloudPcUserSetting. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to assignments for deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assignments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignmentsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Represents the set of Microsoft 365 groups and security groups in Microsoft Entra ID that have cloudPCUserSetting assigned. Returned only on $expand. For an example, see Get cloudPcUserSetting. + class AssignmentsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/created_objects/graph_service_principal/count/count.rb b/lib/device_management/virtual_endpoint/user_settings/item/assignments/count/count.rb similarity index 100% rename from lib/me/created_objects/graph_service_principal/count/count.rb rename to lib/device_management/virtual_endpoint/user_settings/item/assignments/count/count.rb diff --git a/lib/device_management/virtual_endpoint/user_settings/item/assignments/count/count_request_builder.rb b/lib/device_management/virtual_endpoint/user_settings/item/assignments/count/count_request_builder.rb new file mode 100644 index 0000000000..620c3d20a0 --- /dev/null +++ b/lib/device_management/virtual_endpoint/user_settings/item/assignments/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_management' +require_relative '../../../../virtual_endpoint' +require_relative '../../../user_settings' +require_relative '../../item' +require_relative '../assignments' +require_relative './count' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module UserSettings + module Item + module Assignments + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/userSettings/{cloudPcUserSetting%2Did}/assignments/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/device_management/virtual_endpoint/user_settings/item/assignments/item/cloud_pc_user_setting_assignment_item_request_builder.rb b/lib/device_management/virtual_endpoint/user_settings/item/assignments/item/cloud_pc_user_setting_assignment_item_request_builder.rb new file mode 100644 index 0000000000..b3ef86b8c4 --- /dev/null +++ b/lib/device_management/virtual_endpoint/user_settings/item/assignments/item/cloud_pc_user_setting_assignment_item_request_builder.rb @@ -0,0 +1,172 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/cloud_pc_user_setting_assignment' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../device_management' +require_relative '../../../../virtual_endpoint' +require_relative '../../../user_settings' +require_relative '../../item' +require_relative '../assignments' +require_relative './item' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module UserSettings + module Item + module Assignments + module Item + ## + # Provides operations to manage the assignments property of the microsoft.graph.cloudPcUserSetting entity. + class CloudPcUserSettingAssignmentItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CloudPcUserSettingAssignmentItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/userSettings/{cloudPcUserSetting%2Did}/assignments/{cloudPcUserSettingAssignment%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property assignments for deviceManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Represents the set of Microsoft 365 groups and security groups in Microsoft Entra ID that have cloudPCUserSetting assigned. Returned only on $expand. For an example, see Get cloudPcUserSetting. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_user_setting_assignment + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcUserSettingAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property assignments in deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_user_setting_assignment + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcUserSettingAssignment.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property assignments for deviceManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Represents the set of Microsoft 365 groups and security groups in Microsoft Entra ID that have cloudPCUserSetting assigned. Returned only on $expand. For an example, see Get cloudPcUserSetting. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property assignments in deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a cloud_pc_user_setting_assignment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CloudPcUserSettingAssignmentItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Represents the set of Microsoft 365 groups and security groups in Microsoft Entra ID that have cloudPCUserSetting assigned. Returned only on $expand. For an example, see Get cloudPcUserSetting. + class CloudPcUserSettingAssignmentItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/permission_grants/item/item.rb b/lib/device_management/virtual_endpoint/user_settings/item/assignments/item/item.rb similarity index 100% rename from lib/me/chats/item/permission_grants/item/item.rb rename to lib/device_management/virtual_endpoint/user_settings/item/assignments/item/item.rb diff --git a/lib/device_management/virtual_endpoint/user_settings/item/cloud_pc_user_setting_item_request_builder.rb b/lib/device_management/virtual_endpoint/user_settings/item/cloud_pc_user_setting_item_request_builder.rb new file mode 100644 index 0000000000..409ea546b9 --- /dev/null +++ b/lib/device_management/virtual_endpoint/user_settings/item/cloud_pc_user_setting_item_request_builder.rb @@ -0,0 +1,178 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/cloud_pc_user_setting' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../device_management' +require_relative '../../virtual_endpoint' +require_relative '../user_settings' +require_relative './assign/assign_request_builder' +require_relative './assignments/assignments_request_builder' +require_relative './item' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module UserSettings + module Item + ## + # Provides operations to manage the userSettings property of the microsoft.graph.virtualEndpoint entity. + class CloudPcUserSettingItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to call the assign method. + def assign() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::UserSettings::Item::Assign::AssignRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the assignments property of the microsoft.graph.cloudPcUserSetting entity. + def assignments() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::UserSettings::Item::Assignments::AssignmentsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new CloudPcUserSettingItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/userSettings/{cloudPcUserSetting%2Did}{?%24expand,%24select}") + end + ## + ## Delete a cloudPcUserSetting object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Read the properties and relationships of a cloudPcUserSetting object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_user_setting + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcUserSetting.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the properties of a cloudPcUserSetting object. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_user_setting + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcUserSetting.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete a cloudPcUserSetting object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Read the properties and relationships of a cloudPcUserSetting object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the properties of a cloudPcUserSetting object. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a cloud_pc_user_setting_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CloudPcUserSettingItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Read the properties and relationships of a cloudPcUserSetting object. + class CloudPcUserSettingItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/pinned_messages/item/item.rb b/lib/device_management/virtual_endpoint/user_settings/item/item.rb similarity index 100% rename from lib/me/chats/item/pinned_messages/item/item.rb rename to lib/device_management/virtual_endpoint/user_settings/item/item.rb diff --git a/lib/me/chats/item/installed_apps/item/teams_app/teams_app.rb b/lib/device_management/virtual_endpoint/user_settings/user_settings.rb similarity index 100% rename from lib/me/chats/item/installed_apps/item/teams_app/teams_app.rb rename to lib/device_management/virtual_endpoint/user_settings/user_settings.rb diff --git a/lib/device_management/virtual_endpoint/user_settings/user_settings_request_builder.rb b/lib/device_management/virtual_endpoint/user_settings/user_settings_request_builder.rb new file mode 100644 index 0000000000..8049201565 --- /dev/null +++ b/lib/device_management/virtual_endpoint/user_settings/user_settings_request_builder.rb @@ -0,0 +1,182 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/cloud_pc_user_setting' +require_relative '../../../models/cloud_pc_user_setting_collection_response' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../device_management' +require_relative '../virtual_endpoint' +require_relative './count/count_request_builder' +require_relative './item/cloud_pc_user_setting_item_request_builder' +require_relative './user_settings' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + module UserSettings + ## + # Provides operations to manage the userSettings property of the microsoft.graph.virtualEndpoint entity. + class UserSettingsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::UserSettings::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the userSettings property of the microsoft.graph.virtualEndpoint entity. + ## @param cloud_pc_user_setting_id The unique identifier of cloudPcUserSetting + ## @return a cloud_pc_user_setting_item_request_builder + ## + def by_cloud_pc_user_setting_id(cloud_pc_user_setting_id) + raise StandardError, 'cloud_pc_user_setting_id cannot be null' if cloud_pc_user_setting_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["cloudPcUserSetting%2Did"] = cloud_pc_user_setting_id + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::UserSettings::Item::CloudPcUserSettingItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new UserSettingsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint/userSettings{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Get a list of cloudPcUserSetting objects and their properties. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_user_setting_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcUserSettingCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create a new cloudPcUserSetting object. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of cloud_pc_user_setting + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CloudPcUserSetting.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get a list of cloudPcUserSetting objects and their properties. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create a new cloudPcUserSetting object. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a user_settings_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UserSettingsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get a list of cloudPcUserSetting objects and their properties. + class UserSettingsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/installed_apps/item/teams_app_definition/teams_app_definition.rb b/lib/device_management/virtual_endpoint/virtual_endpoint.rb similarity index 100% rename from lib/me/chats/item/installed_apps/item/teams_app_definition/teams_app_definition.rb rename to lib/device_management/virtual_endpoint/virtual_endpoint.rb diff --git a/lib/device_management/virtual_endpoint/virtual_endpoint_request_builder.rb b/lib/device_management/virtual_endpoint/virtual_endpoint_request_builder.rb new file mode 100644 index 0000000000..1003e49a9a --- /dev/null +++ b/lib/device_management/virtual_endpoint/virtual_endpoint_request_builder.rb @@ -0,0 +1,202 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/o_data_errors_o_data_error' +require_relative '../../models/virtual_endpoint' +require_relative '../device_management' +require_relative './audit_events/audit_events_request_builder' +require_relative './cloud_p_cs/cloud_p_cs_request_builder' +require_relative './device_images/device_images_request_builder' +require_relative './gallery_images/gallery_images_request_builder' +require_relative './on_premises_connections/on_premises_connections_request_builder' +require_relative './provisioning_policies/provisioning_policies_request_builder' +require_relative './user_settings/user_settings_request_builder' +require_relative './virtual_endpoint' + +module MicrosoftGraph + module DeviceManagement + module VirtualEndpoint + ## + # Provides operations to manage the virtualEndpoint property of the microsoft.graph.deviceManagement entity. + class VirtualEndpointRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the auditEvents property of the microsoft.graph.virtualEndpoint entity. + def audit_events() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::AuditEvents::AuditEventsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the cloudPCs property of the microsoft.graph.virtualEndpoint entity. + def cloud_p_cs() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::CloudPCs::CloudPCsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the deviceImages property of the microsoft.graph.virtualEndpoint entity. + def device_images() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::DeviceImages::DeviceImagesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the galleryImages property of the microsoft.graph.virtualEndpoint entity. + def gallery_images() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::GalleryImages::GalleryImagesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the onPremisesConnections property of the microsoft.graph.virtualEndpoint entity. + def on_premises_connections() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::OnPremisesConnections::OnPremisesConnectionsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the provisioningPolicies property of the microsoft.graph.virtualEndpoint entity. + def provisioning_policies() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::ProvisioningPolicies::ProvisioningPoliciesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the userSettings property of the microsoft.graph.virtualEndpoint entity. + def user_settings() + return MicrosoftGraph::DeviceManagement::VirtualEndpoint::UserSettings::UserSettingsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new VirtualEndpointRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/virtualEndpoint{?%24expand,%24select}") + end + ## + ## Delete navigation property virtualEndpoint for deviceManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Virtual endpoint + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of virtual_endpoint + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::VirtualEndpoint.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property virtualEndpoint in deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of virtual_endpoint + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::VirtualEndpoint.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property virtualEndpoint for deviceManagement + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Virtual endpoint + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property virtualEndpoint in deviceManagement + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a virtual_endpoint_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return VirtualEndpointRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Virtual endpoint + class VirtualEndpointRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end +end diff --git a/lib/device_management/windows_autopilot_device_identities/count/count_request_builder.rb b/lib/device_management/windows_autopilot_device_identities/count/count_request_builder.rb index fa3f27dadd..c66181655d 100644 --- a/lib/device_management/windows_autopilot_device_identities/count/count_request_builder.rb +++ b/lib/device_management/windows_autopilot_device_identities/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsAutopilotDeviceIdentities/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsAutopilotDeviceIdentities/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/windows_autopilot_device_identities/item/assign_user_to_device/assign_user_to_device_post_request_body.rb b/lib/device_management/windows_autopilot_device_identities/item/assign_user_to_device/assign_user_to_device_post_request_body.rb index 2fd43dc060..a2081180cf 100644 --- a/lib/device_management/windows_autopilot_device_identities/item/assign_user_to_device/assign_user_to_device_post_request_body.rb +++ b/lib/device_management/windows_autopilot_device_identities/item/assign_user_to_device/assign_user_to_device_post_request_body.rb @@ -22,15 +22,15 @@ class AssignUserToDevicePostRequestBody # The userPrincipalName property @user_principal_name ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -52,7 +52,7 @@ def addressable_user_name=(value) @addressable_user_name = value end ## - ## Instantiates a new assignUserToDevicePostRequestBody and sets the default values. + ## Instantiates a new AssignUserToDevicePostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/windows_autopilot_device_identities/item/assign_user_to_device/assign_user_to_device_request_builder.rb b/lib/device_management/windows_autopilot_device_identities/item/assign_user_to_device/assign_user_to_device_request_builder.rb index f71734daf8..f8558022dd 100644 --- a/lib/device_management/windows_autopilot_device_identities/item/assign_user_to_device/assign_user_to_device_request_builder.rb +++ b/lib/device_management/windows_autopilot_device_identities/item/assign_user_to_device/assign_user_to_device_request_builder.rb @@ -36,8 +36,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assign_user_to_device_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignUserToDeviceRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/windows_autopilot_device_identities/item/unassign_user_from_device/unassign_user_from_device_request_builder.rb b/lib/device_management/windows_autopilot_device_identities/item/unassign_user_from_device/unassign_user_from_device_request_builder.rb index e727a0470a..2ac21084da 100644 --- a/lib/device_management/windows_autopilot_device_identities/item/unassign_user_from_device/unassign_user_from_device_request_builder.rb +++ b/lib/device_management/windows_autopilot_device_identities/item/unassign_user_from_device/unassign_user_from_device_request_builder.rb @@ -34,8 +34,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,15 +44,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a unassign_user_from_device_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UnassignUserFromDeviceRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/windows_autopilot_device_identities/item/update_device_properties/update_device_properties_post_request_body.rb b/lib/device_management/windows_autopilot_device_identities/item/update_device_properties/update_device_properties_post_request_body.rb index a7c33e1881..e35b5e167d 100644 --- a/lib/device_management/windows_autopilot_device_identities/item/update_device_properties/update_device_properties_post_request_body.rb +++ b/lib/device_management/windows_autopilot_device_identities/item/update_device_properties/update_device_properties_post_request_body.rb @@ -28,15 +28,15 @@ class UpdateDevicePropertiesPostRequestBody # The userPrincipalName property @user_principal_name ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -58,7 +58,7 @@ def addressable_user_name=(value) @addressable_user_name = value end ## - ## Instantiates a new updateDevicePropertiesPostRequestBody and sets the default values. + ## Instantiates a new UpdateDevicePropertiesPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/device_management/windows_autopilot_device_identities/item/update_device_properties/update_device_properties_request_builder.rb b/lib/device_management/windows_autopilot_device_identities/item/update_device_properties/update_device_properties_request_builder.rb index e368bd8774..43d67993a6 100644 --- a/lib/device_management/windows_autopilot_device_identities/item/update_device_properties/update_device_properties_request_builder.rb +++ b/lib/device_management/windows_autopilot_device_identities/item/update_device_properties/update_device_properties_request_builder.rb @@ -36,8 +36,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,16 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a update_device_properties_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UpdateDevicePropertiesRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/device_management/windows_autopilot_device_identities/item/windows_autopilot_device_identity_item_request_builder.rb b/lib/device_management/windows_autopilot_device_identities/item/windows_autopilot_device_identity_item_request_builder.rb index d79fed8446..3f6e55a8d3 100644 --- a/lib/device_management/windows_autopilot_device_identities/item/windows_autopilot_device_identity_item_request_builder.rb +++ b/lib/device_management/windows_autopilot_device_identities/item/windows_autopilot_device_identity_item_request_builder.rb @@ -39,7 +39,7 @@ def update_device_properties() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsAutopilotDeviceIdentities/{windowsAutopilotDeviceIdentity%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsAutopilotDeviceIdentities/{windowsAutopilotDeviceIdentity%2Did}{?%24expand,%24select}") end ## ## Deletes a windowsAutopilotDeviceIdentity. @@ -51,8 +51,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -65,8 +64,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsAutopilotDeviceIdentity.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,8 +79,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsAutopilotDeviceIdentity.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -92,13 +89,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -108,15 +106,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -128,17 +126,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a windows_autopilot_device_identity_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return WindowsAutopilotDeviceIdentityItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the windowsAutopilotDeviceIdentity object. diff --git a/lib/device_management/windows_autopilot_device_identities/windows_autopilot_device_identities_request_builder.rb b/lib/device_management/windows_autopilot_device_identities/windows_autopilot_device_identities_request_builder.rb index 3ad4b7daae..ada4c1f387 100644 --- a/lib/device_management/windows_autopilot_device_identities/windows_autopilot_device_identities_request_builder.rb +++ b/lib/device_management/windows_autopilot_device_identities/windows_autopilot_device_identities_request_builder.rb @@ -38,7 +38,7 @@ def by_windows_autopilot_device_identity_id(windows_autopilot_device_identity_id ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsAutopilotDeviceIdentities{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsAutopilotDeviceIdentities{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the windowsAutopilotDeviceIdentity objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsAutopilotDeviceIdentityCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsAutopilotDeviceIdentity.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a windows_autopilot_device_identities_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return WindowsAutopilotDeviceIdentitiesRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the windowsAutopilotDeviceIdentity objects. diff --git a/lib/device_management/windows_information_protection_app_learning_summaries/count/count_request_builder.rb b/lib/device_management/windows_information_protection_app_learning_summaries/count/count_request_builder.rb index 9df9474ec9..89e05a1e47 100644 --- a/lib/device_management/windows_information_protection_app_learning_summaries/count/count_request_builder.rb +++ b/lib/device_management/windows_information_protection_app_learning_summaries/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsInformationProtectionAppLearningSummaries/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsInformationProtectionAppLearningSummaries/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/windows_information_protection_app_learning_summaries/item/windows_information_protection_app_learning_summary_item_request_builder.rb b/lib/device_management/windows_information_protection_app_learning_summaries/item/windows_information_protection_app_learning_summary_item_request_builder.rb index 3ed60d76f0..f0b7736292 100644 --- a/lib/device_management/windows_information_protection_app_learning_summaries/item/windows_information_protection_app_learning_summary_item_request_builder.rb +++ b/lib/device_management/windows_information_protection_app_learning_summaries/item/windows_information_protection_app_learning_summary_item_request_builder.rb @@ -21,7 +21,7 @@ class WindowsInformationProtectionAppLearningSummaryItemRequestBuilder < Microso ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsInformationProtectionAppLearningSummaries/{windowsInformationProtectionAppLearningSummary%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsInformationProtectionAppLearningSummaries/{windowsInformationProtectionAppLearningSummary%2Did}{?%24expand,%24select}") end ## ## Deletes a windowsInformationProtectionAppLearningSummary. @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionAppLearningSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionAppLearningSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a windows_information_protection_app_learning_summary_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return WindowsInformationProtectionAppLearningSummaryItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the windowsInformationProtectionAppLearningSummary object. diff --git a/lib/device_management/windows_information_protection_app_learning_summaries/windows_information_protection_app_learning_summaries_request_builder.rb b/lib/device_management/windows_information_protection_app_learning_summaries/windows_information_protection_app_learning_summaries_request_builder.rb index 499b3854be..d9a8a21fa6 100644 --- a/lib/device_management/windows_information_protection_app_learning_summaries/windows_information_protection_app_learning_summaries_request_builder.rb +++ b/lib/device_management/windows_information_protection_app_learning_summaries/windows_information_protection_app_learning_summaries_request_builder.rb @@ -38,7 +38,7 @@ def by_windows_information_protection_app_learning_summary_id(windows_informatio ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsInformationProtectionAppLearningSummaries{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsInformationProtectionAppLearningSummaries{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the windowsInformationProtectionAppLearningSummary objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionAppLearningSummaryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionAppLearningSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a windows_information_protection_app_learning_summaries_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return WindowsInformationProtectionAppLearningSummariesRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the windowsInformationProtectionAppLearningSummary objects. diff --git a/lib/device_management/windows_information_protection_network_learning_summaries/count/count_request_builder.rb b/lib/device_management/windows_information_protection_network_learning_summaries/count/count_request_builder.rb index 00914b5411..7e240231f8 100644 --- a/lib/device_management/windows_information_protection_network_learning_summaries/count/count_request_builder.rb +++ b/lib/device_management/windows_information_protection_network_learning_summaries/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsInformationProtectionNetworkLearningSummaries/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsInformationProtectionNetworkLearningSummaries/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/windows_information_protection_network_learning_summaries/item/windows_information_protection_network_learning_summary_item_request_builder.rb b/lib/device_management/windows_information_protection_network_learning_summaries/item/windows_information_protection_network_learning_summary_item_request_builder.rb index ab4185f698..3eb5f5dad1 100644 --- a/lib/device_management/windows_information_protection_network_learning_summaries/item/windows_information_protection_network_learning_summary_item_request_builder.rb +++ b/lib/device_management/windows_information_protection_network_learning_summaries/item/windows_information_protection_network_learning_summary_item_request_builder.rb @@ -21,7 +21,7 @@ class WindowsInformationProtectionNetworkLearningSummaryItemRequestBuilder < Mic ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsInformationProtectionNetworkLearningSummaries/{windowsInformationProtectionNetworkLearningSummary%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsInformationProtectionNetworkLearningSummaries/{windowsInformationProtectionNetworkLearningSummary%2Did}{?%24expand,%24select}") end ## ## Deletes a windowsInformationProtectionNetworkLearningSummary. @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionNetworkLearningSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionNetworkLearningSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a windows_information_protection_network_learning_summary_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return WindowsInformationProtectionNetworkLearningSummaryItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the windowsInformationProtectionNetworkLearningSummary object. diff --git a/lib/device_management/windows_information_protection_network_learning_summaries/windows_information_protection_network_learning_summaries_request_builder.rb b/lib/device_management/windows_information_protection_network_learning_summaries/windows_information_protection_network_learning_summaries_request_builder.rb index 341d9499dd..42faded5e0 100644 --- a/lib/device_management/windows_information_protection_network_learning_summaries/windows_information_protection_network_learning_summaries_request_builder.rb +++ b/lib/device_management/windows_information_protection_network_learning_summaries/windows_information_protection_network_learning_summaries_request_builder.rb @@ -38,7 +38,7 @@ def by_windows_information_protection_network_learning_summary_id(windows_inform ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsInformationProtectionNetworkLearningSummaries{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsInformationProtectionNetworkLearningSummaries{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the windowsInformationProtectionNetworkLearningSummary objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionNetworkLearningSummaryCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsInformationProtectionNetworkLearningSummary.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a windows_information_protection_network_learning_summaries_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return WindowsInformationProtectionNetworkLearningSummariesRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the windowsInformationProtectionNetworkLearningSummary objects. diff --git a/lib/device_management/windows_malware_information/count/count_request_builder.rb b/lib/device_management/windows_malware_information/count/count_request_builder.rb index 85b5e4d855..05ca742509 100644 --- a/lib/device_management/windows_malware_information/count/count_request_builder.rb +++ b/lib/device_management/windows_malware_information/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsMalwareInformation/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsMalwareInformation/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/windows_malware_information/item/device_malware_states/count/count_request_builder.rb b/lib/device_management/windows_malware_information/item/device_malware_states/count/count_request_builder.rb index 7bcdd01e70..abea106f17 100644 --- a/lib/device_management/windows_malware_information/item/device_malware_states/count/count_request_builder.rb +++ b/lib/device_management/windows_malware_information/item/device_malware_states/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsMalwareInformation/{windowsMalwareInformation%2Did}/deviceMalwareStates/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsMalwareInformation/{windowsMalwareInformation%2Did}/deviceMalwareStates/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/device_management/windows_malware_information/item/device_malware_states/device_malware_states_request_builder.rb b/lib/device_management/windows_malware_information/item/device_malware_states/device_malware_states_request_builder.rb index 8e3c79be18..930617576e 100644 --- a/lib/device_management/windows_malware_information/item/device_malware_states/device_malware_states_request_builder.rb +++ b/lib/device_management/windows_malware_information/item/device_malware_states/device_malware_states_request_builder.rb @@ -42,7 +42,7 @@ def by_malware_state_for_windows_device_id(malware_state_for_windows_device_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsMalwareInformation/{windowsMalwareInformation%2Did}/deviceMalwareStates{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsMalwareInformation/{windowsMalwareInformation%2Did}/deviceMalwareStates{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the malwareStateForWindowsDevice objects. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MalwareStateForWindowsDeviceCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MalwareStateForWindowsDevice.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_malware_states_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceMalwareStatesRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the malwareStateForWindowsDevice objects. diff --git a/lib/device_management/windows_malware_information/item/device_malware_states/item/malware_state_for_windows_device_item_request_builder.rb b/lib/device_management/windows_malware_information/item/device_malware_states/item/malware_state_for_windows_device_item_request_builder.rb index 363550510e..2a2f82ddea 100644 --- a/lib/device_management/windows_malware_information/item/device_malware_states/item/malware_state_for_windows_device_item_request_builder.rb +++ b/lib/device_management/windows_malware_information/item/device_malware_states/item/malware_state_for_windows_device_item_request_builder.rb @@ -25,7 +25,7 @@ class MalwareStateForWindowsDeviceItemRequestBuilder < MicrosoftKiotaAbstraction ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsMalwareInformation/{windowsMalwareInformation%2Did}/deviceMalwareStates/{malwareStateForWindowsDevice%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsMalwareInformation/{windowsMalwareInformation%2Did}/deviceMalwareStates/{malwareStateForWindowsDevice%2Did}{?%24expand,%24select}") end ## ## Deletes a malwareStateForWindowsDevice. @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MalwareStateForWindowsDevice.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MalwareStateForWindowsDevice.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a malware_state_for_windows_device_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MalwareStateForWindowsDeviceItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the malwareStateForWindowsDevice object. diff --git a/lib/device_management/windows_malware_information/item/windows_malware_information_item_request_builder.rb b/lib/device_management/windows_malware_information/item/windows_malware_information_item_request_builder.rb index 7736d61f81..eb50fb78ca 100644 --- a/lib/device_management/windows_malware_information/item/windows_malware_information_item_request_builder.rb +++ b/lib/device_management/windows_malware_information/item/windows_malware_information_item_request_builder.rb @@ -27,7 +27,7 @@ def device_malware_states() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsMalwareInformation/{windowsMalwareInformation%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsMalwareInformation/{windowsMalwareInformation%2Did}{?%24expand,%24select}") end ## ## Deletes a windowsMalwareInformation. @@ -39,8 +39,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -53,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsMalwareInformation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -69,8 +67,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsMalwareInformation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -80,13 +77,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -96,15 +94,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -116,17 +114,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a windows_malware_information_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return WindowsMalwareInformationItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read properties and relationships of the windowsMalwareInformation object. diff --git a/lib/device_management/windows_malware_information/windows_malware_information_request_builder.rb b/lib/device_management/windows_malware_information/windows_malware_information_request_builder.rb index c5931b1fb8..9817875098 100644 --- a/lib/device_management/windows_malware_information/windows_malware_information_request_builder.rb +++ b/lib/device_management/windows_malware_information/windows_malware_information_request_builder.rb @@ -38,7 +38,7 @@ def by_windows_malware_information_id(windows_malware_information_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsMalwareInformation{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/deviceManagement/windowsMalwareInformation{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## List properties and relationships of the windowsMalwareInformation objects. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsMalwareInformationCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WindowsMalwareInformation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a windows_malware_information_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return WindowsMalwareInformationRequestBuilder.new(raw_url, @request_adapter) + end ## # List properties and relationships of the windowsMalwareInformation objects. diff --git a/lib/devices/count/count_request_builder.rb b/lib/devices/count/count_request_builder.rb index 5f51bdb81e..b43fd1c12f 100644 --- a/lib/devices/count/count_request_builder.rb +++ b/lib/devices/count/count_request_builder.rb @@ -18,7 +18,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/devices/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -30,8 +30,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -41,17 +40,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/devices/delta/delta.rb b/lib/devices/delta/delta.rb index 0c348d20cb..8a3dc08b72 100644 --- a/lib/devices/delta/delta.rb +++ b/lib/devices/delta/delta.rb @@ -1 +1 @@ -require_relative 'delta_response' +require_relative 'delta_get_response' diff --git a/lib/devices/delta/delta_get_response.rb b/lib/devices/delta/delta_get_response.rb new file mode 100644 index 0000000000..bdaf819f41 --- /dev/null +++ b/lib/devices/delta/delta_get_response.rb @@ -0,0 +1,69 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/base_delta_function_response' +require_relative '../../models/device' +require_relative '../devices' +require_relative './delta' + +module MicrosoftGraph + module Devices + module Delta + class DeltaGetResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new DeltaGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a delta_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return DeltaGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Device.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a device + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/devices/delta/delta_request_builder.rb b/lib/devices/delta/delta_request_builder.rb index 9e138d7e5c..f86e12b3a4 100644 --- a/lib/devices/delta/delta_request_builder.rb +++ b/lib/devices/delta/delta_request_builder.rb @@ -18,49 +18,60 @@ class DeltaRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/devices/delta(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Invoke function delta + ## Get newly created, updated, or deleted devices without performing a full read of the entire resource collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of delta_response + ## @return a Fiber of delta_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Devices::Delta::DeltaResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Devices::Delta::DeltaGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Invoke function delta + ## Get newly created, updated, or deleted devices without performing a full read of the entire resource collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a delta_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeltaRequestBuilder.new(raw_url, @request_adapter) + end ## - # Invoke function delta + # Get newly created, updated, or deleted devices without performing a full read of the entire resource collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. class DeltaRequestBuilderGetQueryParameters ## # Include count of items attr_accessor :count ## + # Expand related entities + attr_accessor :expand + ## # Filter items by property values attr_accessor :filter ## @@ -88,6 +99,8 @@ def get_query_parameter(original_name) case original_name when "count" return "%24count" + when "expand" + return "%24expand" when "filter" return "%24filter" when "orderby" diff --git a/lib/devices/delta/delta_response.rb b/lib/devices/delta/delta_response.rb deleted file mode 100644 index d97bf929c1..0000000000 --- a/lib/devices/delta/delta_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../microsoft_graph' -require_relative '../../models/base_delta_function_response' -require_relative '../../models/device' -require_relative '../devices' -require_relative './delta' - -module MicrosoftGraph - module Devices - module Delta - class DeltaResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new deltaResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a delta_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return DeltaResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Device.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a device - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end -end diff --git a/lib/devices/devices_request_builder.rb b/lib/devices/devices_request_builder.rb index 35c53a452b..d8e9a60801 100644 --- a/lib/devices/devices_request_builder.rb +++ b/lib/devices/devices_request_builder.rb @@ -60,7 +60,7 @@ def by_device_id(device_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Retrieve a list of device objects registered in the organization. @@ -72,8 +72,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -88,8 +87,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Device.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -99,15 +97,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -119,17 +117,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a devices_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DevicesRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve a list of device objects registered in the organization. diff --git a/lib/devices/get_available_extension_properties/get_available_extension_properties.rb b/lib/devices/get_available_extension_properties/get_available_extension_properties.rb index b6fee576bf..ce1b642cad 100644 --- a/lib/devices/get_available_extension_properties/get_available_extension_properties.rb +++ b/lib/devices/get_available_extension_properties/get_available_extension_properties.rb @@ -1,2 +1,2 @@ require_relative 'get_available_extension_properties_post_request_body' -require_relative 'get_available_extension_properties_response' +require_relative 'get_available_extension_properties_post_response' diff --git a/lib/devices/get_available_extension_properties/get_available_extension_properties_post_request_body.rb b/lib/devices/get_available_extension_properties/get_available_extension_properties_post_request_body.rb index 3719770d59..fcb1ae776b 100644 --- a/lib/devices/get_available_extension_properties/get_available_extension_properties_post_request_body.rb +++ b/lib/devices/get_available_extension_properties/get_available_extension_properties_post_request_body.rb @@ -15,22 +15,22 @@ class GetAvailableExtensionPropertiesPostRequestBody # The isSyncedFromOnPremises property @is_synced_from_on_premises ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getAvailableExtensionPropertiesPostRequestBody and sets the default values. + ## Instantiates a new GetAvailableExtensionPropertiesPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/devices/get_available_extension_properties/get_available_extension_properties_post_response.rb b/lib/devices/get_available_extension_properties/get_available_extension_properties_post_response.rb new file mode 100644 index 0000000000..b7d342aec1 --- /dev/null +++ b/lib/devices/get_available_extension_properties/get_available_extension_properties_post_response.rb @@ -0,0 +1,69 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/base_collection_pagination_count_response' +require_relative '../../models/extension_property' +require_relative '../devices' +require_relative './get_available_extension_properties' + +module MicrosoftGraph + module Devices + module GetAvailableExtensionProperties + class GetAvailableExtensionPropertiesPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetAvailableExtensionPropertiesPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_available_extension_properties_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetAvailableExtensionPropertiesPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ExtensionProperty.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a extension_property + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/devices/get_available_extension_properties/get_available_extension_properties_request_builder.rb b/lib/devices/get_available_extension_properties/get_available_extension_properties_request_builder.rb index aec86d3a8a..6c7617c2eb 100644 --- a/lib/devices/get_available_extension_properties/get_available_extension_properties_request_builder.rb +++ b/lib/devices/get_available_extension_properties/get_available_extension_properties_request_builder.rb @@ -21,10 +21,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/devices/getAvailableExtensionProperties") end ## - ## Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + ## Return all directory extension definitions that are registered in a directory, including through multitenant apps. The following entities support extension properties: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_available_extension_properties_response + ## @return a Fiber of get_available_extension_properties_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -32,12 +32,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Devices::GetAvailableExtensionProperties::GetAvailableExtensionPropertiesResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Devices::GetAvailableExtensionProperties::GetAvailableExtensionPropertiesPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + ## Return all directory extension definitions that are registered in a directory, including through multitenant apps. The following entities support extension properties: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -45,17 +44,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_available_extension_properties_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetAvailableExtensionPropertiesRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/devices/get_available_extension_properties/get_available_extension_properties_response.rb b/lib/devices/get_available_extension_properties/get_available_extension_properties_response.rb deleted file mode 100644 index e7b29e451a..0000000000 --- a/lib/devices/get_available_extension_properties/get_available_extension_properties_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../microsoft_graph' -require_relative '../../models/base_collection_pagination_count_response' -require_relative '../../models/extension_property' -require_relative '../devices' -require_relative './get_available_extension_properties' - -module MicrosoftGraph - module Devices - module GetAvailableExtensionProperties - class GetAvailableExtensionPropertiesResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getAvailableExtensionPropertiesResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_available_extension_properties_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetAvailableExtensionPropertiesResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ExtensionProperty.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a extension_property - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end -end diff --git a/lib/devices/get_by_ids/get_by_ids.rb b/lib/devices/get_by_ids/get_by_ids.rb index e4b0824834..131a179969 100644 --- a/lib/devices/get_by_ids/get_by_ids.rb +++ b/lib/devices/get_by_ids/get_by_ids.rb @@ -1,2 +1,2 @@ require_relative 'get_by_ids_post_request_body' -require_relative 'get_by_ids_response' +require_relative 'get_by_ids_post_response' diff --git a/lib/devices/get_by_ids/get_by_ids_post_request_body.rb b/lib/devices/get_by_ids/get_by_ids_post_request_body.rb index 297e327e9d..30762e7bd8 100644 --- a/lib/devices/get_by_ids/get_by_ids_post_request_body.rb +++ b/lib/devices/get_by_ids/get_by_ids_post_request_body.rb @@ -18,22 +18,22 @@ class GetByIdsPostRequestBody # The types property @types ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getByIdsPostRequestBody and sets the default values. + ## Instantiates a new GetByIdsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/devices/get_by_ids/get_by_ids_post_response.rb b/lib/devices/get_by_ids/get_by_ids_post_response.rb new file mode 100644 index 0000000000..ab4d32f232 --- /dev/null +++ b/lib/devices/get_by_ids/get_by_ids_post_response.rb @@ -0,0 +1,69 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/base_collection_pagination_count_response' +require_relative '../../models/directory_object' +require_relative '../devices' +require_relative './get_by_ids' + +module MicrosoftGraph + module Devices + module GetByIds + class GetByIdsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetByIdsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_by_ids_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetByIdsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a directory_object + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/devices/get_by_ids/get_by_ids_request_builder.rb b/lib/devices/get_by_ids/get_by_ids_request_builder.rb index 249fafaaa5..78a5e884f4 100644 --- a/lib/devices/get_by_ids/get_by_ids_request_builder.rb +++ b/lib/devices/get_by_ids/get_by_ids_request_builder.rb @@ -24,7 +24,7 @@ def initialize(path_parameters, request_adapter) ## Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_by_ids_response + ## @return a Fiber of get_by_ids_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -32,9 +32,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Devices::GetByIds::GetByIdsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Devices::GetByIds::GetByIdsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: @@ -45,17 +44,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_by_ids_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetByIdsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/devices/get_by_ids/get_by_ids_response.rb b/lib/devices/get_by_ids/get_by_ids_response.rb deleted file mode 100644 index 47f9afb7b1..0000000000 --- a/lib/devices/get_by_ids/get_by_ids_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../microsoft_graph' -require_relative '../../models/base_collection_pagination_count_response' -require_relative '../../models/directory_object' -require_relative '../devices' -require_relative './get_by_ids' - -module MicrosoftGraph - module Devices - module GetByIds - class GetByIdsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getByIdsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_by_ids_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetByIdsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a directory_object - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end -end diff --git a/lib/devices/item/check_member_groups/check_member_groups.rb b/lib/devices/item/check_member_groups/check_member_groups.rb index 938b908522..98148024fe 100644 --- a/lib/devices/item/check_member_groups/check_member_groups.rb +++ b/lib/devices/item/check_member_groups/check_member_groups.rb @@ -1,2 +1,2 @@ require_relative 'check_member_groups_post_request_body' -require_relative 'check_member_groups_response' +require_relative 'check_member_groups_post_response' diff --git a/lib/devices/item/check_member_groups/check_member_groups_post_request_body.rb b/lib/devices/item/check_member_groups/check_member_groups_post_request_body.rb index 4b6766ef36..2c16ee916d 100644 --- a/lib/devices/item/check_member_groups/check_member_groups_post_request_body.rb +++ b/lib/devices/item/check_member_groups/check_member_groups_post_request_body.rb @@ -17,22 +17,22 @@ class CheckMemberGroupsPostRequestBody # The groupIds property @group_ids ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new checkMemberGroupsPostRequestBody and sets the default values. + ## Instantiates a new CheckMemberGroupsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/devices/item/check_member_groups/check_member_groups_post_response.rb b/lib/devices/item/check_member_groups/check_member_groups_post_response.rb new file mode 100644 index 0000000000..f875b8bd6d --- /dev/null +++ b/lib/devices/item/check_member_groups/check_member_groups_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../devices' +require_relative '../item' +require_relative './check_member_groups' + +module MicrosoftGraph + module Devices + module Item + module CheckMemberGroups + class CheckMemberGroupsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new CheckMemberGroupsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a check_member_groups_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CheckMemberGroupsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/devices/item/check_member_groups/check_member_groups_request_builder.rb b/lib/devices/item/check_member_groups/check_member_groups_request_builder.rb index 4a5bb58f55..52e50a3a31 100644 --- a/lib/devices/item/check_member_groups/check_member_groups_request_builder.rb +++ b/lib/devices/item/check_member_groups/check_member_groups_request_builder.rb @@ -23,10 +23,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/checkMemberGroups") end ## - ## Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + ## Check for membership in a specified list of group IDs, and return from that list the IDs of groups where a specified object is a member. The specified object can be of one of the following types:- user- group- service principal- organizational contact- device- directory object This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of check_member_groups_response + ## @return a Fiber of check_member_groups_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,12 +34,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Devices::Item::CheckMemberGroups::CheckMemberGroupsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Devices::Item::CheckMemberGroups::CheckMemberGroupsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + ## Check for membership in a specified list of group IDs, and return from that list the IDs of groups where a specified object is a member. The specified object can be of one of the following types:- user- group- service principal- organizational contact- device- directory object This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a check_member_groups_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CheckMemberGroupsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/devices/item/check_member_groups/check_member_groups_response.rb b/lib/devices/item/check_member_groups/check_member_groups_response.rb deleted file mode 100644 index c6da849c2d..0000000000 --- a/lib/devices/item/check_member_groups/check_member_groups_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../devices' -require_relative '../item' -require_relative './check_member_groups' - -module MicrosoftGraph - module Devices - module Item - module CheckMemberGroups - class CheckMemberGroupsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new checkMemberGroupsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a check_member_groups_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return CheckMemberGroupsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/devices/item/check_member_objects/check_member_objects.rb b/lib/devices/item/check_member_objects/check_member_objects.rb index 67fbf971e7..1826285d49 100644 --- a/lib/devices/item/check_member_objects/check_member_objects.rb +++ b/lib/devices/item/check_member_objects/check_member_objects.rb @@ -1,2 +1,2 @@ require_relative 'check_member_objects_post_request_body' -require_relative 'check_member_objects_response' +require_relative 'check_member_objects_post_response' diff --git a/lib/devices/item/check_member_objects/check_member_objects_post_request_body.rb b/lib/devices/item/check_member_objects/check_member_objects_post_request_body.rb index 963c124fec..7b7b609728 100644 --- a/lib/devices/item/check_member_objects/check_member_objects_post_request_body.rb +++ b/lib/devices/item/check_member_objects/check_member_objects_post_request_body.rb @@ -17,22 +17,22 @@ class CheckMemberObjectsPostRequestBody # The ids property @ids ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new checkMemberObjectsPostRequestBody and sets the default values. + ## Instantiates a new CheckMemberObjectsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/devices/item/check_member_objects/check_member_objects_post_response.rb b/lib/devices/item/check_member_objects/check_member_objects_post_response.rb new file mode 100644 index 0000000000..5c2c95657d --- /dev/null +++ b/lib/devices/item/check_member_objects/check_member_objects_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../devices' +require_relative '../item' +require_relative './check_member_objects' + +module MicrosoftGraph + module Devices + module Item + module CheckMemberObjects + class CheckMemberObjectsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new CheckMemberObjectsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a check_member_objects_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CheckMemberObjectsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/devices/item/check_member_objects/check_member_objects_request_builder.rb b/lib/devices/item/check_member_objects/check_member_objects_request_builder.rb index cb4d7907ef..fd3e27a76b 100644 --- a/lib/devices/item/check_member_objects/check_member_objects_request_builder.rb +++ b/lib/devices/item/check_member_objects/check_member_objects_request_builder.rb @@ -26,7 +26,7 @@ def initialize(path_parameters, request_adapter) ## Invoke action checkMemberObjects ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of check_member_objects_response + ## @return a Fiber of check_member_objects_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,9 +34,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Devices::Item::CheckMemberObjects::CheckMemberObjectsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Devices::Item::CheckMemberObjects::CheckMemberObjectsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Invoke action checkMemberObjects @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a check_member_objects_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CheckMemberObjectsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/devices/item/check_member_objects/check_member_objects_response.rb b/lib/devices/item/check_member_objects/check_member_objects_response.rb deleted file mode 100644 index 36e0821201..0000000000 --- a/lib/devices/item/check_member_objects/check_member_objects_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../devices' -require_relative '../item' -require_relative './check_member_objects' - -module MicrosoftGraph - module Devices - module Item - module CheckMemberObjects - class CheckMemberObjectsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new checkMemberObjectsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a check_member_objects_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return CheckMemberObjectsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/devices/item/device_item_request_builder.rb b/lib/devices/item/device_item_request_builder.rb index a2cb5a60a0..1b53e94d67 100644 --- a/lib/devices/item/device_item_request_builder.rb +++ b/lib/devices/item/device_item_request_builder.rb @@ -79,7 +79,7 @@ def transitive_member_of() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}{?%24expand,%24select}") end ## ## Delete a registered device. @@ -91,8 +91,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -105,8 +104,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Device.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -121,8 +119,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Device.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -132,13 +129,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -148,15 +146,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -168,17 +166,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the properties and relationships of a device object. diff --git a/lib/devices/item/extensions/count/count_request_builder.rb b/lib/devices/item/extensions/count/count_request_builder.rb index eca909b80e..c61b7f499d 100644 --- a/lib/devices/item/extensions/count/count_request_builder.rb +++ b/lib/devices/item/extensions/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/extensions/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/extensions/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/devices/item/extensions/extensions_request_builder.rb b/lib/devices/item/extensions/extensions_request_builder.rb index 1574b727a7..c6c0f2d77a 100644 --- a/lib/devices/item/extensions/extensions_request_builder.rb +++ b/lib/devices/item/extensions/extensions_request_builder.rb @@ -40,7 +40,7 @@ def by_extension_id(extension_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/extensions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/extensions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## The collection of open extensions defined for the device. Read-only. Nullable. @@ -52,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExtensionCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -68,8 +67,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Extension.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -79,15 +77,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -99,17 +97,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a extensions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ExtensionsRequestBuilder.new(raw_url, @request_adapter) + end ## # The collection of open extensions defined for the device. Read-only. Nullable. diff --git a/lib/devices/item/extensions/item/extension_item_request_builder.rb b/lib/devices/item/extensions/item/extension_item_request_builder.rb index 3e15351fca..193464dcf5 100644 --- a/lib/devices/item/extensions/item/extension_item_request_builder.rb +++ b/lib/devices/item/extensions/item/extension_item_request_builder.rb @@ -23,7 +23,7 @@ class ExtensionItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuild ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/extensions/{extension%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/extensions/{extension%2Did}{?%24expand,%24select}") end ## ## Delete navigation property extensions for devices @@ -35,8 +35,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Extension.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -65,8 +63,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Extension.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,13 +73,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -92,15 +90,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,17 +110,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a extension_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ExtensionItemRequestBuilder.new(raw_url, @request_adapter) + end ## # The collection of open extensions defined for the device. Read-only. Nullable. diff --git a/lib/devices/item/get_member_groups/get_member_groups.rb b/lib/devices/item/get_member_groups/get_member_groups.rb index 0a25b012ea..9190b99738 100644 --- a/lib/devices/item/get_member_groups/get_member_groups.rb +++ b/lib/devices/item/get_member_groups/get_member_groups.rb @@ -1,2 +1,2 @@ require_relative 'get_member_groups_post_request_body' -require_relative 'get_member_groups_response' +require_relative 'get_member_groups_post_response' diff --git a/lib/devices/item/get_member_groups/get_member_groups_post_request_body.rb b/lib/devices/item/get_member_groups/get_member_groups_post_request_body.rb index fd52a2a35c..5a136f195a 100644 --- a/lib/devices/item/get_member_groups/get_member_groups_post_request_body.rb +++ b/lib/devices/item/get_member_groups/get_member_groups_post_request_body.rb @@ -17,22 +17,22 @@ class GetMemberGroupsPostRequestBody # The securityEnabledOnly property @security_enabled_only ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getMemberGroupsPostRequestBody and sets the default values. + ## Instantiates a new GetMemberGroupsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/devices/item/get_member_groups/get_member_groups_post_response.rb b/lib/devices/item/get_member_groups/get_member_groups_post_response.rb new file mode 100644 index 0000000000..252bccd09c --- /dev/null +++ b/lib/devices/item/get_member_groups/get_member_groups_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../devices' +require_relative '../item' +require_relative './get_member_groups' + +module MicrosoftGraph + module Devices + module Item + module GetMemberGroups + class GetMemberGroupsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetMemberGroupsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_member_groups_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetMemberGroupsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/devices/item/get_member_groups/get_member_groups_request_builder.rb b/lib/devices/item/get_member_groups/get_member_groups_request_builder.rb index c1f08b62ad..8a5f607812 100644 --- a/lib/devices/item/get_member_groups/get_member_groups_request_builder.rb +++ b/lib/devices/item/get_member_groups/get_member_groups_request_builder.rb @@ -23,10 +23,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/getMemberGroups") end ## - ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. + ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the DirectoryResultSizeLimitExceeded error code. If you get the DirectoryResultSizeLimitExceeded error code, use the List group transitive memberOf API instead. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_member_groups_response + ## @return a Fiber of get_member_groups_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,12 +34,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Devices::Item::GetMemberGroups::GetMemberGroupsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Devices::Item::GetMemberGroups::GetMemberGroupsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. + ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the DirectoryResultSizeLimitExceeded error code. If you get the DirectoryResultSizeLimitExceeded error code, use the List group transitive memberOf API instead. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_member_groups_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetMemberGroupsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/devices/item/get_member_groups/get_member_groups_response.rb b/lib/devices/item/get_member_groups/get_member_groups_response.rb deleted file mode 100644 index a43bd7853f..0000000000 --- a/lib/devices/item/get_member_groups/get_member_groups_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../devices' -require_relative '../item' -require_relative './get_member_groups' - -module MicrosoftGraph - module Devices - module Item - module GetMemberGroups - class GetMemberGroupsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getMemberGroupsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_member_groups_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetMemberGroupsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/devices/item/get_member_objects/get_member_objects.rb b/lib/devices/item/get_member_objects/get_member_objects.rb index 40edad6b9e..f7a486b0f9 100644 --- a/lib/devices/item/get_member_objects/get_member_objects.rb +++ b/lib/devices/item/get_member_objects/get_member_objects.rb @@ -1,2 +1,2 @@ require_relative 'get_member_objects_post_request_body' -require_relative 'get_member_objects_response' +require_relative 'get_member_objects_post_response' diff --git a/lib/devices/item/get_member_objects/get_member_objects_post_request_body.rb b/lib/devices/item/get_member_objects/get_member_objects_post_request_body.rb index 07fb9b6363..af32723d5a 100644 --- a/lib/devices/item/get_member_objects/get_member_objects_post_request_body.rb +++ b/lib/devices/item/get_member_objects/get_member_objects_post_request_body.rb @@ -17,22 +17,22 @@ class GetMemberObjectsPostRequestBody # The securityEnabledOnly property @security_enabled_only ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getMemberObjectsPostRequestBody and sets the default values. + ## Instantiates a new GetMemberObjectsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/devices/item/get_member_objects/get_member_objects_post_response.rb b/lib/devices/item/get_member_objects/get_member_objects_post_response.rb new file mode 100644 index 0000000000..cf38378c41 --- /dev/null +++ b/lib/devices/item/get_member_objects/get_member_objects_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../devices' +require_relative '../item' +require_relative './get_member_objects' + +module MicrosoftGraph + module Devices + module Item + module GetMemberObjects + class GetMemberObjectsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetMemberObjectsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_member_objects_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetMemberObjectsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/devices/item/get_member_objects/get_member_objects_request_builder.rb b/lib/devices/item/get_member_objects/get_member_objects_request_builder.rb index a9cf556d34..6479494bc9 100644 --- a/lib/devices/item/get_member_objects/get_member_objects_request_builder.rb +++ b/lib/devices/item/get_member_objects/get_member_objects_request_builder.rb @@ -23,10 +23,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/getMemberObjects") end ## - ## Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + ## Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:- user- group- service principal- organizational contact- device- directory object This function is transitive. Only users and role-enabled groups can be members of directory roles. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_member_objects_response + ## @return a Fiber of get_member_objects_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,12 +34,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Devices::Item::GetMemberObjects::GetMemberObjectsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Devices::Item::GetMemberObjects::GetMemberObjectsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + ## Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:- user- group- service principal- organizational contact- device- directory object This function is transitive. Only users and role-enabled groups can be members of directory roles. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_member_objects_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetMemberObjectsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/devices/item/get_member_objects/get_member_objects_response.rb b/lib/devices/item/get_member_objects/get_member_objects_response.rb deleted file mode 100644 index ec92635464..0000000000 --- a/lib/devices/item/get_member_objects/get_member_objects_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../devices' -require_relative '../item' -require_relative './get_member_objects' - -module MicrosoftGraph - module Devices - module Item - module GetMemberObjects - class GetMemberObjectsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getMemberObjectsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_member_objects_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetMemberObjectsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/devices/item/member_of/count/count_request_builder.rb b/lib/devices/item/member_of/count/count_request_builder.rb index 11d3643963..99d623aafa 100644 --- a/lib/devices/item/member_of/count/count_request_builder.rb +++ b/lib/devices/item/member_of/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/memberOf/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/memberOf/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/devices/item/member_of/graph_administrative_unit/count/count_request_builder.rb b/lib/devices/item/member_of/graph_administrative_unit/count/count_request_builder.rb index 9df5c07899..a9d2e0cfeb 100644 --- a/lib/devices/item/member_of/graph_administrative_unit/count/count_request_builder.rb +++ b/lib/devices/item/member_of/graph_administrative_unit/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/memberOf/graph.administrativeUnit/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/memberOf/graph.administrativeUnit/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/devices/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.rb b/lib/devices/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.rb index 9dde637390..9b28146e07 100644 --- a/lib/devices/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.rb +++ b/lib/devices/item/member_of/graph_administrative_unit/graph_administrative_unit_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/memberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/memberOf/graph.administrativeUnit{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AdministrativeUnitCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_administrative_unit_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphAdministrativeUnitRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection diff --git a/lib/devices/item/member_of/graph_group/count/count_request_builder.rb b/lib/devices/item/member_of/graph_group/count/count_request_builder.rb index e089b29011..bc06f348da 100644 --- a/lib/devices/item/member_of/graph_group/count/count_request_builder.rb +++ b/lib/devices/item/member_of/graph_group/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/memberOf/graph.group/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/memberOf/graph.group/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/devices/item/member_of/graph_group/graph_group_request_builder.rb b/lib/devices/item/member_of/graph_group/graph_group_request_builder.rb index 3524a7acd3..09c1c8aebf 100644 --- a/lib/devices/item/member_of/graph_group/graph_group_request_builder.rb +++ b/lib/devices/item/member_of/graph_group/graph_group_request_builder.rb @@ -29,10 +29,10 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/memberOf/graph.group{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/memberOf/graph.group{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection + ## Get groups and administrative units that this device is a direct member of. This operation is not transitive. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of group_collection_response ## @@ -41,31 +41,39 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::GroupCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection + ## Get groups and administrative units that this device is a direct member of. This operation is not transitive. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_group_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphGroupRequestBuilder.new(raw_url, @request_adapter) + end ## - # Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection + # Get groups and administrative units that this device is a direct member of. This operation is not transitive. class GraphGroupRequestBuilderGetQueryParameters ## diff --git a/lib/devices/item/member_of/item/directory_object_item_request_builder.rb b/lib/devices/item/member_of/item/directory_object_item_request_builder.rb index 26fb4f1205..74f20369b5 100644 --- a/lib/devices/item/member_of/item/directory_object_item_request_builder.rb +++ b/lib/devices/item/member_of/item/directory_object_item_request_builder.rb @@ -35,7 +35,7 @@ def graph_group() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/memberOf/{directoryObject%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/memberOf/{directoryObject%2Did}{?%24expand,%24select}") end ## ## Groups and administrative units that this device is a member of. Read-only. Nullable. Supports $expand. @@ -47,8 +47,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -58,17 +57,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a directory_object_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DirectoryObjectItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Groups and administrative units that this device is a member of. Read-only. Nullable. Supports $expand. diff --git a/lib/devices/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.rb b/lib/devices/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.rb index d1bf5d4dbd..7c06419355 100644 --- a/lib/devices/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.rb +++ b/lib/devices/item/member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.rb @@ -25,7 +25,7 @@ class GraphAdministrativeUnitRequestBuilder < MicrosoftKiotaAbstractions::BaseRe ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/memberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/memberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AdministrativeUnit.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_administrative_unit_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphAdministrativeUnitRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit diff --git a/lib/devices/item/member_of/item/graph_group/graph_group_request_builder.rb b/lib/devices/item/member_of/item/graph_group/graph_group_request_builder.rb index de112f7a7e..f5f597ca78 100644 --- a/lib/devices/item/member_of/item/graph_group/graph_group_request_builder.rb +++ b/lib/devices/item/member_of/item/graph_group/graph_group_request_builder.rb @@ -25,10 +25,10 @@ class GraphGroupRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/memberOf/{directoryObject%2Did}/graph.group{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/memberOf/{directoryObject%2Did}/graph.group{?%24expand,%24select}") end ## - ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.group + ## Get groups and administrative units that this device is a direct member of. This operation is not transitive. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of group ## @@ -37,31 +37,39 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Group.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.group + ## Get groups and administrative units that this device is a direct member of. This operation is not transitive. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_group_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphGroupRequestBuilder.new(raw_url, @request_adapter) + end ## - # Get the item of type microsoft.graph.directoryObject as microsoft.graph.group + # Get groups and administrative units that this device is a direct member of. This operation is not transitive. class GraphGroupRequestBuilderGetQueryParameters ## diff --git a/lib/devices/item/member_of/member_of_request_builder.rb b/lib/devices/item/member_of/member_of_request_builder.rb index 8968813413..185caa58a2 100644 --- a/lib/devices/item/member_of/member_of_request_builder.rb +++ b/lib/devices/item/member_of/member_of_request_builder.rb @@ -51,10 +51,10 @@ def by_directory_object_id(directory_object_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/memberOf{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/memberOf{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Groups and administrative units that this device is a member of. Read-only. Nullable. Supports $expand. + ## Get groups and administrative units that this device is a direct member of. This operation is not transitive. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_object_collection_response ## @@ -63,31 +63,39 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObjectCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Groups and administrative units that this device is a member of. Read-only. Nullable. Supports $expand. + ## Get groups and administrative units that this device is a direct member of. This operation is not transitive. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a member_of_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MemberOfRequestBuilder.new(raw_url, @request_adapter) + end ## - # Groups and administrative units that this device is a member of. Read-only. Nullable. Supports $expand. + # Get groups and administrative units that this device is a direct member of. This operation is not transitive. class MemberOfRequestBuilderGetQueryParameters ## diff --git a/lib/devices/item/registered_owners/count/count_request_builder.rb b/lib/devices/item/registered_owners/count/count_request_builder.rb index dfafa27d7a..98327cf39c 100644 --- a/lib/devices/item/registered_owners/count/count_request_builder.rb +++ b/lib/devices/item/registered_owners/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/devices/item/registered_owners/graph_app_role_assignment/count/count_request_builder.rb b/lib/devices/item/registered_owners/graph_app_role_assignment/count/count_request_builder.rb index 4334b587b1..611c3d26ed 100644 --- a/lib/devices/item/registered_owners/graph_app_role_assignment/count/count_request_builder.rb +++ b/lib/devices/item/registered_owners/graph_app_role_assignment/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/graph.appRoleAssignment/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/graph.appRoleAssignment/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/devices/item/registered_owners/graph_app_role_assignment/graph_app_role_assignment_request_builder.rb b/lib/devices/item/registered_owners/graph_app_role_assignment/graph_app_role_assignment_request_builder.rb index a20b7fc80e..d591e41cd6 100644 --- a/lib/devices/item/registered_owners/graph_app_role_assignment/graph_app_role_assignment_request_builder.rb +++ b/lib/devices/item/registered_owners/graph_app_role_assignment/graph_app_role_assignment_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/graph.appRoleAssignment{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/graph.appRoleAssignment{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.appRoleAssignment in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AppRoleAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_app_role_assignment_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphAppRoleAssignmentRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.appRoleAssignment in the microsoft.graph.directoryObject collection diff --git a/lib/devices/item/registered_owners/graph_endpoint/count/count_request_builder.rb b/lib/devices/item/registered_owners/graph_endpoint/count/count_request_builder.rb index e44fd855af..3e4dd13941 100644 --- a/lib/devices/item/registered_owners/graph_endpoint/count/count_request_builder.rb +++ b/lib/devices/item/registered_owners/graph_endpoint/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/graph.endpoint/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/graph.endpoint/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/devices/item/registered_owners/graph_endpoint/graph_endpoint_request_builder.rb b/lib/devices/item/registered_owners/graph_endpoint/graph_endpoint_request_builder.rb index 33c9125892..4dd956e5ba 100644 --- a/lib/devices/item/registered_owners/graph_endpoint/graph_endpoint_request_builder.rb +++ b/lib/devices/item/registered_owners/graph_endpoint/graph_endpoint_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/graph.endpoint{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/graph.endpoint{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.endpoint in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::EndpointCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_endpoint_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphEndpointRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.endpoint in the microsoft.graph.directoryObject collection diff --git a/lib/devices/item/registered_owners/graph_service_principal/count/count_request_builder.rb b/lib/devices/item/registered_owners/graph_service_principal/count/count_request_builder.rb index 1acd77edb1..ee9963e8a2 100644 --- a/lib/devices/item/registered_owners/graph_service_principal/count/count_request_builder.rb +++ b/lib/devices/item/registered_owners/graph_service_principal/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/graph.servicePrincipal/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/graph.servicePrincipal/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/devices/item/registered_owners/graph_service_principal/graph_service_principal_request_builder.rb b/lib/devices/item/registered_owners/graph_service_principal/graph_service_principal_request_builder.rb index 6c51e4afaa..9d3f9feddc 100644 --- a/lib/devices/item/registered_owners/graph_service_principal/graph_service_principal_request_builder.rb +++ b/lib/devices/item/registered_owners/graph_service_principal/graph_service_principal_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/graph.servicePrincipal{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/graph.servicePrincipal{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.servicePrincipal in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServicePrincipalCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_service_principal_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphServicePrincipalRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.servicePrincipal in the microsoft.graph.directoryObject collection diff --git a/lib/devices/item/registered_owners/graph_user/count/count_request_builder.rb b/lib/devices/item/registered_owners/graph_user/count/count_request_builder.rb index 1baf4a1a84..4cc50e5e65 100644 --- a/lib/devices/item/registered_owners/graph_user/count/count_request_builder.rb +++ b/lib/devices/item/registered_owners/graph_user/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/graph.user/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/graph.user/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/devices/item/registered_owners/graph_user/graph_user_request_builder.rb b/lib/devices/item/registered_owners/graph_user/graph_user_request_builder.rb index 92fb8ee8f8..6455271905 100644 --- a/lib/devices/item/registered_owners/graph_user/graph_user_request_builder.rb +++ b/lib/devices/item/registered_owners/graph_user/graph_user_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/graph.user{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/graph.user{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.user in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_user_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphUserRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.user in the microsoft.graph.directoryObject collection diff --git a/lib/devices/item/registered_owners/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.rb b/lib/devices/item/registered_owners/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.rb index 2e7ea72ef1..ab2b095665 100644 --- a/lib/devices/item/registered_owners/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.rb +++ b/lib/devices/item/registered_owners/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.rb @@ -25,7 +25,7 @@ class GraphAppRoleAssignmentRequestBuilder < MicrosoftKiotaAbstractions::BaseReq ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/{directoryObject%2Did}/graph.appRoleAssignment{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/{directoryObject%2Did}/graph.appRoleAssignment{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.appRoleAssignment @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AppRoleAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_app_role_assignment_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphAppRoleAssignmentRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.appRoleAssignment diff --git a/lib/devices/item/registered_owners/item/graph_endpoint/graph_endpoint_request_builder.rb b/lib/devices/item/registered_owners/item/graph_endpoint/graph_endpoint_request_builder.rb index 96320fa3e5..dbe3697b5b 100644 --- a/lib/devices/item/registered_owners/item/graph_endpoint/graph_endpoint_request_builder.rb +++ b/lib/devices/item/registered_owners/item/graph_endpoint/graph_endpoint_request_builder.rb @@ -25,7 +25,7 @@ class GraphEndpointRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuild ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/{directoryObject%2Did}/graph.endpoint{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/{directoryObject%2Did}/graph.endpoint{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.endpoint @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Endpoint.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_endpoint_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphEndpointRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.endpoint diff --git a/lib/devices/item/registered_owners/item/graph_service_principal/graph_service_principal_request_builder.rb b/lib/devices/item/registered_owners/item/graph_service_principal/graph_service_principal_request_builder.rb index fae7efec78..b5d4844817 100644 --- a/lib/devices/item/registered_owners/item/graph_service_principal/graph_service_principal_request_builder.rb +++ b/lib/devices/item/registered_owners/item/graph_service_principal/graph_service_principal_request_builder.rb @@ -25,7 +25,7 @@ class GraphServicePrincipalRequestBuilder < MicrosoftKiotaAbstractions::BaseRequ ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/{directoryObject%2Did}/graph.servicePrincipal{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/{directoryObject%2Did}/graph.servicePrincipal{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.servicePrincipal @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServicePrincipal.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_service_principal_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphServicePrincipalRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.servicePrincipal diff --git a/lib/devices/item/registered_owners/item/graph_user/graph_user_request_builder.rb b/lib/devices/item/registered_owners/item/graph_user/graph_user_request_builder.rb index 9a6acf7136..e1999ce698 100644 --- a/lib/devices/item/registered_owners/item/graph_user/graph_user_request_builder.rb +++ b/lib/devices/item/registered_owners/item/graph_user/graph_user_request_builder.rb @@ -25,7 +25,7 @@ class GraphUserRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/{directoryObject%2Did}/graph.user{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/{directoryObject%2Did}/graph.user{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.user @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::User.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_user_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphUserRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.user diff --git a/lib/devices/item/registered_owners/item/ref/ref_request_builder.rb b/lib/devices/item/registered_owners/item/ref/ref_request_builder.rb index 920c53c687..b5e8c738e7 100644 --- a/lib/devices/item/registered_owners/item/ref/ref_request_builder.rb +++ b/lib/devices/item/registered_owners/item/ref/ref_request_builder.rb @@ -24,7 +24,7 @@ class RefRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/{directoryObject%2Did}/$ref{?%40id*}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/{directoryObject%2Did}/$ref") end ## ## Remove a user as a registered owner of the device. @@ -36,8 +36,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,38 +46,24 @@ def delete(request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end - ## - # Remove a user as a registered owner of the device. - class RefRequestBuilderDeleteQueryParameters - - ## - # Delete Uri - attr_accessor :id - ## - ## Maps the query parameters names to their encoded names for the URI template parsing. - ## @param original_name The original query parameter name in the class. - ## @return a string - ## - def get_query_parameter(original_name) - raise StandardError, 'original_name cannot be null' if original_name.nil? - case original_name - when "id" - return "%40id" - else - return original_name - end - end + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ref_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RefRequestBuilder.new(raw_url, @request_adapter) end end end diff --git a/lib/devices/item/registered_owners/ref/ref_request_builder.rb b/lib/devices/item/registered_owners/ref/ref_request_builder.rb index f28c82e8f9..f5bc278408 100644 --- a/lib/devices/item/registered_owners/ref/ref_request_builder.rb +++ b/lib/devices/item/registered_owners/ref/ref_request_builder.rb @@ -24,10 +24,23 @@ class RefRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/$ref{?%24top,%24skip,%24search,%24filter,%24count,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners/$ref?@id={%40id}{&%24count,%24filter,%24orderby,%24search,%24skip,%24top}") end ## - ## The user that cloud joined the device or registered their personal device. The registered owner is set at the time of registration. Read-only. Nullable. Supports $expand. + ## Remove a user as a registered owner of the device. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Retrieve a list of users that are registered owners of the device. A registered owner is the user that cloud joined the device or registered their personal device. The registered owner is set at the time of registration. Currently, there can be only one owner. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of string_collection_response ## @@ -36,8 +49,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::StringCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,26 +64,43 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## The user that cloud joined the device or registered their personal device. The registered owner is set at the time of registration. Read-only. Nullable. Supports $expand. + ## Remove a user as a registered owner of the device. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## - def to_get_request_information(request_configuration=nil) + def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = '{+baseurl}/devices/{device%2Did}/registeredOwners/$ref?@id={%40id}' request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Retrieve a list of users that are registered owners of the device. A registered owner is the user that cloud joined the device or registered their personal device. The registered owner is set at the time of registration. Currently, there can be only one owner. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = '{+baseurl}/devices/{device%2Did}/registeredOwners/$ref{?%24count,%24filter,%24orderby,%24search,%24skip,%24top}' + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -83,19 +112,52 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = '{+baseurl}/devices/{device%2Did}/registeredOwners/$ref' + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ref_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RefRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Remove a user as a registered owner of the device. + class RefRequestBuilderDeleteQueryParameters + + ## + # The delete Uri + attr_accessor :id + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "id" + return "%40id" + else + return original_name + end + end + end ## - # The user that cloud joined the device or registered their personal device. The registered owner is set at the time of registration. Read-only. Nullable. Supports $expand. + # Retrieve a list of users that are registered owners of the device. A registered owner is the user that cloud joined the device or registered their personal device. The registered owner is set at the time of registration. Currently, there can be only one owner. class RefRequestBuilderGetQueryParameters ## diff --git a/lib/devices/item/registered_owners/registered_owners_request_builder.rb b/lib/devices/item/registered_owners/registered_owners_request_builder.rb index 7cd32b81ae..0b5acd96dc 100644 --- a/lib/devices/item/registered_owners/registered_owners_request_builder.rb +++ b/lib/devices/item/registered_owners/registered_owners_request_builder.rb @@ -53,7 +53,7 @@ def ref() end ## ## Gets an item from the MicrosoftGraph.devices.item.registeredOwners.item collection - ## @param directory_object_id Unique identifier of the item + ## @param directory_object_id The unique identifier of directoryObject ## @return a directory_object_item_request_builder ## def by_directory_object_id(directory_object_id) @@ -69,10 +69,10 @@ def by_directory_object_id(directory_object_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredOwners{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## The user that cloud joined the device or registered their personal device. The registered owner is set at the time of registration. Read-only. Nullable. Supports $expand. + ## Retrieve a list of users that are registered owners of the device. A registered owner is the user that cloud joined the device or registered their personal device. The registered owner is set at the time of registration. Currently, there can be only one owner. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_object_collection_response ## @@ -81,31 +81,39 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObjectCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## The user that cloud joined the device or registered their personal device. The registered owner is set at the time of registration. Read-only. Nullable. Supports $expand. + ## Retrieve a list of users that are registered owners of the device. A registered owner is the user that cloud joined the device or registered their personal device. The registered owner is set at the time of registration. Currently, there can be only one owner. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a registered_owners_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RegisteredOwnersRequestBuilder.new(raw_url, @request_adapter) + end ## - # The user that cloud joined the device or registered their personal device. The registered owner is set at the time of registration. Read-only. Nullable. Supports $expand. + # Retrieve a list of users that are registered owners of the device. A registered owner is the user that cloud joined the device or registered their personal device. The registered owner is set at the time of registration. Currently, there can be only one owner. class RegisteredOwnersRequestBuilderGetQueryParameters ## diff --git a/lib/devices/item/registered_users/count/count_request_builder.rb b/lib/devices/item/registered_users/count/count_request_builder.rb index 0ebb761244..eb31fa6910 100644 --- a/lib/devices/item/registered_users/count/count_request_builder.rb +++ b/lib/devices/item/registered_users/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/devices/item/registered_users/graph_app_role_assignment/count/count_request_builder.rb b/lib/devices/item/registered_users/graph_app_role_assignment/count/count_request_builder.rb index a71cac18dc..b814d5b1cc 100644 --- a/lib/devices/item/registered_users/graph_app_role_assignment/count/count_request_builder.rb +++ b/lib/devices/item/registered_users/graph_app_role_assignment/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/graph.appRoleAssignment/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/graph.appRoleAssignment/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/devices/item/registered_users/graph_app_role_assignment/graph_app_role_assignment_request_builder.rb b/lib/devices/item/registered_users/graph_app_role_assignment/graph_app_role_assignment_request_builder.rb index 6849ab816d..6ba891af39 100644 --- a/lib/devices/item/registered_users/graph_app_role_assignment/graph_app_role_assignment_request_builder.rb +++ b/lib/devices/item/registered_users/graph_app_role_assignment/graph_app_role_assignment_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/graph.appRoleAssignment{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/graph.appRoleAssignment{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.appRoleAssignment in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AppRoleAssignmentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_app_role_assignment_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphAppRoleAssignmentRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.appRoleAssignment in the microsoft.graph.directoryObject collection diff --git a/lib/devices/item/registered_users/graph_endpoint/count/count_request_builder.rb b/lib/devices/item/registered_users/graph_endpoint/count/count_request_builder.rb index 0b8cbf1814..f3d28682d5 100644 --- a/lib/devices/item/registered_users/graph_endpoint/count/count_request_builder.rb +++ b/lib/devices/item/registered_users/graph_endpoint/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/graph.endpoint/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/graph.endpoint/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/devices/item/registered_users/graph_endpoint/graph_endpoint_request_builder.rb b/lib/devices/item/registered_users/graph_endpoint/graph_endpoint_request_builder.rb index 917e51b175..2be5176f3e 100644 --- a/lib/devices/item/registered_users/graph_endpoint/graph_endpoint_request_builder.rb +++ b/lib/devices/item/registered_users/graph_endpoint/graph_endpoint_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/graph.endpoint{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/graph.endpoint{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.endpoint in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::EndpointCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_endpoint_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphEndpointRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.endpoint in the microsoft.graph.directoryObject collection diff --git a/lib/devices/item/registered_users/graph_service_principal/count/count_request_builder.rb b/lib/devices/item/registered_users/graph_service_principal/count/count_request_builder.rb index 1157deadce..199fae4803 100644 --- a/lib/devices/item/registered_users/graph_service_principal/count/count_request_builder.rb +++ b/lib/devices/item/registered_users/graph_service_principal/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/graph.servicePrincipal/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/graph.servicePrincipal/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/devices/item/registered_users/graph_service_principal/graph_service_principal_request_builder.rb b/lib/devices/item/registered_users/graph_service_principal/graph_service_principal_request_builder.rb index e0c15e73f8..6fa26a8cf1 100644 --- a/lib/devices/item/registered_users/graph_service_principal/graph_service_principal_request_builder.rb +++ b/lib/devices/item/registered_users/graph_service_principal/graph_service_principal_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/graph.servicePrincipal{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/graph.servicePrincipal{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.servicePrincipal in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServicePrincipalCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_service_principal_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphServicePrincipalRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.servicePrincipal in the microsoft.graph.directoryObject collection diff --git a/lib/devices/item/registered_users/graph_user/count/count_request_builder.rb b/lib/devices/item/registered_users/graph_user/count/count_request_builder.rb index 97056c9999..3cf6ffdef4 100644 --- a/lib/devices/item/registered_users/graph_user/count/count_request_builder.rb +++ b/lib/devices/item/registered_users/graph_user/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/graph.user/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/graph.user/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/devices/item/registered_users/graph_user/graph_user_request_builder.rb b/lib/devices/item/registered_users/graph_user/graph_user_request_builder.rb index 2be2d95d6d..73c0144ca9 100644 --- a/lib/devices/item/registered_users/graph_user/graph_user_request_builder.rb +++ b/lib/devices/item/registered_users/graph_user/graph_user_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/graph.user{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/graph.user{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.user in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_user_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphUserRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.user in the microsoft.graph.directoryObject collection diff --git a/lib/devices/item/registered_users/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.rb b/lib/devices/item/registered_users/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.rb index f618fc7d67..a90f137e75 100644 --- a/lib/devices/item/registered_users/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.rb +++ b/lib/devices/item/registered_users/item/graph_app_role_assignment/graph_app_role_assignment_request_builder.rb @@ -25,7 +25,7 @@ class GraphAppRoleAssignmentRequestBuilder < MicrosoftKiotaAbstractions::BaseReq ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/{directoryObject%2Did}/graph.appRoleAssignment{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/{directoryObject%2Did}/graph.appRoleAssignment{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.appRoleAssignment @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AppRoleAssignment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_app_role_assignment_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphAppRoleAssignmentRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.appRoleAssignment diff --git a/lib/devices/item/registered_users/item/graph_endpoint/graph_endpoint_request_builder.rb b/lib/devices/item/registered_users/item/graph_endpoint/graph_endpoint_request_builder.rb index 5c3a10ba66..012156c45e 100644 --- a/lib/devices/item/registered_users/item/graph_endpoint/graph_endpoint_request_builder.rb +++ b/lib/devices/item/registered_users/item/graph_endpoint/graph_endpoint_request_builder.rb @@ -25,7 +25,7 @@ class GraphEndpointRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuild ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/{directoryObject%2Did}/graph.endpoint{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/{directoryObject%2Did}/graph.endpoint{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.endpoint @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Endpoint.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_endpoint_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphEndpointRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.endpoint diff --git a/lib/devices/item/registered_users/item/graph_service_principal/graph_service_principal_request_builder.rb b/lib/devices/item/registered_users/item/graph_service_principal/graph_service_principal_request_builder.rb index 2496575e52..b2409eacc2 100644 --- a/lib/devices/item/registered_users/item/graph_service_principal/graph_service_principal_request_builder.rb +++ b/lib/devices/item/registered_users/item/graph_service_principal/graph_service_principal_request_builder.rb @@ -25,7 +25,7 @@ class GraphServicePrincipalRequestBuilder < MicrosoftKiotaAbstractions::BaseRequ ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/{directoryObject%2Did}/graph.servicePrincipal{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/{directoryObject%2Did}/graph.servicePrincipal{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.servicePrincipal @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServicePrincipal.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_service_principal_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphServicePrincipalRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.servicePrincipal diff --git a/lib/devices/item/registered_users/item/graph_user/graph_user_request_builder.rb b/lib/devices/item/registered_users/item/graph_user/graph_user_request_builder.rb index f80e84c07a..564a12e33c 100644 --- a/lib/devices/item/registered_users/item/graph_user/graph_user_request_builder.rb +++ b/lib/devices/item/registered_users/item/graph_user/graph_user_request_builder.rb @@ -25,7 +25,7 @@ class GraphUserRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/{directoryObject%2Did}/graph.user{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/{directoryObject%2Did}/graph.user{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.user @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::User.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_user_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphUserRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.user diff --git a/lib/devices/item/registered_users/item/ref/ref_request_builder.rb b/lib/devices/item/registered_users/item/ref/ref_request_builder.rb index ba820720bd..e052faeb21 100644 --- a/lib/devices/item/registered_users/item/ref/ref_request_builder.rb +++ b/lib/devices/item/registered_users/item/ref/ref_request_builder.rb @@ -24,7 +24,7 @@ class RefRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/{directoryObject%2Did}/$ref{?%40id*}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/{directoryObject%2Did}/$ref") end ## ## Remove a user as a registered user of the device. @@ -36,8 +36,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,38 +46,24 @@ def delete(request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end - ## - # Remove a user as a registered user of the device. - class RefRequestBuilderDeleteQueryParameters - - ## - # Delete Uri - attr_accessor :id - ## - ## Maps the query parameters names to their encoded names for the URI template parsing. - ## @param original_name The original query parameter name in the class. - ## @return a string - ## - def get_query_parameter(original_name) - raise StandardError, 'original_name cannot be null' if original_name.nil? - case original_name - when "id" - return "%40id" - else - return original_name - end - end + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ref_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RefRequestBuilder.new(raw_url, @request_adapter) end end end diff --git a/lib/devices/item/registered_users/ref/ref_request_builder.rb b/lib/devices/item/registered_users/ref/ref_request_builder.rb index e16ade79fa..c65e081b8b 100644 --- a/lib/devices/item/registered_users/ref/ref_request_builder.rb +++ b/lib/devices/item/registered_users/ref/ref_request_builder.rb @@ -24,10 +24,23 @@ class RefRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/$ref{?%24top,%24skip,%24search,%24filter,%24count,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers/$ref?@id={%40id}{&%24count,%24filter,%24orderby,%24search,%24skip,%24top}") end ## - ## Collection of registered users of the device. For cloud joined devices and registered personal devices, registered users are set to the same value as registered owners at the time of registration. Read-only. Nullable. Supports $expand. + ## Remove a user as a registered user of the device. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Retrieve a list of users that are registered users of the device. For cloud joined devices and registered personal devices, registered users are set to the same value as registered owners at the time of registration. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of string_collection_response ## @@ -36,8 +49,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::StringCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,26 +64,43 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Collection of registered users of the device. For cloud joined devices and registered personal devices, registered users are set to the same value as registered owners at the time of registration. Read-only. Nullable. Supports $expand. + ## Remove a user as a registered user of the device. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## - def to_get_request_information(request_configuration=nil) + def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = '{+baseurl}/devices/{device%2Did}/registeredUsers/$ref?@id={%40id}' request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Retrieve a list of users that are registered users of the device. For cloud joined devices and registered personal devices, registered users are set to the same value as registered owners at the time of registration. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = '{+baseurl}/devices/{device%2Did}/registeredUsers/$ref{?%24count,%24filter,%24orderby,%24search,%24skip,%24top}' + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -83,19 +112,52 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = '{+baseurl}/devices/{device%2Did}/registeredUsers/$ref' + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ref_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RefRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Remove a user as a registered user of the device. + class RefRequestBuilderDeleteQueryParameters + + ## + # The delete Uri + attr_accessor :id + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "id" + return "%40id" + else + return original_name + end + end + end ## - # Collection of registered users of the device. For cloud joined devices and registered personal devices, registered users are set to the same value as registered owners at the time of registration. Read-only. Nullable. Supports $expand. + # Retrieve a list of users that are registered users of the device. For cloud joined devices and registered personal devices, registered users are set to the same value as registered owners at the time of registration. class RefRequestBuilderGetQueryParameters ## diff --git a/lib/devices/item/registered_users/registered_users_request_builder.rb b/lib/devices/item/registered_users/registered_users_request_builder.rb index 16b81f02a5..8f461940f3 100644 --- a/lib/devices/item/registered_users/registered_users_request_builder.rb +++ b/lib/devices/item/registered_users/registered_users_request_builder.rb @@ -53,7 +53,7 @@ def ref() end ## ## Gets an item from the MicrosoftGraph.devices.item.registeredUsers.item collection - ## @param directory_object_id Unique identifier of the item + ## @param directory_object_id The unique identifier of directoryObject ## @return a directory_object_item_request_builder ## def by_directory_object_id(directory_object_id) @@ -69,10 +69,10 @@ def by_directory_object_id(directory_object_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/registeredUsers{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Collection of registered users of the device. For cloud joined devices and registered personal devices, registered users are set to the same value as registered owners at the time of registration. Read-only. Nullable. Supports $expand. + ## Retrieve a list of users that are registered users of the device. For cloud joined devices and registered personal devices, registered users are set to the same value as registered owners at the time of registration. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_object_collection_response ## @@ -81,31 +81,39 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObjectCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Collection of registered users of the device. For cloud joined devices and registered personal devices, registered users are set to the same value as registered owners at the time of registration. Read-only. Nullable. Supports $expand. + ## Retrieve a list of users that are registered users of the device. For cloud joined devices and registered personal devices, registered users are set to the same value as registered owners at the time of registration. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a registered_users_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RegisteredUsersRequestBuilder.new(raw_url, @request_adapter) + end ## - # Collection of registered users of the device. For cloud joined devices and registered personal devices, registered users are set to the same value as registered owners at the time of registration. Read-only. Nullable. Supports $expand. + # Retrieve a list of users that are registered users of the device. For cloud joined devices and registered personal devices, registered users are set to the same value as registered owners at the time of registration. class RegisteredUsersRequestBuilderGetQueryParameters ## diff --git a/lib/devices/item/restore/restore_request_builder.rb b/lib/devices/item/restore/restore_request_builder.rb index 94da25431c..5a628b5feb 100644 --- a/lib/devices/item/restore/restore_request_builder.rb +++ b/lib/devices/item/restore/restore_request_builder.rb @@ -24,7 +24,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/restore") end ## - ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. Restore a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_object ## @@ -33,27 +33,35 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. Restore a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a restore_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RestoreRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/devices/item/transitive_member_of/count/count_request_builder.rb b/lib/devices/item/transitive_member_of/count/count_request_builder.rb index 94e1db0b49..ed488e45c5 100644 --- a/lib/devices/item/transitive_member_of/count/count_request_builder.rb +++ b/lib/devices/item/transitive_member_of/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/transitiveMemberOf/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/transitiveMemberOf/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/devices/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.rb b/lib/devices/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.rb index 1ca9108d8c..ea670533d5 100644 --- a/lib/devices/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.rb +++ b/lib/devices/item/transitive_member_of/graph_administrative_unit/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/transitiveMemberOf/graph.administrativeUnit/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/transitiveMemberOf/graph.administrativeUnit/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/devices/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.rb b/lib/devices/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.rb index b8d64ca8fd..2c38283b2d 100644 --- a/lib/devices/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.rb +++ b/lib/devices/item/transitive_member_of/graph_administrative_unit/graph_administrative_unit_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/transitiveMemberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/transitiveMemberOf/graph.administrativeUnit{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AdministrativeUnitCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_administrative_unit_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphAdministrativeUnitRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection diff --git a/lib/devices/item/transitive_member_of/graph_group/count/count_request_builder.rb b/lib/devices/item/transitive_member_of/graph_group/count/count_request_builder.rb index 0bacf93718..16478ccc34 100644 --- a/lib/devices/item/transitive_member_of/graph_group/count/count_request_builder.rb +++ b/lib/devices/item/transitive_member_of/graph_group/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/transitiveMemberOf/graph.group/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/transitiveMemberOf/graph.group/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/devices/item/transitive_member_of/graph_group/graph_group_request_builder.rb b/lib/devices/item/transitive_member_of/graph_group/graph_group_request_builder.rb index a60f4b52af..1cbe00cf06 100644 --- a/lib/devices/item/transitive_member_of/graph_group/graph_group_request_builder.rb +++ b/lib/devices/item/transitive_member_of/graph_group/graph_group_request_builder.rb @@ -29,10 +29,10 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/transitiveMemberOf/graph.group{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/transitiveMemberOf/graph.group{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection + ## Get the groups and administrative units that the device is a member of. This API request is transitive, and will also return all groups and administrative units the device is a nested member of. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of group_collection_response ## @@ -41,31 +41,39 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::GroupCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection + ## Get the groups and administrative units that the device is a member of. This API request is transitive, and will also return all groups and administrative units the device is a nested member of. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_group_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphGroupRequestBuilder.new(raw_url, @request_adapter) + end ## - # Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection + # Get the groups and administrative units that the device is a member of. This API request is transitive, and will also return all groups and administrative units the device is a nested member of. class GraphGroupRequestBuilderGetQueryParameters ## diff --git a/lib/devices/item/transitive_member_of/item/directory_object_item_request_builder.rb b/lib/devices/item/transitive_member_of/item/directory_object_item_request_builder.rb index d592b1f547..14cbc0b819 100644 --- a/lib/devices/item/transitive_member_of/item/directory_object_item_request_builder.rb +++ b/lib/devices/item/transitive_member_of/item/directory_object_item_request_builder.rb @@ -35,7 +35,7 @@ def graph_group() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/transitiveMemberOf/{directoryObject%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/transitiveMemberOf/{directoryObject%2Did}{?%24expand,%24select}") end ## ## Groups and administrative units that the device is a member of. This operation is transitive. Supports $expand. @@ -47,8 +47,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -58,17 +57,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a directory_object_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DirectoryObjectItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Groups and administrative units that the device is a member of. This operation is transitive. Supports $expand. diff --git a/lib/devices/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.rb b/lib/devices/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.rb index d217bf67e0..ab67e0fedf 100644 --- a/lib/devices/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.rb +++ b/lib/devices/item/transitive_member_of/item/graph_administrative_unit/graph_administrative_unit_request_builder.rb @@ -25,7 +25,7 @@ class GraphAdministrativeUnitRequestBuilder < MicrosoftKiotaAbstractions::BaseRe ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/transitiveMemberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/transitiveMemberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AdministrativeUnit.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_administrative_unit_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphAdministrativeUnitRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit diff --git a/lib/devices/item/transitive_member_of/item/graph_group/graph_group_request_builder.rb b/lib/devices/item/transitive_member_of/item/graph_group/graph_group_request_builder.rb index ff40eb8111..08bce5e10e 100644 --- a/lib/devices/item/transitive_member_of/item/graph_group/graph_group_request_builder.rb +++ b/lib/devices/item/transitive_member_of/item/graph_group/graph_group_request_builder.rb @@ -25,10 +25,10 @@ class GraphGroupRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/transitiveMemberOf/{directoryObject%2Did}/graph.group{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/transitiveMemberOf/{directoryObject%2Did}/graph.group{?%24expand,%24select}") end ## - ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.group + ## Get the groups and administrative units that the device is a member of. This API request is transitive, and will also return all groups and administrative units the device is a nested member of. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of group ## @@ -37,31 +37,39 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Group.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.group + ## Get the groups and administrative units that the device is a member of. This API request is transitive, and will also return all groups and administrative units the device is a nested member of. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_group_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphGroupRequestBuilder.new(raw_url, @request_adapter) + end ## - # Get the item of type microsoft.graph.directoryObject as microsoft.graph.group + # Get the groups and administrative units that the device is a member of. This API request is transitive, and will also return all groups and administrative units the device is a nested member of. class GraphGroupRequestBuilderGetQueryParameters ## diff --git a/lib/devices/item/transitive_member_of/transitive_member_of_request_builder.rb b/lib/devices/item/transitive_member_of/transitive_member_of_request_builder.rb index de4a9ff0ee..d012cf6d7b 100644 --- a/lib/devices/item/transitive_member_of/transitive_member_of_request_builder.rb +++ b/lib/devices/item/transitive_member_of/transitive_member_of_request_builder.rb @@ -51,10 +51,10 @@ def by_directory_object_id(directory_object_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/transitiveMemberOf{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices/{device%2Did}/transitiveMemberOf{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Groups and administrative units that the device is a member of. This operation is transitive. Supports $expand. + ## Get the groups and administrative units that the device is a member of. This API request is transitive, and will also return all groups and administrative units the device is a nested member of. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_object_collection_response ## @@ -63,31 +63,39 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObjectCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Groups and administrative units that the device is a member of. This operation is transitive. Supports $expand. + ## Get the groups and administrative units that the device is a member of. This API request is transitive, and will also return all groups and administrative units the device is a nested member of. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a transitive_member_of_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return TransitiveMemberOfRequestBuilder.new(raw_url, @request_adapter) + end ## - # Groups and administrative units that the device is a member of. This operation is transitive. Supports $expand. + # Get the groups and administrative units that the device is a member of. This API request is transitive, and will also return all groups and administrative units the device is a nested member of. class TransitiveMemberOfRequestBuilderGetQueryParameters ## diff --git a/lib/devices/validate_properties/validate_properties_post_request_body.rb b/lib/devices/validate_properties/validate_properties_post_request_body.rb index 91a09604ce..46ef2cbf2b 100644 --- a/lib/devices/validate_properties/validate_properties_post_request_body.rb +++ b/lib/devices/validate_properties/validate_properties_post_request_body.rb @@ -24,22 +24,22 @@ class ValidatePropertiesPostRequestBody # The onBehalfOfUserId property @on_behalf_of_user_id ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new validatePropertiesPostRequestBody and sets the default values. + ## Instantiates a new ValidatePropertiesPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/devices/validate_properties/validate_properties_request_builder.rb b/lib/devices/validate_properties/validate_properties_request_builder.rb index 3dd8785ea8..c5cbce10f4 100644 --- a/lib/devices/validate_properties/validate_properties_request_builder.rb +++ b/lib/devices/validate_properties/validate_properties_request_builder.rb @@ -21,7 +21,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/devices/validateProperties") end ## - ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you're only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void @@ -32,12 +32,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you're only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -45,16 +44,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a validate_properties_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ValidatePropertiesRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/devices_with_device_id/devices_with_device_id_request_builder.rb b/lib/devices_with_device_id/devices_with_device_id_request_builder.rb index 4537224d6c..81dd711574 100644 --- a/lib/devices_with_device_id/devices_with_device_id_request_builder.rb +++ b/lib/devices_with_device_id/devices_with_device_id_request_builder.rb @@ -18,7 +18,7 @@ class DevicesWithDeviceIdRequestBuilder < MicrosoftKiotaAbstractions::BaseReques ## @return a void ## def initialize(path_parameters, request_adapter, device_id=nil) - super(path_parameters, request_adapter, "{+baseurl}/devices(deviceId='{deviceId}'){?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/devices(deviceId='{deviceId}'){?%24expand,%24select}") end ## ## Delete a registered device. @@ -30,8 +30,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -44,8 +43,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Device.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -60,8 +58,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Device.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -71,13 +68,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -87,15 +85,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -107,17 +105,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a devices_with_device_id_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DevicesWithDeviceIdRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the properties and relationships of a device object. diff --git a/lib/directory/administrative_units/administrative_units_request_builder.rb b/lib/directory/administrative_units/administrative_units_request_builder.rb index 5c9ac93965..ad30f033bd 100644 --- a/lib/directory/administrative_units/administrative_units_request_builder.rb +++ b/lib/directory/administrative_units/administrative_units_request_builder.rb @@ -44,7 +44,7 @@ def by_administrative_unit_id(administrative_unit_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Retrieve a list of administrativeUnit objects. @@ -56,12 +56,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AdministrativeUnitCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Use this API to create a new administrativeUnit. + ## Create a new administrativeUnit. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of administrative_unit @@ -72,8 +71,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AdministrativeUnit.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -83,19 +81,19 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Use this API to create a new administrativeUnit. + ## Create a new administrativeUnit. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -103,17 +101,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a administrative_units_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AdministrativeUnitsRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve a list of administrativeUnit objects. diff --git a/lib/directory/administrative_units/count/count_request_builder.rb b/lib/directory/administrative_units/count/count_request_builder.rb index ba838329f6..c6da08a632 100644 --- a/lib/directory/administrative_units/count/count_request_builder.rb +++ b/lib/directory/administrative_units/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory/administrative_units/delta/delta.rb b/lib/directory/administrative_units/delta/delta.rb index 0c348d20cb..8a3dc08b72 100644 --- a/lib/directory/administrative_units/delta/delta.rb +++ b/lib/directory/administrative_units/delta/delta.rb @@ -1 +1 @@ -require_relative 'delta_response' +require_relative 'delta_get_response' diff --git a/lib/directory/administrative_units/delta/delta_get_response.rb b/lib/directory/administrative_units/delta/delta_get_response.rb new file mode 100644 index 0000000000..fcaeeb2fed --- /dev/null +++ b/lib/directory/administrative_units/delta/delta_get_response.rb @@ -0,0 +1,72 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/administrative_unit' +require_relative '../../../models/base_delta_function_response' +require_relative '../../directory' +require_relative '../administrative_units' +require_relative './delta' + +module MicrosoftGraph + module Directory + module AdministrativeUnits + module Delta + class DeltaGetResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new DeltaGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a delta_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return DeltaGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AdministrativeUnit.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a administrative_unit + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/directory/administrative_units/delta/delta_request_builder.rb b/lib/directory/administrative_units/delta/delta_request_builder.rb index 70ec2af70b..62b50bc895 100644 --- a/lib/directory/administrative_units/delta/delta_request_builder.rb +++ b/lib/directory/administrative_units/delta/delta_request_builder.rb @@ -20,21 +20,20 @@ class DeltaRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/delta(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Invoke function delta ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of delta_response + ## @return a Fiber of delta_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Directory::AdministrativeUnits::Delta::DeltaResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Directory::AdministrativeUnits::Delta::DeltaGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Invoke function delta @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a delta_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeltaRequestBuilder.new(raw_url, @request_adapter) + end ## # Invoke function delta @@ -63,6 +71,9 @@ class DeltaRequestBuilderGetQueryParameters # Include count of items attr_accessor :count ## + # Expand related entities + attr_accessor :expand + ## # Filter items by property values attr_accessor :filter ## @@ -90,6 +101,8 @@ def get_query_parameter(original_name) case original_name when "count" return "%24count" + when "expand" + return "%24expand" when "filter" return "%24filter" when "orderby" diff --git a/lib/directory/administrative_units/delta/delta_response.rb b/lib/directory/administrative_units/delta/delta_response.rb deleted file mode 100644 index 18211dfc3a..0000000000 --- a/lib/directory/administrative_units/delta/delta_response.rb +++ /dev/null @@ -1,72 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/administrative_unit' -require_relative '../../../models/base_delta_function_response' -require_relative '../../directory' -require_relative '../administrative_units' -require_relative './delta' - -module MicrosoftGraph - module Directory - module AdministrativeUnits - module Delta - class DeltaResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new deltaResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a delta_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return DeltaResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AdministrativeUnit.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a administrative_unit - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/directory/administrative_units/item/administrative_unit_item_request_builder.rb b/lib/directory/administrative_units/item/administrative_unit_item_request_builder.rb index 65625b0b6e..1929fe597d 100644 --- a/lib/directory/administrative_units/item/administrative_unit_item_request_builder.rb +++ b/lib/directory/administrative_units/item/administrative_unit_item_request_builder.rb @@ -39,7 +39,7 @@ def scoped_role_members() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}{?%24expand,%24select}") end ## ## Delete an administrativeUnit. @@ -51,12 +51,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Retrieve the properties and relationships of an administrativeUnit object. + ## Retrieve the properties and relationships of an administrativeUnit object. The administrativeUnit resource supports extensions, which also allows you to use the GET operation to get custom properties and extension data in an administrativeUnit instance. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of administrative_unit ## @@ -65,8 +64,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AdministrativeUnit.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,8 +79,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AdministrativeUnit.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -92,31 +89,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Retrieve the properties and relationships of an administrativeUnit object. + ## Retrieve the properties and relationships of an administrativeUnit object. The administrativeUnit resource supports extensions, which also allows you to use the GET operation to get custom properties and extension data in an administrativeUnit instance. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -128,20 +126,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a administrative_unit_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AdministrativeUnitItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Retrieve the properties and relationships of an administrativeUnit object. + # Retrieve the properties and relationships of an administrativeUnit object. The administrativeUnit resource supports extensions, which also allows you to use the GET operation to get custom properties and extension data in an administrativeUnit instance. class AdministrativeUnitItemRequestBuilderGetQueryParameters ## diff --git a/lib/directory/administrative_units/item/extensions/count/count_request_builder.rb b/lib/directory/administrative_units/item/extensions/count/count_request_builder.rb index 4c161e627c..6f4060b6a5 100644 --- a/lib/directory/administrative_units/item/extensions/count/count_request_builder.rb +++ b/lib/directory/administrative_units/item/extensions/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/extensions/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/extensions/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory/administrative_units/item/extensions/extensions_request_builder.rb b/lib/directory/administrative_units/item/extensions/extensions_request_builder.rb index 562eb25716..ff346cbe79 100644 --- a/lib/directory/administrative_units/item/extensions/extensions_request_builder.rb +++ b/lib/directory/administrative_units/item/extensions/extensions_request_builder.rb @@ -42,7 +42,7 @@ def by_extension_id(extension_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/extensions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/extensions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## The collection of open extensions defined for this administrative unit. Nullable. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExtensionCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Extension.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a extensions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ExtensionsRequestBuilder.new(raw_url, @request_adapter) + end ## # The collection of open extensions defined for this administrative unit. Nullable. diff --git a/lib/directory/administrative_units/item/extensions/item/extension_item_request_builder.rb b/lib/directory/administrative_units/item/extensions/item/extension_item_request_builder.rb index 45b152e57d..c9de442c2b 100644 --- a/lib/directory/administrative_units/item/extensions/item/extension_item_request_builder.rb +++ b/lib/directory/administrative_units/item/extensions/item/extension_item_request_builder.rb @@ -25,7 +25,7 @@ class ExtensionItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuild ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/extensions/{extension%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/extensions/{extension%2Did}{?%24expand,%24select}") end ## ## Delete navigation property extensions for directory @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Extension.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Extension.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a extension_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ExtensionItemRequestBuilder.new(raw_url, @request_adapter) + end ## # The collection of open extensions defined for this administrative unit. Nullable. diff --git a/lib/directory/administrative_units/item/members/count/count_request_builder.rb b/lib/directory/administrative_units/item/members/count/count_request_builder.rb index 487292cfc7..385140b13e 100644 --- a/lib/directory/administrative_units/item/members/count/count_request_builder.rb +++ b/lib/directory/administrative_units/item/members/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory/administrative_units/item/members/graph_application/count/count_request_builder.rb b/lib/directory/administrative_units/item/members/graph_application/count/count_request_builder.rb index 5407c4fbc7..308ccfe71c 100644 --- a/lib/directory/administrative_units/item/members/graph_application/count/count_request_builder.rb +++ b/lib/directory/administrative_units/item/members/graph_application/count/count_request_builder.rb @@ -26,7 +26,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/graph.application/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/graph.application/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -38,8 +38,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -49,17 +48,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory/administrative_units/item/members/graph_application/graph_application_request_builder.rb b/lib/directory/administrative_units/item/members/graph_application/graph_application_request_builder.rb index f1aafac221..e5c65334e7 100644 --- a/lib/directory/administrative_units/item/members/graph_application/graph_application_request_builder.rb +++ b/lib/directory/administrative_units/item/members/graph_application/graph_application_request_builder.rb @@ -31,7 +31,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/graph.application{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/graph.application{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.application in the microsoft.graph.directoryObject collection @@ -43,8 +43,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ApplicationCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -54,17 +53,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_application_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphApplicationRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.application in the microsoft.graph.directoryObject collection diff --git a/lib/directory/administrative_units/item/members/graph_device/count/count_request_builder.rb b/lib/directory/administrative_units/item/members/graph_device/count/count_request_builder.rb index f29487d56f..8f2d1b998e 100644 --- a/lib/directory/administrative_units/item/members/graph_device/count/count_request_builder.rb +++ b/lib/directory/administrative_units/item/members/graph_device/count/count_request_builder.rb @@ -26,7 +26,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/graph.device/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/graph.device/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -38,8 +38,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -49,17 +48,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory/administrative_units/item/members/graph_device/graph_device_request_builder.rb b/lib/directory/administrative_units/item/members/graph_device/graph_device_request_builder.rb index b59df3cb27..c4455a48fc 100644 --- a/lib/directory/administrative_units/item/members/graph_device/graph_device_request_builder.rb +++ b/lib/directory/administrative_units/item/members/graph_device/graph_device_request_builder.rb @@ -31,7 +31,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/graph.device{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/graph.device{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.device in the microsoft.graph.directoryObject collection @@ -43,8 +43,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -54,17 +53,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_device_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphDeviceRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.device in the microsoft.graph.directoryObject collection diff --git a/lib/directory/administrative_units/item/members/graph_group/count/count_request_builder.rb b/lib/directory/administrative_units/item/members/graph_group/count/count_request_builder.rb index ddd2689bb7..05ea5cb86e 100644 --- a/lib/directory/administrative_units/item/members/graph_group/count/count_request_builder.rb +++ b/lib/directory/administrative_units/item/members/graph_group/count/count_request_builder.rb @@ -26,7 +26,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/graph.group/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/graph.group/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -38,8 +38,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -49,17 +48,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory/administrative_units/item/members/graph_group/graph_group_request_builder.rb b/lib/directory/administrative_units/item/members/graph_group/graph_group_request_builder.rb index 225622a05d..800b021802 100644 --- a/lib/directory/administrative_units/item/members/graph_group/graph_group_request_builder.rb +++ b/lib/directory/administrative_units/item/members/graph_group/graph_group_request_builder.rb @@ -31,7 +31,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/graph.group{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/graph.group{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection @@ -43,8 +43,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::GroupCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -54,17 +53,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_group_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphGroupRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection diff --git a/lib/directory/administrative_units/item/members/graph_org_contact/count/count_request_builder.rb b/lib/directory/administrative_units/item/members/graph_org_contact/count/count_request_builder.rb index be797b27b6..3a235c4437 100644 --- a/lib/directory/administrative_units/item/members/graph_org_contact/count/count_request_builder.rb +++ b/lib/directory/administrative_units/item/members/graph_org_contact/count/count_request_builder.rb @@ -26,7 +26,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/graph.orgContact/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/graph.orgContact/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -38,8 +38,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -49,17 +48,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory/administrative_units/item/members/graph_org_contact/graph_org_contact_request_builder.rb b/lib/directory/administrative_units/item/members/graph_org_contact/graph_org_contact_request_builder.rb index d2f4d9de0c..1a25a24528 100644 --- a/lib/directory/administrative_units/item/members/graph_org_contact/graph_org_contact_request_builder.rb +++ b/lib/directory/administrative_units/item/members/graph_org_contact/graph_org_contact_request_builder.rb @@ -31,7 +31,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/graph.orgContact{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/graph.orgContact{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.orgContact in the microsoft.graph.directoryObject collection @@ -43,8 +43,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::OrgContactCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -54,17 +53,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_org_contact_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphOrgContactRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.orgContact in the microsoft.graph.directoryObject collection diff --git a/lib/directory/administrative_units/item/members/graph_service_principal/count/count_request_builder.rb b/lib/directory/administrative_units/item/members/graph_service_principal/count/count_request_builder.rb index e474c156d2..fe8d2309c6 100644 --- a/lib/directory/administrative_units/item/members/graph_service_principal/count/count_request_builder.rb +++ b/lib/directory/administrative_units/item/members/graph_service_principal/count/count_request_builder.rb @@ -26,7 +26,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/graph.servicePrincipal/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/graph.servicePrincipal/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -38,8 +38,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -49,17 +48,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory/administrative_units/item/members/graph_service_principal/graph_service_principal_request_builder.rb b/lib/directory/administrative_units/item/members/graph_service_principal/graph_service_principal_request_builder.rb index d5a451f870..fb82f1f694 100644 --- a/lib/directory/administrative_units/item/members/graph_service_principal/graph_service_principal_request_builder.rb +++ b/lib/directory/administrative_units/item/members/graph_service_principal/graph_service_principal_request_builder.rb @@ -31,7 +31,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/graph.servicePrincipal{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/graph.servicePrincipal{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.servicePrincipal in the microsoft.graph.directoryObject collection @@ -43,8 +43,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServicePrincipalCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -54,17 +53,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_service_principal_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphServicePrincipalRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.servicePrincipal in the microsoft.graph.directoryObject collection diff --git a/lib/directory/administrative_units/item/members/graph_user/count/count_request_builder.rb b/lib/directory/administrative_units/item/members/graph_user/count/count_request_builder.rb index b9c1798ab7..74dca995b0 100644 --- a/lib/directory/administrative_units/item/members/graph_user/count/count_request_builder.rb +++ b/lib/directory/administrative_units/item/members/graph_user/count/count_request_builder.rb @@ -26,7 +26,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/graph.user/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/graph.user/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -38,8 +38,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -49,17 +48,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory/administrative_units/item/members/graph_user/graph_user_request_builder.rb b/lib/directory/administrative_units/item/members/graph_user/graph_user_request_builder.rb index 46fc4e632a..626f35a82c 100644 --- a/lib/directory/administrative_units/item/members/graph_user/graph_user_request_builder.rb +++ b/lib/directory/administrative_units/item/members/graph_user/graph_user_request_builder.rb @@ -31,7 +31,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/graph.user{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/graph.user{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.user in the microsoft.graph.directoryObject collection @@ -43,8 +43,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -54,17 +53,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_user_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphUserRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.user in the microsoft.graph.directoryObject collection diff --git a/lib/directory/administrative_units/item/members/item/graph_application/graph_application_request_builder.rb b/lib/directory/administrative_units/item/members/item/graph_application/graph_application_request_builder.rb index acf48d8e48..feedb4b6ea 100644 --- a/lib/directory/administrative_units/item/members/item/graph_application/graph_application_request_builder.rb +++ b/lib/directory/administrative_units/item/members/item/graph_application/graph_application_request_builder.rb @@ -27,7 +27,7 @@ class GraphApplicationRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBu ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/{directoryObject%2Did}/graph.application{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/{directoryObject%2Did}/graph.application{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.application @@ -39,8 +39,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Application.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -50,17 +49,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_application_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphApplicationRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.application diff --git a/lib/directory/administrative_units/item/members/item/graph_device/graph_device_request_builder.rb b/lib/directory/administrative_units/item/members/item/graph_device/graph_device_request_builder.rb index 71b6568fca..d6d5def709 100644 --- a/lib/directory/administrative_units/item/members/item/graph_device/graph_device_request_builder.rb +++ b/lib/directory/administrative_units/item/members/item/graph_device/graph_device_request_builder.rb @@ -27,7 +27,7 @@ class GraphDeviceRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/{directoryObject%2Did}/graph.device{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/{directoryObject%2Did}/graph.device{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.device @@ -39,8 +39,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Device.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -50,17 +49,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_device_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphDeviceRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.device diff --git a/lib/directory/administrative_units/item/members/item/graph_group/graph_group_request_builder.rb b/lib/directory/administrative_units/item/members/item/graph_group/graph_group_request_builder.rb index b6b230df8f..075b74e941 100644 --- a/lib/directory/administrative_units/item/members/item/graph_group/graph_group_request_builder.rb +++ b/lib/directory/administrative_units/item/members/item/graph_group/graph_group_request_builder.rb @@ -27,7 +27,7 @@ class GraphGroupRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/{directoryObject%2Did}/graph.group{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/{directoryObject%2Did}/graph.group{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.group @@ -39,8 +39,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Group.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -50,17 +49,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_group_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphGroupRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.group diff --git a/lib/directory/administrative_units/item/members/item/graph_org_contact/graph_org_contact_request_builder.rb b/lib/directory/administrative_units/item/members/item/graph_org_contact/graph_org_contact_request_builder.rb index ae2dbb12af..32ee8b535e 100644 --- a/lib/directory/administrative_units/item/members/item/graph_org_contact/graph_org_contact_request_builder.rb +++ b/lib/directory/administrative_units/item/members/item/graph_org_contact/graph_org_contact_request_builder.rb @@ -27,7 +27,7 @@ class GraphOrgContactRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBui ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/{directoryObject%2Did}/graph.orgContact{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/{directoryObject%2Did}/graph.orgContact{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.orgContact @@ -39,8 +39,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::OrgContact.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -50,17 +49,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_org_contact_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphOrgContactRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.orgContact diff --git a/lib/directory/administrative_units/item/members/item/graph_service_principal/graph_service_principal_request_builder.rb b/lib/directory/administrative_units/item/members/item/graph_service_principal/graph_service_principal_request_builder.rb index c1387f5efc..051db74479 100644 --- a/lib/directory/administrative_units/item/members/item/graph_service_principal/graph_service_principal_request_builder.rb +++ b/lib/directory/administrative_units/item/members/item/graph_service_principal/graph_service_principal_request_builder.rb @@ -27,7 +27,7 @@ class GraphServicePrincipalRequestBuilder < MicrosoftKiotaAbstractions::BaseRequ ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/{directoryObject%2Did}/graph.servicePrincipal{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/{directoryObject%2Did}/graph.servicePrincipal{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.servicePrincipal @@ -39,8 +39,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServicePrincipal.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -50,17 +49,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_service_principal_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphServicePrincipalRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.servicePrincipal diff --git a/lib/directory/administrative_units/item/members/item/graph_user/graph_user_request_builder.rb b/lib/directory/administrative_units/item/members/item/graph_user/graph_user_request_builder.rb index 3a7cd4c531..c5299b6d78 100644 --- a/lib/directory/administrative_units/item/members/item/graph_user/graph_user_request_builder.rb +++ b/lib/directory/administrative_units/item/members/item/graph_user/graph_user_request_builder.rb @@ -27,7 +27,7 @@ class GraphUserRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/{directoryObject%2Did}/graph.user{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/{directoryObject%2Did}/graph.user{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.user @@ -39,8 +39,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::User.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -50,17 +49,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_user_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphUserRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.user diff --git a/lib/directory/administrative_units/item/members/item/ref/ref_request_builder.rb b/lib/directory/administrative_units/item/members/item/ref/ref_request_builder.rb index 8e606c5d6d..13e5b4bf68 100644 --- a/lib/directory/administrative_units/item/members/item/ref/ref_request_builder.rb +++ b/lib/directory/administrative_units/item/members/item/ref/ref_request_builder.rb @@ -26,7 +26,7 @@ class RefRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/{directoryObject%2Did}/$ref{?%40id*}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/{directoryObject%2Did}/$ref") end ## ## Use this API to remove a member (user, group, or device) from an administrative unit. @@ -38,8 +38,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,38 +48,24 @@ def delete(request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end - ## - # Use this API to remove a member (user, group, or device) from an administrative unit. - class RefRequestBuilderDeleteQueryParameters - - ## - # Delete Uri - attr_accessor :id - ## - ## Maps the query parameters names to their encoded names for the URI template parsing. - ## @param original_name The original query parameter name in the class. - ## @return a string - ## - def get_query_parameter(original_name) - raise StandardError, 'original_name cannot be null' if original_name.nil? - case original_name - when "id" - return "%40id" - else - return original_name - end - end + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ref_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RefRequestBuilder.new(raw_url, @request_adapter) end end end diff --git a/lib/directory/administrative_units/item/members/members_request_builder.rb b/lib/directory/administrative_units/item/members/members_request_builder.rb index 72c66c1de3..4f950ec4eb 100644 --- a/lib/directory/administrative_units/item/members/members_request_builder.rb +++ b/lib/directory/administrative_units/item/members/members_request_builder.rb @@ -68,7 +68,7 @@ def ref() end ## ## Gets an item from the MicrosoftGraph.directory.administrativeUnits.item.members.item collection - ## @param directory_object_id Unique identifier of the item + ## @param directory_object_id The unique identifier of directoryObject ## @return a directory_object_item_request_builder ## def by_directory_object_id(directory_object_id) @@ -84,10 +84,10 @@ def by_directory_object_id(directory_object_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Users and groups that are members of this administrative unit. Supports $expand. + ## Use this API to get the members list (users, groups, or devices) in an administrative unit. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_object_collection_response ## @@ -96,12 +96,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObjectCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Create new navigation property to members for directory + ## Use this API to add a member (user, group, or device) to an administrative unit. Currently it's only possible to add one member at a time to an administrative unit. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_object @@ -112,30 +111,29 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Users and groups that are members of this administrative unit. Supports $expand. + ## Use this API to get the members list (users, groups, or devices) in an administrative unit. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Create new navigation property to members for directory + ## Use this API to add a member (user, group, or device) to an administrative unit. Currently it's only possible to add one member at a time to an administrative unit. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -143,20 +141,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a members_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MembersRequestBuilder.new(raw_url, @request_adapter) + end ## - # Users and groups that are members of this administrative unit. Supports $expand. + # Use this API to get the members list (users, groups, or devices) in an administrative unit. class MembersRequestBuilderGetQueryParameters ## diff --git a/lib/directory/administrative_units/item/members/ref/ref_request_builder.rb b/lib/directory/administrative_units/item/members/ref/ref_request_builder.rb index 00573d84bd..0600690def 100644 --- a/lib/directory/administrative_units/item/members/ref/ref_request_builder.rb +++ b/lib/directory/administrative_units/item/members/ref/ref_request_builder.rb @@ -26,10 +26,23 @@ class RefRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/$ref{?%24top,%24skip,%24search,%24filter,%24count,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/$ref?@id={%40id}{&%24count,%24filter,%24orderby,%24search,%24skip,%24top}") end ## - ## Users and groups that are members of this administrative unit. Supports $expand. + ## Use this API to remove a member (user, group, or device) from an administrative unit. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Use this API to get the members list (users, groups, or devices) in an administrative unit. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of string_collection_response ## @@ -38,12 +51,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::StringCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Create new navigation property ref to members for directory + ## Use this API to add a member (user, group, or device) to an administrative unit. Currently it's only possible to add one member at a time to an administrative unit. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void @@ -54,30 +66,47 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Users and groups that are members of this administrative unit. Supports $expand. + ## Use this API to remove a member (user, group, or device) from an administrative unit. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## - def to_get_request_information(request_configuration=nil) + def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = '{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/$ref?@id={%40id}' request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Use this API to get the members list (users, groups, or devices) in an administrative unit. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = '{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/$ref{?%24count,%24filter,%24orderby,%24search,%24skip,%24top}' + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Create new navigation property ref to members for directory + ## Use this API to add a member (user, group, or device) to an administrative unit. Currently it's only possible to add one member at a time to an administrative unit. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -85,19 +114,52 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = '{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/$ref' + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ref_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RefRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Use this API to remove a member (user, group, or device) from an administrative unit. + class RefRequestBuilderDeleteQueryParameters + + ## + # The delete Uri + attr_accessor :id + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "id" + return "%40id" + else + return original_name + end + end + end ## - # Users and groups that are members of this administrative unit. Supports $expand. + # Use this API to get the members list (users, groups, or devices) in an administrative unit. class RefRequestBuilderGetQueryParameters ## diff --git a/lib/directory/administrative_units/item/scoped_role_members/count/count_request_builder.rb b/lib/directory/administrative_units/item/scoped_role_members/count/count_request_builder.rb index 80fe0e1984..085116a28b 100644 --- a/lib/directory/administrative_units/item/scoped_role_members/count/count_request_builder.rb +++ b/lib/directory/administrative_units/item/scoped_role_members/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/scopedRoleMembers/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/scopedRoleMembers/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory/administrative_units/item/scoped_role_members/item/scoped_role_membership_item_request_builder.rb b/lib/directory/administrative_units/item/scoped_role_members/item/scoped_role_membership_item_request_builder.rb index 559aae2bd2..46e5690cf5 100644 --- a/lib/directory/administrative_units/item/scoped_role_members/item/scoped_role_membership_item_request_builder.rb +++ b/lib/directory/administrative_units/item/scoped_role_members/item/scoped_role_membership_item_request_builder.rb @@ -25,10 +25,10 @@ class ScopedRoleMembershipItemRequestBuilder < MicrosoftKiotaAbstractions::BaseR ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/scopedRoleMembers/{scopedRoleMembership%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/scopedRoleMembers/{scopedRoleMembership%2Did}{?%24expand,%24select}") end ## - ## Remove an Azure Active Directory (Azure AD) role assignment with administrative unit scope. + ## Remove a Microsoft Entra role assignment with administrative unit scope. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void ## @@ -37,12 +37,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Get an Azure Active Directory (Azure AD) role assignment with administrative unit scope. + ## Get a Microsoft Entra role assignment with administrative unit scope. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of scoped_role_membership ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ScopedRoleMembership.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,42 +65,42 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ScopedRoleMembership.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Remove an Azure Active Directory (Azure AD) role assignment with administrative unit scope. + ## Remove a Microsoft Entra role assignment with administrative unit scope. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Get an Azure Active Directory (Azure AD) role assignment with administrative unit scope. + ## Get a Microsoft Entra role assignment with administrative unit scope. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,20 +112,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a scoped_role_membership_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ScopedRoleMembershipItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Get an Azure Active Directory (Azure AD) role assignment with administrative unit scope. + # Get a Microsoft Entra role assignment with administrative unit scope. class ScopedRoleMembershipItemRequestBuilderGetQueryParameters ## diff --git a/lib/directory/administrative_units/item/scoped_role_members/scoped_role_members_request_builder.rb b/lib/directory/administrative_units/item/scoped_role_members/scoped_role_members_request_builder.rb index 8d477a2c49..513786b7a3 100644 --- a/lib/directory/administrative_units/item/scoped_role_members/scoped_role_members_request_builder.rb +++ b/lib/directory/administrative_units/item/scoped_role_members/scoped_role_members_request_builder.rb @@ -42,10 +42,10 @@ def by_scoped_role_membership_id(scoped_role_membership_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/scopedRoleMembers{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/scopedRoleMembers{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## List Azure Active Directory (Azure AD) role assignments with administrative unit scope. + ## List Microsoft Entra role assignments with administrative unit scope. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of scoped_role_membership_collection_response ## @@ -54,12 +54,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ScopedRoleMembershipCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Assign an Azure Active Directory (Azure AD) role with administrative unit scope. For a list of roles that can be assigned with administrative unit scope, see Assign Azure AD roles with administrative unit scope. + ## Assign a Microsoft Entra role with administrative unit scope. For a list of roles that can be assigned with administrative unit scope, see Assign Microsoft Entra roles with administrative unit scope. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of scoped_role_membership @@ -70,30 +69,29 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ScopedRoleMembership.create_from_discriminator_value(pn) }, error_mapping) end ## - ## List Azure Active Directory (Azure AD) role assignments with administrative unit scope. + ## List Microsoft Entra role assignments with administrative unit scope. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Assign an Azure Active Directory (Azure AD) role with administrative unit scope. For a list of roles that can be assigned with administrative unit scope, see Assign Azure AD roles with administrative unit scope. + ## Assign a Microsoft Entra role with administrative unit scope. For a list of roles that can be assigned with administrative unit scope, see Assign Microsoft Entra roles with administrative unit scope. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -101,20 +99,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a scoped_role_members_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ScopedRoleMembersRequestBuilder.new(raw_url, @request_adapter) + end ## - # List Azure Active Directory (Azure AD) role assignments with administrative unit scope. + # List Microsoft Entra role assignments with administrative unit scope. class ScopedRoleMembersRequestBuilderGetQueryParameters ## diff --git a/lib/directory/attribute_sets/attribute_sets_request_builder.rb b/lib/directory/attribute_sets/attribute_sets_request_builder.rb index 67e6a50894..6d9528dc60 100644 --- a/lib/directory/attribute_sets/attribute_sets_request_builder.rb +++ b/lib/directory/attribute_sets/attribute_sets_request_builder.rb @@ -38,7 +38,7 @@ def by_attribute_set_id(attribute_set_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/attributeSets{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/attributeSets{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get a list of the attributeSet objects and their properties. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AttributeSetCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AttributeSet.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a attribute_sets_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AttributeSetsRequestBuilder.new(raw_url, @request_adapter) + end ## # Get a list of the attributeSet objects and their properties. diff --git a/lib/directory/attribute_sets/count/count_request_builder.rb b/lib/directory/attribute_sets/count/count_request_builder.rb index c2dc14e458..265d8df505 100644 --- a/lib/directory/attribute_sets/count/count_request_builder.rb +++ b/lib/directory/attribute_sets/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/attributeSets/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directory/attributeSets/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory/attribute_sets/item/attribute_set_item_request_builder.rb b/lib/directory/attribute_sets/item/attribute_set_item_request_builder.rb index 073a645d6c..9eaf83874f 100644 --- a/lib/directory/attribute_sets/item/attribute_set_item_request_builder.rb +++ b/lib/directory/attribute_sets/item/attribute_set_item_request_builder.rb @@ -21,7 +21,7 @@ class AttributeSetItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBu ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/attributeSets/{attributeSet%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/attributeSets/{attributeSet%2Did}{?%24expand,%24select}") end ## ## Delete navigation property attributeSets for directory @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AttributeSet.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AttributeSet.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a attribute_set_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AttributeSetItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read the properties and relationships of an attributeSet object. diff --git a/lib/directory/custom_security_attribute_definitions/count/count_request_builder.rb b/lib/directory/custom_security_attribute_definitions/count/count_request_builder.rb index 0168acb18f..73bb8d4bcf 100644 --- a/lib/directory/custom_security_attribute_definitions/count/count_request_builder.rb +++ b/lib/directory/custom_security_attribute_definitions/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/customSecurityAttributeDefinitions/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directory/customSecurityAttributeDefinitions/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory/custom_security_attribute_definitions/custom_security_attribute_definitions_request_builder.rb b/lib/directory/custom_security_attribute_definitions/custom_security_attribute_definitions_request_builder.rb index 2c0c87a474..4dc5175fb0 100644 --- a/lib/directory/custom_security_attribute_definitions/custom_security_attribute_definitions_request_builder.rb +++ b/lib/directory/custom_security_attribute_definitions/custom_security_attribute_definitions_request_builder.rb @@ -38,7 +38,7 @@ def by_custom_security_attribute_definition_id(custom_security_attribute_definit ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/customSecurityAttributeDefinitions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/customSecurityAttributeDefinitions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get a list of the customSecurityAttributeDefinition objects and their properties. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CustomSecurityAttributeDefinitionCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CustomSecurityAttributeDefinition.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a custom_security_attribute_definitions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CustomSecurityAttributeDefinitionsRequestBuilder.new(raw_url, @request_adapter) + end ## # Get a list of the customSecurityAttributeDefinition objects and their properties. diff --git a/lib/directory/custom_security_attribute_definitions/item/allowed_values/allowed_values_request_builder.rb b/lib/directory/custom_security_attribute_definitions/item/allowed_values/allowed_values_request_builder.rb index 9425e286f5..6d4ae42ab5 100644 --- a/lib/directory/custom_security_attribute_definitions/item/allowed_values/allowed_values_request_builder.rb +++ b/lib/directory/custom_security_attribute_definitions/item/allowed_values/allowed_values_request_builder.rb @@ -42,7 +42,7 @@ def by_allowed_value_id(allowed_value_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/customSecurityAttributeDefinitions/{customSecurityAttributeDefinition%2Did}/allowedValues{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/customSecurityAttributeDefinitions/{customSecurityAttributeDefinition%2Did}/allowedValues{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get a list of the allowedValue objects and their properties. @@ -54,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AllowedValueCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -70,8 +69,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AllowedValue.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,15 +79,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -101,17 +99,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a allowed_values_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AllowedValuesRequestBuilder.new(raw_url, @request_adapter) + end ## # Get a list of the allowedValue objects and their properties. diff --git a/lib/directory/custom_security_attribute_definitions/item/allowed_values/count/count_request_builder.rb b/lib/directory/custom_security_attribute_definitions/item/allowed_values/count/count_request_builder.rb index 7702fb0c41..13e62d98ed 100644 --- a/lib/directory/custom_security_attribute_definitions/item/allowed_values/count/count_request_builder.rb +++ b/lib/directory/custom_security_attribute_definitions/item/allowed_values/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/customSecurityAttributeDefinitions/{customSecurityAttributeDefinition%2Did}/allowedValues/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directory/customSecurityAttributeDefinitions/{customSecurityAttributeDefinition%2Did}/allowedValues/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory/custom_security_attribute_definitions/item/allowed_values/item/allowed_value_item_request_builder.rb b/lib/directory/custom_security_attribute_definitions/item/allowed_values/item/allowed_value_item_request_builder.rb index a9dbb76fc0..66c2544696 100644 --- a/lib/directory/custom_security_attribute_definitions/item/allowed_values/item/allowed_value_item_request_builder.rb +++ b/lib/directory/custom_security_attribute_definitions/item/allowed_values/item/allowed_value_item_request_builder.rb @@ -25,7 +25,7 @@ class AllowedValueItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBu ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/customSecurityAttributeDefinitions/{customSecurityAttributeDefinition%2Did}/allowedValues/{allowedValue%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/customSecurityAttributeDefinitions/{customSecurityAttributeDefinition%2Did}/allowedValues/{allowedValue%2Did}{?%24expand,%24select}") end ## ## Delete navigation property allowedValues for directory @@ -37,8 +37,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AllowedValue.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -67,8 +65,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AllowedValue.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,13 +75,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -94,15 +92,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -114,17 +112,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a allowed_value_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AllowedValueItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read the properties and relationships of an allowedValue object. diff --git a/lib/directory/custom_security_attribute_definitions/item/custom_security_attribute_definition_item_request_builder.rb b/lib/directory/custom_security_attribute_definitions/item/custom_security_attribute_definition_item_request_builder.rb index 45e99b7909..6eb3a72ef3 100644 --- a/lib/directory/custom_security_attribute_definitions/item/custom_security_attribute_definition_item_request_builder.rb +++ b/lib/directory/custom_security_attribute_definitions/item/custom_security_attribute_definition_item_request_builder.rb @@ -27,7 +27,7 @@ def allowed_values() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/customSecurityAttributeDefinitions/{customSecurityAttributeDefinition%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/customSecurityAttributeDefinitions/{customSecurityAttributeDefinition%2Did}{?%24expand,%24select}") end ## ## Delete navigation property customSecurityAttributeDefinitions for directory @@ -39,8 +39,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -53,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CustomSecurityAttributeDefinition.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -69,8 +67,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CustomSecurityAttributeDefinition.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -80,13 +77,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -96,15 +94,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -116,17 +114,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a custom_security_attribute_definition_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CustomSecurityAttributeDefinitionItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read the properties and relationships of a customSecurityAttributeDefinition object. diff --git a/lib/directory/deleted_items/count/count_request_builder.rb b/lib/directory/deleted_items/count/count_request_builder.rb index cdca2e51bd..556b526eac 100644 --- a/lib/directory/deleted_items/count/count_request_builder.rb +++ b/lib/directory/deleted_items/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory/deleted_items/deleted_items_request_builder.rb b/lib/directory/deleted_items/deleted_items_request_builder.rb index c1c597e034..787e43db98 100644 --- a/lib/directory/deleted_items/deleted_items_request_builder.rb +++ b/lib/directory/deleted_items/deleted_items_request_builder.rb @@ -1,12 +1,10 @@ require 'microsoft_kiota_abstractions' require_relative '../../microsoft_graph' -require_relative '../../models/directory_object' require_relative '../../models/directory_object_collection_response' require_relative '../../models/o_data_errors_o_data_error' require_relative '../directory' require_relative './count/count_request_builder' require_relative './deleted_items' -require_relative './delta/delta_request_builder' require_relative './get_available_extension_properties/get_available_extension_properties_request_builder' require_relative './get_by_ids/get_by_ids_request_builder' require_relative './graph_administrative_unit/graph_administrative_unit_request_builder' @@ -31,11 +29,6 @@ def count() return MicrosoftGraph::Directory::DeletedItems::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) end ## - # Provides operations to call the delta method. - def delta() - return MicrosoftGraph::Directory::DeletedItems::Delta::DeltaRequestBuilder.new(@path_parameters, @request_adapter) - end - ## # Provides operations to call the getAvailableExtensionProperties method. def get_available_extension_properties() return MicrosoftGraph::Directory::DeletedItems::GetAvailableExtensionProperties::GetAvailableExtensionPropertiesRequestBuilder.new(@path_parameters, @request_adapter) @@ -98,10 +91,10 @@ def by_directory_object_id(directory_object_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Retrieve the properties of a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. + ## Retrieve the properties of a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. Retrieve the properties of a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal- user ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_object_collection_response ## @@ -110,67 +103,39 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObjectCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Create new navigation property to deletedItems for directory - ## @param body The request body - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of directory_object - ## - def post(body, request_configuration=nil) - raise StandardError, 'body cannot be null' if body.nil? - request_info = self.to_post_request_information( - body, request_configuration - ) - error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }, error_mapping) - end - ## - ## Retrieve the properties of a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. + ## Retrieve the properties of a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. Retrieve the properties of a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal- user ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Create new navigation property to deletedItems for directory - ## @param body The request body - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a request_information + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a deleted_items_request_builder ## - def to_post_request_information(body, request_configuration=nil) - raise StandardError, 'body cannot be null' if body.nil? - request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') - unless request_configuration.nil? - request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) - return request_info + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeletedItemsRequestBuilder.new(raw_url, @request_adapter) end ## - # Retrieve the properties of a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. + # Retrieve the properties of a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. Retrieve the properties of a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal- user class DeletedItemsRequestBuilderGetQueryParameters ## diff --git a/lib/directory/deleted_items/delta/delta.rb b/lib/directory/deleted_items/delta/delta.rb deleted file mode 100644 index 0c348d20cb..0000000000 --- a/lib/directory/deleted_items/delta/delta.rb +++ /dev/null @@ -1 +0,0 @@ -require_relative 'delta_response' diff --git a/lib/directory/deleted_items/delta/delta_request_builder.rb b/lib/directory/deleted_items/delta/delta_request_builder.rb deleted file mode 100644 index 37b2ad1bc5..0000000000 --- a/lib/directory/deleted_items/delta/delta_request_builder.rb +++ /dev/null @@ -1,114 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/o_data_errors_o_data_error' -require_relative '../../directory' -require_relative '../deleted_items' -require_relative './delta' - -module MicrosoftGraph - module Directory - module DeletedItems - module Delta - ## - # Provides operations to call the delta method. - class DeltaRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder - - ## - ## Instantiates a new DeltaRequestBuilder and sets the default values. - ## @param path_parameters Path parameters for the request - ## @param request_adapter The request adapter to use to execute the requests. - ## @return a void - ## - def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}") - end - ## - ## Invoke function delta - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of delta_response - ## - def get(request_configuration=nil) - request_info = self.to_get_request_information( - request_configuration - ) - error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Directory::DeletedItems::Delta::DeltaResponse.create_from_discriminator_value(pn) }, error_mapping) - end - ## - ## Invoke function delta - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a request_information - ## - def to_get_request_information(request_configuration=nil) - request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') - unless request_configuration.nil? - request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) - request_info.add_request_options(request_configuration.options) - end - return request_info - end - - ## - # Invoke function delta - class DeltaRequestBuilderGetQueryParameters - - ## - # Include count of items - attr_accessor :count - ## - # Filter items by property values - attr_accessor :filter - ## - # Order items by property values - attr_accessor :orderby - ## - # Search items by search phrases - attr_accessor :search - ## - # Select properties to be returned - attr_accessor :select - ## - # Skip the first n items - attr_accessor :skip - ## - # Show only the first n items - attr_accessor :top - ## - ## Maps the query parameters names to their encoded names for the URI template parsing. - ## @param original_name The original query parameter name in the class. - ## @return a string - ## - def get_query_parameter(original_name) - raise StandardError, 'original_name cannot be null' if original_name.nil? - case original_name - when "count" - return "%24count" - when "filter" - return "%24filter" - when "orderby" - return "%24orderby" - when "search" - return "%24search" - when "select" - return "%24select" - when "skip" - return "%24skip" - when "top" - return "%24top" - else - return original_name - end - end - end - end - end - end - end -end diff --git a/lib/directory/deleted_items/delta/delta_response.rb b/lib/directory/deleted_items/delta/delta_response.rb deleted file mode 100644 index ccb84f5dd4..0000000000 --- a/lib/directory/deleted_items/delta/delta_response.rb +++ /dev/null @@ -1,72 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_delta_function_response' -require_relative '../../../models/directory_object' -require_relative '../../directory' -require_relative '../deleted_items' -require_relative './delta' - -module MicrosoftGraph - module Directory - module DeletedItems - module Delta - class DeltaResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new deltaResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a delta_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return DeltaResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a directory_object - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/directory/deleted_items/get_available_extension_properties/get_available_extension_properties.rb b/lib/directory/deleted_items/get_available_extension_properties/get_available_extension_properties.rb index b6fee576bf..ce1b642cad 100644 --- a/lib/directory/deleted_items/get_available_extension_properties/get_available_extension_properties.rb +++ b/lib/directory/deleted_items/get_available_extension_properties/get_available_extension_properties.rb @@ -1,2 +1,2 @@ require_relative 'get_available_extension_properties_post_request_body' -require_relative 'get_available_extension_properties_response' +require_relative 'get_available_extension_properties_post_response' diff --git a/lib/directory/deleted_items/get_available_extension_properties/get_available_extension_properties_post_request_body.rb b/lib/directory/deleted_items/get_available_extension_properties/get_available_extension_properties_post_request_body.rb index aface386b0..68189df53b 100644 --- a/lib/directory/deleted_items/get_available_extension_properties/get_available_extension_properties_post_request_body.rb +++ b/lib/directory/deleted_items/get_available_extension_properties/get_available_extension_properties_post_request_body.rb @@ -17,22 +17,22 @@ class GetAvailableExtensionPropertiesPostRequestBody # The isSyncedFromOnPremises property @is_synced_from_on_premises ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getAvailableExtensionPropertiesPostRequestBody and sets the default values. + ## Instantiates a new GetAvailableExtensionPropertiesPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory/deleted_items/get_available_extension_properties/get_available_extension_properties_post_response.rb b/lib/directory/deleted_items/get_available_extension_properties/get_available_extension_properties_post_response.rb new file mode 100644 index 0000000000..24a1f0d520 --- /dev/null +++ b/lib/directory/deleted_items/get_available_extension_properties/get_available_extension_properties_post_response.rb @@ -0,0 +1,72 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../../models/extension_property' +require_relative '../../directory' +require_relative '../deleted_items' +require_relative './get_available_extension_properties' + +module MicrosoftGraph + module Directory + module DeletedItems + module GetAvailableExtensionProperties + class GetAvailableExtensionPropertiesPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetAvailableExtensionPropertiesPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_available_extension_properties_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetAvailableExtensionPropertiesPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ExtensionProperty.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a extension_property + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/directory/deleted_items/get_available_extension_properties/get_available_extension_properties_request_builder.rb b/lib/directory/deleted_items/get_available_extension_properties/get_available_extension_properties_request_builder.rb index f89e368de6..ee24c2c8da 100644 --- a/lib/directory/deleted_items/get_available_extension_properties/get_available_extension_properties_request_builder.rb +++ b/lib/directory/deleted_items/get_available_extension_properties/get_available_extension_properties_request_builder.rb @@ -23,10 +23,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/getAvailableExtensionProperties") end ## - ## Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + ## Return all directory extension definitions that are registered in a directory, including through multitenant apps. The following entities support extension properties: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_available_extension_properties_response + ## @return a Fiber of get_available_extension_properties_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,12 +34,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Directory::DeletedItems::GetAvailableExtensionProperties::GetAvailableExtensionPropertiesResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Directory::DeletedItems::GetAvailableExtensionProperties::GetAvailableExtensionPropertiesPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + ## Return all directory extension definitions that are registered in a directory, including through multitenant apps. The following entities support extension properties: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_available_extension_properties_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetAvailableExtensionPropertiesRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory/deleted_items/get_available_extension_properties/get_available_extension_properties_response.rb b/lib/directory/deleted_items/get_available_extension_properties/get_available_extension_properties_response.rb deleted file mode 100644 index 22443cbca6..0000000000 --- a/lib/directory/deleted_items/get_available_extension_properties/get_available_extension_properties_response.rb +++ /dev/null @@ -1,72 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../../models/extension_property' -require_relative '../../directory' -require_relative '../deleted_items' -require_relative './get_available_extension_properties' - -module MicrosoftGraph - module Directory - module DeletedItems - module GetAvailableExtensionProperties - class GetAvailableExtensionPropertiesResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getAvailableExtensionPropertiesResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_available_extension_properties_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetAvailableExtensionPropertiesResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ExtensionProperty.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a extension_property - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/directory/deleted_items/get_by_ids/get_by_ids.rb b/lib/directory/deleted_items/get_by_ids/get_by_ids.rb index e4b0824834..131a179969 100644 --- a/lib/directory/deleted_items/get_by_ids/get_by_ids.rb +++ b/lib/directory/deleted_items/get_by_ids/get_by_ids.rb @@ -1,2 +1,2 @@ require_relative 'get_by_ids_post_request_body' -require_relative 'get_by_ids_response' +require_relative 'get_by_ids_post_response' diff --git a/lib/directory/deleted_items/get_by_ids/get_by_ids_post_request_body.rb b/lib/directory/deleted_items/get_by_ids/get_by_ids_post_request_body.rb index 2d365a4f6d..b9dfa8130f 100644 --- a/lib/directory/deleted_items/get_by_ids/get_by_ids_post_request_body.rb +++ b/lib/directory/deleted_items/get_by_ids/get_by_ids_post_request_body.rb @@ -20,22 +20,22 @@ class GetByIdsPostRequestBody # The types property @types ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getByIdsPostRequestBody and sets the default values. + ## Instantiates a new GetByIdsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory/deleted_items/get_by_ids/get_by_ids_post_response.rb b/lib/directory/deleted_items/get_by_ids/get_by_ids_post_response.rb new file mode 100644 index 0000000000..11d5f452bc --- /dev/null +++ b/lib/directory/deleted_items/get_by_ids/get_by_ids_post_response.rb @@ -0,0 +1,72 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../../models/directory_object' +require_relative '../../directory' +require_relative '../deleted_items' +require_relative './get_by_ids' + +module MicrosoftGraph + module Directory + module DeletedItems + module GetByIds + class GetByIdsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetByIdsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_by_ids_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetByIdsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a directory_object + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/directory/deleted_items/get_by_ids/get_by_ids_request_builder.rb b/lib/directory/deleted_items/get_by_ids/get_by_ids_request_builder.rb index 70f835359b..23cf758144 100644 --- a/lib/directory/deleted_items/get_by_ids/get_by_ids_request_builder.rb +++ b/lib/directory/deleted_items/get_by_ids/get_by_ids_request_builder.rb @@ -26,7 +26,7 @@ def initialize(path_parameters, request_adapter) ## Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_by_ids_response + ## @return a Fiber of get_by_ids_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,9 +34,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Directory::DeletedItems::GetByIds::GetByIdsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Directory::DeletedItems::GetByIds::GetByIdsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_by_ids_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetByIdsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory/deleted_items/get_by_ids/get_by_ids_response.rb b/lib/directory/deleted_items/get_by_ids/get_by_ids_response.rb deleted file mode 100644 index f8916a61e1..0000000000 --- a/lib/directory/deleted_items/get_by_ids/get_by_ids_response.rb +++ /dev/null @@ -1,72 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../../models/directory_object' -require_relative '../../directory' -require_relative '../deleted_items' -require_relative './get_by_ids' - -module MicrosoftGraph - module Directory - module DeletedItems - module GetByIds - class GetByIdsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getByIdsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_by_ids_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetByIdsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a directory_object - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/directory/deleted_items/graph_administrative_unit/count/count_request_builder.rb b/lib/directory/deleted_items/graph_administrative_unit/count/count_request_builder.rb index d273472b29..44561868d3 100644 --- a/lib/directory/deleted_items/graph_administrative_unit/count/count_request_builder.rb +++ b/lib/directory/deleted_items/graph_administrative_unit/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/graph.administrativeUnit/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/graph.administrativeUnit/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory/deleted_items/graph_administrative_unit/graph_administrative_unit_request_builder.rb b/lib/directory/deleted_items/graph_administrative_unit/graph_administrative_unit_request_builder.rb index 9955c0dc6b..ae06e32fd3 100644 --- a/lib/directory/deleted_items/graph_administrative_unit/graph_administrative_unit_request_builder.rb +++ b/lib/directory/deleted_items/graph_administrative_unit/graph_administrative_unit_request_builder.rb @@ -27,7 +27,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/graph.administrativeUnit{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection @@ -39,8 +39,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AdministrativeUnitCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -50,17 +49,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_administrative_unit_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphAdministrativeUnitRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection diff --git a/lib/directory/deleted_items/graph_application/count/count_request_builder.rb b/lib/directory/deleted_items/graph_application/count/count_request_builder.rb index bfeacc4722..60367bc2a6 100644 --- a/lib/directory/deleted_items/graph_application/count/count_request_builder.rb +++ b/lib/directory/deleted_items/graph_application/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/graph.application/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/graph.application/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory/deleted_items/graph_application/graph_application_request_builder.rb b/lib/directory/deleted_items/graph_application/graph_application_request_builder.rb index d620749cd5..fdc3ebbdb4 100644 --- a/lib/directory/deleted_items/graph_application/graph_application_request_builder.rb +++ b/lib/directory/deleted_items/graph_application/graph_application_request_builder.rb @@ -27,7 +27,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/graph.application{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/graph.application{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.application in the microsoft.graph.directoryObject collection @@ -39,8 +39,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ApplicationCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -50,17 +49,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_application_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphApplicationRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.application in the microsoft.graph.directoryObject collection diff --git a/lib/directory/deleted_items/graph_device/count/count_request_builder.rb b/lib/directory/deleted_items/graph_device/count/count_request_builder.rb index 58cf7452cb..0b6e9438f6 100644 --- a/lib/directory/deleted_items/graph_device/count/count_request_builder.rb +++ b/lib/directory/deleted_items/graph_device/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/graph.device/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/graph.device/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory/deleted_items/graph_device/graph_device_request_builder.rb b/lib/directory/deleted_items/graph_device/graph_device_request_builder.rb index 477da35256..6fa64017f3 100644 --- a/lib/directory/deleted_items/graph_device/graph_device_request_builder.rb +++ b/lib/directory/deleted_items/graph_device/graph_device_request_builder.rb @@ -27,7 +27,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/graph.device{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/graph.device{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.device in the microsoft.graph.directoryObject collection @@ -39,8 +39,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -50,17 +49,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_device_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphDeviceRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.device in the microsoft.graph.directoryObject collection diff --git a/lib/directory/deleted_items/graph_group/count/count_request_builder.rb b/lib/directory/deleted_items/graph_group/count/count_request_builder.rb index 0021cb88ee..36c9a3a65b 100644 --- a/lib/directory/deleted_items/graph_group/count/count_request_builder.rb +++ b/lib/directory/deleted_items/graph_group/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/graph.group/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/graph.group/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory/deleted_items/graph_group/graph_group_request_builder.rb b/lib/directory/deleted_items/graph_group/graph_group_request_builder.rb index 489eaf4d10..cd95fb8568 100644 --- a/lib/directory/deleted_items/graph_group/graph_group_request_builder.rb +++ b/lib/directory/deleted_items/graph_group/graph_group_request_builder.rb @@ -27,10 +27,10 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/graph.group{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/graph.group{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection + ## Retrieve a list of recently deleted directory objects. Currently, deleted items functionality is only supported for the application, servicePrincipal, group, administrative unit, and user resources. Retrieve a list of recently deleted directory objects from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal- user ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of group_collection_response ## @@ -39,31 +39,39 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::GroupCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection + ## Retrieve a list of recently deleted directory objects. Currently, deleted items functionality is only supported for the application, servicePrincipal, group, administrative unit, and user resources. Retrieve a list of recently deleted directory objects from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal- user ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_group_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphGroupRequestBuilder.new(raw_url, @request_adapter) + end ## - # Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection + # Retrieve a list of recently deleted directory objects. Currently, deleted items functionality is only supported for the application, servicePrincipal, group, administrative unit, and user resources. Retrieve a list of recently deleted directory objects from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal- user class GraphGroupRequestBuilderGetQueryParameters ## diff --git a/lib/directory/deleted_items/graph_service_principal/count/count_request_builder.rb b/lib/directory/deleted_items/graph_service_principal/count/count_request_builder.rb index 309a9c2b8f..91331709da 100644 --- a/lib/directory/deleted_items/graph_service_principal/count/count_request_builder.rb +++ b/lib/directory/deleted_items/graph_service_principal/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/graph.servicePrincipal/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/graph.servicePrincipal/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory/deleted_items/graph_service_principal/graph_service_principal_request_builder.rb b/lib/directory/deleted_items/graph_service_principal/graph_service_principal_request_builder.rb index ebfb3cad56..aa92aa4dcd 100644 --- a/lib/directory/deleted_items/graph_service_principal/graph_service_principal_request_builder.rb +++ b/lib/directory/deleted_items/graph_service_principal/graph_service_principal_request_builder.rb @@ -27,7 +27,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/graph.servicePrincipal{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/graph.servicePrincipal{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.servicePrincipal in the microsoft.graph.directoryObject collection @@ -39,8 +39,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServicePrincipalCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -50,17 +49,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_service_principal_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphServicePrincipalRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.servicePrincipal in the microsoft.graph.directoryObject collection diff --git a/lib/directory/deleted_items/graph_user/count/count_request_builder.rb b/lib/directory/deleted_items/graph_user/count/count_request_builder.rb index 842a338644..fb26bffb6b 100644 --- a/lib/directory/deleted_items/graph_user/count/count_request_builder.rb +++ b/lib/directory/deleted_items/graph_user/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/graph.user/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/graph.user/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory/deleted_items/graph_user/graph_user_request_builder.rb b/lib/directory/deleted_items/graph_user/graph_user_request_builder.rb index c392be0af2..bcafc6c2fd 100644 --- a/lib/directory/deleted_items/graph_user/graph_user_request_builder.rb +++ b/lib/directory/deleted_items/graph_user/graph_user_request_builder.rb @@ -27,7 +27,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/graph.user{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/graph.user{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.user in the microsoft.graph.directoryObject collection @@ -39,8 +39,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -50,17 +49,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_user_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphUserRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.user in the microsoft.graph.directoryObject collection diff --git a/lib/directory/deleted_items/item/check_member_groups/check_member_groups.rb b/lib/directory/deleted_items/item/check_member_groups/check_member_groups.rb index 938b908522..98148024fe 100644 --- a/lib/directory/deleted_items/item/check_member_groups/check_member_groups.rb +++ b/lib/directory/deleted_items/item/check_member_groups/check_member_groups.rb @@ -1,2 +1,2 @@ require_relative 'check_member_groups_post_request_body' -require_relative 'check_member_groups_response' +require_relative 'check_member_groups_post_response' diff --git a/lib/directory/deleted_items/item/check_member_groups/check_member_groups_post_request_body.rb b/lib/directory/deleted_items/item/check_member_groups/check_member_groups_post_request_body.rb index 340edb4929..4b34ba7efb 100644 --- a/lib/directory/deleted_items/item/check_member_groups/check_member_groups_post_request_body.rb +++ b/lib/directory/deleted_items/item/check_member_groups/check_member_groups_post_request_body.rb @@ -19,22 +19,22 @@ class CheckMemberGroupsPostRequestBody # The groupIds property @group_ids ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new checkMemberGroupsPostRequestBody and sets the default values. + ## Instantiates a new CheckMemberGroupsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory/deleted_items/item/check_member_groups/check_member_groups_post_response.rb b/lib/directory/deleted_items/item/check_member_groups/check_member_groups_post_response.rb new file mode 100644 index 0000000000..006ef00842 --- /dev/null +++ b/lib/directory/deleted_items/item/check_member_groups/check_member_groups_post_response.rb @@ -0,0 +1,74 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/base_collection_pagination_count_response' +require_relative '../../../directory' +require_relative '../../deleted_items' +require_relative '../item' +require_relative './check_member_groups' + +module MicrosoftGraph + module Directory + module DeletedItems + module Item + module CheckMemberGroups + class CheckMemberGroupsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new CheckMemberGroupsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a check_member_groups_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CheckMemberGroupsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end +end diff --git a/lib/directory/deleted_items/item/check_member_groups/check_member_groups_request_builder.rb b/lib/directory/deleted_items/item/check_member_groups/check_member_groups_request_builder.rb index 2a4d2e97eb..cf27f5ca1c 100644 --- a/lib/directory/deleted_items/item/check_member_groups/check_member_groups_request_builder.rb +++ b/lib/directory/deleted_items/item/check_member_groups/check_member_groups_request_builder.rb @@ -25,10 +25,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/checkMemberGroups") end ## - ## Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + ## Check for membership in a specified list of group IDs, and return from that list the IDs of groups where a specified object is a member. The specified object can be of one of the following types:- user- group- service principal- organizational contact- device- directory object This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of check_member_groups_response + ## @return a Fiber of check_member_groups_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -36,12 +36,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Directory::DeletedItems::Item::CheckMemberGroups::CheckMemberGroupsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Directory::DeletedItems::Item::CheckMemberGroups::CheckMemberGroupsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + ## Check for membership in a specified list of group IDs, and return from that list the IDs of groups where a specified object is a member. The specified object can be of one of the following types:- user- group- service principal- organizational contact- device- directory object This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -49,17 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a check_member_groups_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CheckMemberGroupsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory/deleted_items/item/check_member_groups/check_member_groups_response.rb b/lib/directory/deleted_items/item/check_member_groups/check_member_groups_response.rb deleted file mode 100644 index bd7e173b4c..0000000000 --- a/lib/directory/deleted_items/item/check_member_groups/check_member_groups_response.rb +++ /dev/null @@ -1,74 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../../models/base_collection_pagination_count_response' -require_relative '../../../directory' -require_relative '../../deleted_items' -require_relative '../item' -require_relative './check_member_groups' - -module MicrosoftGraph - module Directory - module DeletedItems - module Item - module CheckMemberGroups - class CheckMemberGroupsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new checkMemberGroupsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a check_member_groups_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return CheckMemberGroupsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end -end diff --git a/lib/directory/deleted_items/item/check_member_objects/check_member_objects.rb b/lib/directory/deleted_items/item/check_member_objects/check_member_objects.rb index 67fbf971e7..1826285d49 100644 --- a/lib/directory/deleted_items/item/check_member_objects/check_member_objects.rb +++ b/lib/directory/deleted_items/item/check_member_objects/check_member_objects.rb @@ -1,2 +1,2 @@ require_relative 'check_member_objects_post_request_body' -require_relative 'check_member_objects_response' +require_relative 'check_member_objects_post_response' diff --git a/lib/directory/deleted_items/item/check_member_objects/check_member_objects_post_request_body.rb b/lib/directory/deleted_items/item/check_member_objects/check_member_objects_post_request_body.rb index d81280cfbd..4caa93ef4d 100644 --- a/lib/directory/deleted_items/item/check_member_objects/check_member_objects_post_request_body.rb +++ b/lib/directory/deleted_items/item/check_member_objects/check_member_objects_post_request_body.rb @@ -19,22 +19,22 @@ class CheckMemberObjectsPostRequestBody # The ids property @ids ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new checkMemberObjectsPostRequestBody and sets the default values. + ## Instantiates a new CheckMemberObjectsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory/deleted_items/item/check_member_objects/check_member_objects_post_response.rb b/lib/directory/deleted_items/item/check_member_objects/check_member_objects_post_response.rb new file mode 100644 index 0000000000..30200a368f --- /dev/null +++ b/lib/directory/deleted_items/item/check_member_objects/check_member_objects_post_response.rb @@ -0,0 +1,74 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/base_collection_pagination_count_response' +require_relative '../../../directory' +require_relative '../../deleted_items' +require_relative '../item' +require_relative './check_member_objects' + +module MicrosoftGraph + module Directory + module DeletedItems + module Item + module CheckMemberObjects + class CheckMemberObjectsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new CheckMemberObjectsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a check_member_objects_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CheckMemberObjectsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end +end diff --git a/lib/directory/deleted_items/item/check_member_objects/check_member_objects_request_builder.rb b/lib/directory/deleted_items/item/check_member_objects/check_member_objects_request_builder.rb index a04a880ce5..1415d22259 100644 --- a/lib/directory/deleted_items/item/check_member_objects/check_member_objects_request_builder.rb +++ b/lib/directory/deleted_items/item/check_member_objects/check_member_objects_request_builder.rb @@ -28,7 +28,7 @@ def initialize(path_parameters, request_adapter) ## Invoke action checkMemberObjects ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of check_member_objects_response + ## @return a Fiber of check_member_objects_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -36,9 +36,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Directory::DeletedItems::Item::CheckMemberObjects::CheckMemberObjectsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Directory::DeletedItems::Item::CheckMemberObjects::CheckMemberObjectsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Invoke action checkMemberObjects @@ -49,17 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a check_member_objects_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CheckMemberObjectsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory/deleted_items/item/check_member_objects/check_member_objects_response.rb b/lib/directory/deleted_items/item/check_member_objects/check_member_objects_response.rb deleted file mode 100644 index a66e54159e..0000000000 --- a/lib/directory/deleted_items/item/check_member_objects/check_member_objects_response.rb +++ /dev/null @@ -1,74 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../../models/base_collection_pagination_count_response' -require_relative '../../../directory' -require_relative '../../deleted_items' -require_relative '../item' -require_relative './check_member_objects' - -module MicrosoftGraph - module Directory - module DeletedItems - module Item - module CheckMemberObjects - class CheckMemberObjectsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new checkMemberObjectsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a check_member_objects_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return CheckMemberObjectsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end -end diff --git a/lib/directory/deleted_items/item/directory_object_item_request_builder.rb b/lib/directory/deleted_items/item/directory_object_item_request_builder.rb index 273d03ed1e..5394b293e3 100644 --- a/lib/directory/deleted_items/item/directory_object_item_request_builder.rb +++ b/lib/directory/deleted_items/item/directory_object_item_request_builder.rb @@ -87,10 +87,10 @@ def restore() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}{?%24expand,%24select}") end ## - ## Permanently delete a recently deleted application, group, servicePrincipal, or user object from deleted items. After an item is permanently deleted, it cannot be restored. Administrative units cannot be permanently deleted by using the deletedItems API. Soft-deleted administrative units will be permanently deleted 30 days after initial deletion unless they are restored. + ## Permanently delete a recently deleted application, group, servicePrincipal, or user object from deleted items. After an item is permanently deleted, it cannot be restored. Permanently delete a recently deleted directory object from deleted items. The following types are supported:- certificateBasedAuthPki- certificateAuthorityDetail After an item is permanently deleted, it cannot be restored. Administrative units cannot be permanently deleted by using the deletedItems API. Soft-deleted administrative units will be permanently deleted 30 days after initial deletion unless they are restored. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void ## @@ -99,12 +99,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Retrieve the properties of a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. + ## Retrieve the properties of a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. Retrieve the properties of a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal- user ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_object ## @@ -113,83 +112,56 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Update the navigation property deletedItems in directory - ## @param body The request body - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of directory_object - ## - def patch(body, request_configuration=nil) - raise StandardError, 'body cannot be null' if body.nil? - request_info = self.to_patch_request_information( - body, request_configuration - ) - error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }, error_mapping) - end - ## - ## Permanently delete a recently deleted application, group, servicePrincipal, or user object from deleted items. After an item is permanently deleted, it cannot be restored. Administrative units cannot be permanently deleted by using the deletedItems API. Soft-deleted administrative units will be permanently deleted 30 days after initial deletion unless they are restored. + ## Permanently delete a recently deleted application, group, servicePrincipal, or user object from deleted items. After an item is permanently deleted, it cannot be restored. Permanently delete a recently deleted directory object from deleted items. The following types are supported:- certificateBasedAuthPki- certificateAuthorityDetail After an item is permanently deleted, it cannot be restored. Administrative units cannot be permanently deleted by using the deletedItems API. Soft-deleted administrative units will be permanently deleted 30 days after initial deletion unless they are restored. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Retrieve the properties of a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. + ## Retrieve the properties of a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. Retrieve the properties of a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal- user ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Update the navigation property deletedItems in directory - ## @param body The request body - ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a request_information + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a directory_object_item_request_builder ## - def to_patch_request_information(body, request_configuration=nil) - raise StandardError, 'body cannot be null' if body.nil? - request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') - unless request_configuration.nil? - request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.add_request_options(request_configuration.options) - end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) - return request_info + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DirectoryObjectItemRequestBuilder.new(raw_url, @request_adapter) end ## - # Retrieve the properties of a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. + # Retrieve the properties of a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. Retrieve the properties of a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal- user class DirectoryObjectItemRequestBuilderGetQueryParameters ## diff --git a/lib/directory/deleted_items/item/get_member_groups/get_member_groups.rb b/lib/directory/deleted_items/item/get_member_groups/get_member_groups.rb index 0a25b012ea..9190b99738 100644 --- a/lib/directory/deleted_items/item/get_member_groups/get_member_groups.rb +++ b/lib/directory/deleted_items/item/get_member_groups/get_member_groups.rb @@ -1,2 +1,2 @@ require_relative 'get_member_groups_post_request_body' -require_relative 'get_member_groups_response' +require_relative 'get_member_groups_post_response' diff --git a/lib/directory/deleted_items/item/get_member_groups/get_member_groups_post_request_body.rb b/lib/directory/deleted_items/item/get_member_groups/get_member_groups_post_request_body.rb index f682fbe1a4..51a1a01bc5 100644 --- a/lib/directory/deleted_items/item/get_member_groups/get_member_groups_post_request_body.rb +++ b/lib/directory/deleted_items/item/get_member_groups/get_member_groups_post_request_body.rb @@ -19,22 +19,22 @@ class GetMemberGroupsPostRequestBody # The securityEnabledOnly property @security_enabled_only ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getMemberGroupsPostRequestBody and sets the default values. + ## Instantiates a new GetMemberGroupsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory/deleted_items/item/get_member_groups/get_member_groups_post_response.rb b/lib/directory/deleted_items/item/get_member_groups/get_member_groups_post_response.rb new file mode 100644 index 0000000000..e523919f54 --- /dev/null +++ b/lib/directory/deleted_items/item/get_member_groups/get_member_groups_post_response.rb @@ -0,0 +1,74 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/base_collection_pagination_count_response' +require_relative '../../../directory' +require_relative '../../deleted_items' +require_relative '../item' +require_relative './get_member_groups' + +module MicrosoftGraph + module Directory + module DeletedItems + module Item + module GetMemberGroups + class GetMemberGroupsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetMemberGroupsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_member_groups_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetMemberGroupsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end +end diff --git a/lib/directory/deleted_items/item/get_member_groups/get_member_groups_request_builder.rb b/lib/directory/deleted_items/item/get_member_groups/get_member_groups_request_builder.rb index 0dd8fb508f..f2e4359352 100644 --- a/lib/directory/deleted_items/item/get_member_groups/get_member_groups_request_builder.rb +++ b/lib/directory/deleted_items/item/get_member_groups/get_member_groups_request_builder.rb @@ -25,10 +25,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/getMemberGroups") end ## - ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. + ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the DirectoryResultSizeLimitExceeded error code. If you get the DirectoryResultSizeLimitExceeded error code, use the List group transitive memberOf API instead. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_member_groups_response + ## @return a Fiber of get_member_groups_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -36,12 +36,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Directory::DeletedItems::Item::GetMemberGroups::GetMemberGroupsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Directory::DeletedItems::Item::GetMemberGroups::GetMemberGroupsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. + ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the DirectoryResultSizeLimitExceeded error code. If you get the DirectoryResultSizeLimitExceeded error code, use the List group transitive memberOf API instead. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -49,17 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_member_groups_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetMemberGroupsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory/deleted_items/item/get_member_groups/get_member_groups_response.rb b/lib/directory/deleted_items/item/get_member_groups/get_member_groups_response.rb deleted file mode 100644 index 5c39d79408..0000000000 --- a/lib/directory/deleted_items/item/get_member_groups/get_member_groups_response.rb +++ /dev/null @@ -1,74 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../../models/base_collection_pagination_count_response' -require_relative '../../../directory' -require_relative '../../deleted_items' -require_relative '../item' -require_relative './get_member_groups' - -module MicrosoftGraph - module Directory - module DeletedItems - module Item - module GetMemberGroups - class GetMemberGroupsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getMemberGroupsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_member_groups_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetMemberGroupsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end -end diff --git a/lib/directory/deleted_items/item/get_member_objects/get_member_objects.rb b/lib/directory/deleted_items/item/get_member_objects/get_member_objects.rb index 40edad6b9e..f7a486b0f9 100644 --- a/lib/directory/deleted_items/item/get_member_objects/get_member_objects.rb +++ b/lib/directory/deleted_items/item/get_member_objects/get_member_objects.rb @@ -1,2 +1,2 @@ require_relative 'get_member_objects_post_request_body' -require_relative 'get_member_objects_response' +require_relative 'get_member_objects_post_response' diff --git a/lib/directory/deleted_items/item/get_member_objects/get_member_objects_post_request_body.rb b/lib/directory/deleted_items/item/get_member_objects/get_member_objects_post_request_body.rb index 2b5f9208a5..57285576a4 100644 --- a/lib/directory/deleted_items/item/get_member_objects/get_member_objects_post_request_body.rb +++ b/lib/directory/deleted_items/item/get_member_objects/get_member_objects_post_request_body.rb @@ -19,22 +19,22 @@ class GetMemberObjectsPostRequestBody # The securityEnabledOnly property @security_enabled_only ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getMemberObjectsPostRequestBody and sets the default values. + ## Instantiates a new GetMemberObjectsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory/deleted_items/item/get_member_objects/get_member_objects_post_response.rb b/lib/directory/deleted_items/item/get_member_objects/get_member_objects_post_response.rb new file mode 100644 index 0000000000..921ec10ec7 --- /dev/null +++ b/lib/directory/deleted_items/item/get_member_objects/get_member_objects_post_response.rb @@ -0,0 +1,74 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/base_collection_pagination_count_response' +require_relative '../../../directory' +require_relative '../../deleted_items' +require_relative '../item' +require_relative './get_member_objects' + +module MicrosoftGraph + module Directory + module DeletedItems + module Item + module GetMemberObjects + class GetMemberObjectsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetMemberObjectsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_member_objects_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetMemberObjectsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end +end diff --git a/lib/directory/deleted_items/item/get_member_objects/get_member_objects_request_builder.rb b/lib/directory/deleted_items/item/get_member_objects/get_member_objects_request_builder.rb index 24a4b0f25c..f6732b6875 100644 --- a/lib/directory/deleted_items/item/get_member_objects/get_member_objects_request_builder.rb +++ b/lib/directory/deleted_items/item/get_member_objects/get_member_objects_request_builder.rb @@ -25,10 +25,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/getMemberObjects") end ## - ## Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + ## Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:- user- group- service principal- organizational contact- device- directory object This function is transitive. Only users and role-enabled groups can be members of directory roles. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_member_objects_response + ## @return a Fiber of get_member_objects_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -36,12 +36,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Directory::DeletedItems::Item::GetMemberObjects::GetMemberObjectsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Directory::DeletedItems::Item::GetMemberObjects::GetMemberObjectsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + ## Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:- user- group- service principal- organizational contact- device- directory object This function is transitive. Only users and role-enabled groups can be members of directory roles. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -49,17 +48,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_member_objects_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetMemberObjectsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory/deleted_items/item/get_member_objects/get_member_objects_response.rb b/lib/directory/deleted_items/item/get_member_objects/get_member_objects_response.rb deleted file mode 100644 index 7339acb563..0000000000 --- a/lib/directory/deleted_items/item/get_member_objects/get_member_objects_response.rb +++ /dev/null @@ -1,74 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../microsoft_graph' -require_relative '../../../../models/base_collection_pagination_count_response' -require_relative '../../../directory' -require_relative '../../deleted_items' -require_relative '../item' -require_relative './get_member_objects' - -module MicrosoftGraph - module Directory - module DeletedItems - module Item - module GetMemberObjects - class GetMemberObjectsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getMemberObjectsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_member_objects_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetMemberObjectsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end -end diff --git a/lib/directory/deleted_items/item/graph_administrative_unit/graph_administrative_unit_request_builder.rb b/lib/directory/deleted_items/item/graph_administrative_unit/graph_administrative_unit_request_builder.rb index 814608e89c..0da469da8d 100644 --- a/lib/directory/deleted_items/item/graph_administrative_unit/graph_administrative_unit_request_builder.rb +++ b/lib/directory/deleted_items/item/graph_administrative_unit/graph_administrative_unit_request_builder.rb @@ -23,7 +23,7 @@ class GraphAdministrativeUnitRequestBuilder < MicrosoftKiotaAbstractions::BaseRe ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/graph.administrativeUnit{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit @@ -35,8 +35,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::AdministrativeUnit.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -46,17 +45,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_administrative_unit_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphAdministrativeUnitRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit diff --git a/lib/directory/deleted_items/item/graph_application/graph_application_request_builder.rb b/lib/directory/deleted_items/item/graph_application/graph_application_request_builder.rb index 2a08283ef1..7c54449f4d 100644 --- a/lib/directory/deleted_items/item/graph_application/graph_application_request_builder.rb +++ b/lib/directory/deleted_items/item/graph_application/graph_application_request_builder.rb @@ -23,7 +23,7 @@ class GraphApplicationRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBu ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/graph.application{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/graph.application{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.application @@ -35,8 +35,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Application.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -46,17 +45,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_application_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphApplicationRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.application diff --git a/lib/directory/deleted_items/item/graph_device/graph_device_request_builder.rb b/lib/directory/deleted_items/item/graph_device/graph_device_request_builder.rb index 12671a530c..2580f90776 100644 --- a/lib/directory/deleted_items/item/graph_device/graph_device_request_builder.rb +++ b/lib/directory/deleted_items/item/graph_device/graph_device_request_builder.rb @@ -23,7 +23,7 @@ class GraphDeviceRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/graph.device{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/graph.device{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.device @@ -35,8 +35,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Device.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -46,17 +45,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_device_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphDeviceRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.device diff --git a/lib/directory/deleted_items/item/graph_group/graph_group_request_builder.rb b/lib/directory/deleted_items/item/graph_group/graph_group_request_builder.rb index 9b82a7a02c..d708ebd146 100644 --- a/lib/directory/deleted_items/item/graph_group/graph_group_request_builder.rb +++ b/lib/directory/deleted_items/item/graph_group/graph_group_request_builder.rb @@ -23,10 +23,10 @@ class GraphGroupRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/graph.group{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/graph.group{?%24expand,%24select}") end ## - ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.group + ## Retrieve a list of recently deleted directory objects. Currently, deleted items functionality is only supported for the application, servicePrincipal, group, administrative unit, and user resources. Retrieve a list of recently deleted directory objects from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal- user ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of group ## @@ -35,31 +35,39 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Group.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.group + ## Retrieve a list of recently deleted directory objects. Currently, deleted items functionality is only supported for the application, servicePrincipal, group, administrative unit, and user resources. Retrieve a list of recently deleted directory objects from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal- user ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_group_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphGroupRequestBuilder.new(raw_url, @request_adapter) + end ## - # Get the item of type microsoft.graph.directoryObject as microsoft.graph.group + # Retrieve a list of recently deleted directory objects. Currently, deleted items functionality is only supported for the application, servicePrincipal, group, administrative unit, and user resources. Retrieve a list of recently deleted directory objects from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal- user class GraphGroupRequestBuilderGetQueryParameters ## diff --git a/lib/directory/deleted_items/item/graph_service_principal/graph_service_principal_request_builder.rb b/lib/directory/deleted_items/item/graph_service_principal/graph_service_principal_request_builder.rb index dae3aefef8..604d974722 100644 --- a/lib/directory/deleted_items/item/graph_service_principal/graph_service_principal_request_builder.rb +++ b/lib/directory/deleted_items/item/graph_service_principal/graph_service_principal_request_builder.rb @@ -23,7 +23,7 @@ class GraphServicePrincipalRequestBuilder < MicrosoftKiotaAbstractions::BaseRequ ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/graph.servicePrincipal{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/graph.servicePrincipal{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.servicePrincipal @@ -35,8 +35,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServicePrincipal.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -46,17 +45,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_service_principal_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphServicePrincipalRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.servicePrincipal diff --git a/lib/directory/deleted_items/item/graph_user/graph_user_request_builder.rb b/lib/directory/deleted_items/item/graph_user/graph_user_request_builder.rb index 0594c67f8a..aa57e85363 100644 --- a/lib/directory/deleted_items/item/graph_user/graph_user_request_builder.rb +++ b/lib/directory/deleted_items/item/graph_user/graph_user_request_builder.rb @@ -23,7 +23,7 @@ class GraphUserRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/graph.user{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/graph.user{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.user @@ -35,8 +35,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::User.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -46,17 +45,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_user_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphUserRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.user diff --git a/lib/directory/deleted_items/item/restore/restore_request_builder.rb b/lib/directory/deleted_items/item/restore/restore_request_builder.rb index 5786c28cbc..43e44c2ebe 100644 --- a/lib/directory/deleted_items/item/restore/restore_request_builder.rb +++ b/lib/directory/deleted_items/item/restore/restore_request_builder.rb @@ -26,7 +26,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/{directoryObject%2Did}/restore") end ## - ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. Restore a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_object ## @@ -35,27 +35,35 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. Restore a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a restore_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RestoreRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory/deleted_items/validate_properties/validate_properties_post_request_body.rb b/lib/directory/deleted_items/validate_properties/validate_properties_post_request_body.rb index 42a4b8b16b..e47a5948ed 100644 --- a/lib/directory/deleted_items/validate_properties/validate_properties_post_request_body.rb +++ b/lib/directory/deleted_items/validate_properties/validate_properties_post_request_body.rb @@ -26,22 +26,22 @@ class ValidatePropertiesPostRequestBody # The onBehalfOfUserId property @on_behalf_of_user_id ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new validatePropertiesPostRequestBody and sets the default values. + ## Instantiates a new ValidatePropertiesPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory/deleted_items/validate_properties/validate_properties_request_builder.rb b/lib/directory/deleted_items/validate_properties/validate_properties_request_builder.rb index 5084d926ed..ce4ddd2896 100644 --- a/lib/directory/deleted_items/validate_properties/validate_properties_request_builder.rb +++ b/lib/directory/deleted_items/validate_properties/validate_properties_request_builder.rb @@ -23,7 +23,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/directory/deletedItems/validateProperties") end ## - ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you're only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void @@ -34,12 +34,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you're only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a validate_properties_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ValidatePropertiesRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/me/device_management_troubleshooting_events/count/count.rb b/lib/directory/device_local_credentials/count/count.rb similarity index 100% rename from lib/me/device_management_troubleshooting_events/count/count.rb rename to lib/directory/device_local_credentials/count/count.rb diff --git a/lib/directory/device_local_credentials/count/count_request_builder.rb b/lib/directory/device_local_credentials/count/count_request_builder.rb new file mode 100644 index 0000000000..afe155775c --- /dev/null +++ b/lib/directory/device_local_credentials/count/count_request_builder.rb @@ -0,0 +1,97 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../directory' +require_relative '../device_local_credentials' +require_relative './count' + +module MicrosoftGraph + module Directory + module DeviceLocalCredentials + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/directory/deviceLocalCredentials/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/last_message_preview/last_message_preview.rb b/lib/directory/device_local_credentials/device_local_credentials.rb similarity index 100% rename from lib/me/chats/item/last_message_preview/last_message_preview.rb rename to lib/directory/device_local_credentials/device_local_credentials.rb diff --git a/lib/directory/device_local_credentials/device_local_credentials_request_builder.rb b/lib/directory/device_local_credentials/device_local_credentials_request_builder.rb new file mode 100644 index 0000000000..a024bab150 --- /dev/null +++ b/lib/directory/device_local_credentials/device_local_credentials_request_builder.rb @@ -0,0 +1,179 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/device_local_credential_info' +require_relative '../../models/device_local_credential_info_collection_response' +require_relative '../../models/o_data_errors_o_data_error' +require_relative '../directory' +require_relative './count/count_request_builder' +require_relative './device_local_credentials' +require_relative './item/device_local_credential_info_item_request_builder' + +module MicrosoftGraph + module Directory + module DeviceLocalCredentials + ## + # Provides operations to manage the deviceLocalCredentials property of the microsoft.graph.directory entity. + class DeviceLocalCredentialsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::Directory::DeviceLocalCredentials::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the deviceLocalCredentials property of the microsoft.graph.directory entity. + ## @param device_local_credential_info_id The unique identifier of deviceLocalCredentialInfo + ## @return a device_local_credential_info_item_request_builder + ## + def by_device_local_credential_info_id(device_local_credential_info_id) + raise StandardError, 'device_local_credential_info_id cannot be null' if device_local_credential_info_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["deviceLocalCredentialInfo%2Did"] = device_local_credential_info_id + return MicrosoftGraph::Directory::DeviceLocalCredentials::Item::DeviceLocalCredentialInfoItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new DeviceLocalCredentialsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/directory/deviceLocalCredentials{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Get a list of the deviceLocalCredentialInfo objects and their properties, excluding the credentials property. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of device_local_credential_info_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceLocalCredentialInfoCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to deviceLocalCredentials for directory + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of device_local_credential_info + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceLocalCredentialInfo.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get a list of the deviceLocalCredentialInfo objects and their properties, excluding the credentials property. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to deviceLocalCredentials for directory + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_local_credentials_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceLocalCredentialsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get a list of the deviceLocalCredentialInfo objects and their properties, excluding the credentials property. + class DeviceLocalCredentialsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end +end diff --git a/lib/directory/device_local_credentials/item/device_local_credential_info_item_request_builder.rb b/lib/directory/device_local_credentials/item/device_local_credential_info_item_request_builder.rb new file mode 100644 index 0000000000..e39208c58d --- /dev/null +++ b/lib/directory/device_local_credentials/item/device_local_credential_info_item_request_builder.rb @@ -0,0 +1,163 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/device_local_credential_info' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../directory' +require_relative '../device_local_credentials' +require_relative './item' + +module MicrosoftGraph + module Directory + module DeviceLocalCredentials + module Item + ## + # Provides operations to manage the deviceLocalCredentials property of the microsoft.graph.directory entity. + class DeviceLocalCredentialInfoItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new DeviceLocalCredentialInfoItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/directory/deviceLocalCredentials/{deviceLocalCredentialInfo%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property deviceLocalCredentials for directory + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Retrieve the properties of a deviceLocalCredentialInfo for a specified device object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of device_local_credential_info + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceLocalCredentialInfo.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property deviceLocalCredentials in directory + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of device_local_credential_info + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceLocalCredentialInfo.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property deviceLocalCredentials for directory + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Retrieve the properties of a deviceLocalCredentialInfo for a specified device object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property deviceLocalCredentials in directory + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a device_local_credential_info_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeviceLocalCredentialInfoItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Retrieve the properties of a deviceLocalCredentialInfo for a specified device object. + class DeviceLocalCredentialInfoItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/tabs/item/item.rb b/lib/directory/device_local_credentials/item/item.rb similarity index 100% rename from lib/me/chats/item/tabs/item/item.rb rename to lib/directory/device_local_credentials/item/item.rb diff --git a/lib/directory/directory_request_builder.rb b/lib/directory/directory_request_builder.rb index 685f79e863..8ca040eb8a 100644 --- a/lib/directory/directory_request_builder.rb +++ b/lib/directory/directory_request_builder.rb @@ -6,9 +6,13 @@ require_relative './attribute_sets/attribute_sets_request_builder' require_relative './custom_security_attribute_definitions/custom_security_attribute_definitions_request_builder' require_relative './deleted_items/deleted_items_request_builder' +require_relative './device_local_credentials/device_local_credentials_request_builder' require_relative './directory' require_relative './federation_configurations/federation_configurations_request_builder' require_relative './on_premises_synchronization/on_premises_synchronization_request_builder' +require_relative './public_key_infrastructure/public_key_infrastructure_request_builder' +require_relative './subscriptions/subscriptions_request_builder' +require_relative './subscriptions_with_commerce_subscription_id/subscriptions_with_commerce_subscription_id_request_builder' module MicrosoftGraph module Directory @@ -37,6 +41,11 @@ def deleted_items() return MicrosoftGraph::Directory::DeletedItems::DeletedItemsRequestBuilder.new(@path_parameters, @request_adapter) end ## + # Provides operations to manage the deviceLocalCredentials property of the microsoft.graph.directory entity. + def device_local_credentials() + return MicrosoftGraph::Directory::DeviceLocalCredentials::DeviceLocalCredentialsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## # Provides operations to manage the federationConfigurations property of the microsoft.graph.directory entity. def federation_configurations() return MicrosoftGraph::Directory::FederationConfigurations::FederationConfigurationsRequestBuilder.new(@path_parameters, @request_adapter) @@ -47,13 +56,23 @@ def on_premises_synchronization() return MicrosoftGraph::Directory::OnPremisesSynchronization::OnPremisesSynchronizationRequestBuilder.new(@path_parameters, @request_adapter) end ## + # Provides operations to manage the publicKeyInfrastructure property of the microsoft.graph.directory entity. + def public_key_infrastructure() + return MicrosoftGraph::Directory::PublicKeyInfrastructure::PublicKeyInfrastructureRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to manage the subscriptions property of the microsoft.graph.directory entity. + def subscriptions() + return MicrosoftGraph::Directory::Subscriptions::SubscriptionsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## ## Instantiates a new DirectoryRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request ## @param request_adapter The request adapter to use to execute the requests. ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory{?%24expand,%24select}") end ## ## Get directory @@ -65,8 +84,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Directory.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,26 +99,34 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Directory.create_from_discriminator_value(pn) }, error_mapping) end ## + ## Provides operations to manage the subscriptions property of the microsoft.graph.directory entity. + ## @param commerce_subscription_id Alternate key of companySubscription + ## @return a subscriptions_with_commerce_subscription_id_request_builder + ## + def subscriptions_with_commerce_subscription_id(commerce_subscription_id) + raise StandardError, 'commerce_subscription_id cannot be null' if commerce_subscription_id.nil? + return SubscriptionsWithCommerceSubscriptionIdRequestBuilder.new(@path_parameters, @request_adapter, commerceSubscriptionId) + end + ## ## Get directory ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,17 +138,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a directory_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DirectoryRequestBuilder.new(raw_url, @request_adapter) + end ## # Get directory diff --git a/lib/directory/federation_configurations/available_provider_types/available_provider_types.rb b/lib/directory/federation_configurations/available_provider_types/available_provider_types.rb index 68984e83c5..2ad3288b41 100644 --- a/lib/directory/federation_configurations/available_provider_types/available_provider_types.rb +++ b/lib/directory/federation_configurations/available_provider_types/available_provider_types.rb @@ -1 +1 @@ -require_relative 'available_provider_types_response' +require_relative 'available_provider_types_get_response' diff --git a/lib/directory/federation_configurations/available_provider_types/available_provider_types_get_response.rb b/lib/directory/federation_configurations/available_provider_types/available_provider_types_get_response.rb new file mode 100644 index 0000000000..e52095a63e --- /dev/null +++ b/lib/directory/federation_configurations/available_provider_types/available_provider_types_get_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../directory' +require_relative '../federation_configurations' +require_relative './available_provider_types' + +module MicrosoftGraph + module Directory + module FederationConfigurations + module AvailableProviderTypes + class AvailableProviderTypesGetResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new AvailableProviderTypesGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a available_provider_types_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return AvailableProviderTypesGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/directory/federation_configurations/available_provider_types/available_provider_types_request_builder.rb b/lib/directory/federation_configurations/available_provider_types/available_provider_types_request_builder.rb index 01d934006c..7d644ccc00 100644 --- a/lib/directory/federation_configurations/available_provider_types/available_provider_types_request_builder.rb +++ b/lib/directory/federation_configurations/available_provider_types/available_provider_types_request_builder.rb @@ -20,43 +20,51 @@ class AvailableProviderTypesRequestBuilder < MicrosoftKiotaAbstractions::BaseReq ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/federationConfigurations/availableProviderTypes(){?%24top,%24skip,%24search,%24filter,%24count}") + super(path_parameters, request_adapter, "{+baseurl}/directory/federationConfigurations/availableProviderTypes(){?%24count,%24filter,%24search,%24skip,%24top}") end ## - ## Invoke function availableProviderTypes + ## Get all identity providers supported in a directory. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of available_provider_types_response + ## @return a Fiber of available_provider_types_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Directory::FederationConfigurations::AvailableProviderTypes::AvailableProviderTypesResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Directory::FederationConfigurations::AvailableProviderTypes::AvailableProviderTypesGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Invoke function availableProviderTypes + ## Get all identity providers supported in a directory. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a available_provider_types_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AvailableProviderTypesRequestBuilder.new(raw_url, @request_adapter) + end ## - # Invoke function availableProviderTypes + # Get all identity providers supported in a directory. class AvailableProviderTypesRequestBuilderGetQueryParameters ## diff --git a/lib/directory/federation_configurations/available_provider_types/available_provider_types_response.rb b/lib/directory/federation_configurations/available_provider_types/available_provider_types_response.rb deleted file mode 100644 index 7f9e902315..0000000000 --- a/lib/directory/federation_configurations/available_provider_types/available_provider_types_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../directory' -require_relative '../federation_configurations' -require_relative './available_provider_types' - -module MicrosoftGraph - module Directory - module FederationConfigurations - module AvailableProviderTypes - class AvailableProviderTypesResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new availableProviderTypesResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a available_provider_types_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return AvailableProviderTypesResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/directory/federation_configurations/count/count_request_builder.rb b/lib/directory/federation_configurations/count/count_request_builder.rb index d2f0dca9c1..7308a2145f 100644 --- a/lib/directory/federation_configurations/count/count_request_builder.rb +++ b/lib/directory/federation_configurations/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/federationConfigurations/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directory/federationConfigurations/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory/federation_configurations/federation_configurations_request_builder.rb b/lib/directory/federation_configurations/federation_configurations_request_builder.rb index d4ee91e0b4..076393bb05 100644 --- a/lib/directory/federation_configurations/federation_configurations_request_builder.rb +++ b/lib/directory/federation_configurations/federation_configurations_request_builder.rb @@ -44,7 +44,7 @@ def by_identity_provider_base_id(identity_provider_base_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/federationConfigurations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/federationConfigurations{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Configure domain federation with organizations whose identity provider (IdP) supports either the SAML or WS-Fed protocol. @@ -56,8 +56,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::IdentityProviderBaseCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -72,8 +71,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::IdentityProviderBase.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -83,15 +81,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -103,17 +101,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a federation_configurations_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return FederationConfigurationsRequestBuilder.new(raw_url, @request_adapter) + end ## # Configure domain federation with organizations whose identity provider (IdP) supports either the SAML or WS-Fed protocol. diff --git a/lib/directory/federation_configurations/item/identity_provider_base_item_request_builder.rb b/lib/directory/federation_configurations/item/identity_provider_base_item_request_builder.rb index 8271103a7d..841d38ba4b 100644 --- a/lib/directory/federation_configurations/item/identity_provider_base_item_request_builder.rb +++ b/lib/directory/federation_configurations/item/identity_provider_base_item_request_builder.rb @@ -21,7 +21,7 @@ class IdentityProviderBaseItemRequestBuilder < MicrosoftKiotaAbstractions::BaseR ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/federationConfigurations/{identityProviderBase%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/federationConfigurations/{identityProviderBase%2Did}{?%24expand,%24select}") end ## ## Delete a samlOrWsFedExternalDomainFederation object. @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::IdentityProviderBase.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::IdentityProviderBase.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a identity_provider_base_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return IdentityProviderBaseItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Configure domain federation with organizations whose identity provider (IdP) supports either the SAML or WS-Fed protocol. diff --git a/lib/directory/on_premises_synchronization/count/count_request_builder.rb b/lib/directory/on_premises_synchronization/count/count_request_builder.rb index 849299d729..2066efa69f 100644 --- a/lib/directory/on_premises_synchronization/count/count_request_builder.rb +++ b/lib/directory/on_premises_synchronization/count/count_request_builder.rb @@ -20,7 +20,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/onPremisesSynchronization/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directory/onPremisesSynchronization/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -32,8 +32,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -43,17 +42,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory/on_premises_synchronization/item/on_premises_directory_synchronization_item_request_builder.rb b/lib/directory/on_premises_synchronization/item/on_premises_directory_synchronization_item_request_builder.rb index 1e2c1e7582..c6d84891cd 100644 --- a/lib/directory/on_premises_synchronization/item/on_premises_directory_synchronization_item_request_builder.rb +++ b/lib/directory/on_premises_synchronization/item/on_premises_directory_synchronization_item_request_builder.rb @@ -21,7 +21,7 @@ class OnPremisesDirectorySynchronizationItemRequestBuilder < MicrosoftKiotaAbstr ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/onPremisesSynchronization/{onPremisesDirectorySynchronization%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/onPremisesSynchronization/{onPremisesDirectorySynchronization%2Did}{?%24expand,%24select}") end ## ## Delete navigation property onPremisesSynchronization for directory @@ -33,8 +33,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,8 +46,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::OnPremisesDirectorySynchronization.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -63,8 +61,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::OnPremisesDirectorySynchronization.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,13 +71,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -90,15 +88,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -110,17 +108,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a on_premises_directory_synchronization_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return OnPremisesDirectorySynchronizationItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read the properties and relationships of an onPremisesDirectorySynchronization object. diff --git a/lib/directory/on_premises_synchronization/on_premises_synchronization_request_builder.rb b/lib/directory/on_premises_synchronization/on_premises_synchronization_request_builder.rb index 21103ebbe9..dbae48c415 100644 --- a/lib/directory/on_premises_synchronization/on_premises_synchronization_request_builder.rb +++ b/lib/directory/on_premises_synchronization/on_premises_synchronization_request_builder.rb @@ -38,7 +38,7 @@ def by_on_premises_directory_synchronization_id(on_premises_directory_synchroniz ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directory/onPremisesSynchronization{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directory/onPremisesSynchronization{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Read the properties and relationships of an onPremisesDirectorySynchronization object. @@ -50,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::OnPremisesDirectorySynchronizationCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,8 +65,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::OnPremisesDirectorySynchronization.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,15 +75,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -97,17 +95,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a on_premises_synchronization_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return OnPremisesSynchronizationRequestBuilder.new(raw_url, @request_adapter) + end ## # Read the properties and relationships of an onPremisesDirectorySynchronization object. diff --git a/lib/me/chats/item/members/members.rb b/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/certificate_based_auth_configurations.rb similarity index 100% rename from lib/me/chats/item/members/members.rb rename to lib/directory/public_key_infrastructure/certificate_based_auth_configurations/certificate_based_auth_configurations.rb diff --git a/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/certificate_based_auth_configurations_request_builder.rb b/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/certificate_based_auth_configurations_request_builder.rb new file mode 100644 index 0000000000..38b160bacf --- /dev/null +++ b/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/certificate_based_auth_configurations_request_builder.rb @@ -0,0 +1,182 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/certificate_based_auth_pki' +require_relative '../../../models/certificate_based_auth_pki_collection_response' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../directory' +require_relative '../public_key_infrastructure' +require_relative './certificate_based_auth_configurations' +require_relative './count/count_request_builder' +require_relative './item/certificate_based_auth_pki_item_request_builder' + +module MicrosoftGraph + module Directory + module PublicKeyInfrastructure + module CertificateBasedAuthConfigurations + ## + # Provides operations to manage the certificateBasedAuthConfigurations property of the microsoft.graph.publicKeyInfrastructureRoot entity. + class CertificateBasedAuthConfigurationsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::Directory::PublicKeyInfrastructure::CertificateBasedAuthConfigurations::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the certificateBasedAuthConfigurations property of the microsoft.graph.publicKeyInfrastructureRoot entity. + ## @param certificate_based_auth_pki_id The unique identifier of certificateBasedAuthPki + ## @return a certificate_based_auth_pki_item_request_builder + ## + def by_certificate_based_auth_pki_id(certificate_based_auth_pki_id) + raise StandardError, 'certificate_based_auth_pki_id cannot be null' if certificate_based_auth_pki_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["certificateBasedAuthPki%2Did"] = certificate_based_auth_pki_id + return MicrosoftGraph::Directory::PublicKeyInfrastructure::CertificateBasedAuthConfigurations::Item::CertificateBasedAuthPkiItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new CertificateBasedAuthConfigurationsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/directory/publicKeyInfrastructure/certificateBasedAuthConfigurations{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Get a list of the certificateBasedAuthPki objects and their properties. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of certificate_based_auth_pki_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CertificateBasedAuthPkiCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create a new certificateBasedAuthPki object. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of certificate_based_auth_pki + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CertificateBasedAuthPki.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get a list of the certificateBasedAuthPki objects and their properties. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create a new certificateBasedAuthPki object. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a certificate_based_auth_configurations_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CertificateBasedAuthConfigurationsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get a list of the certificateBasedAuthPki objects and their properties. + class CertificateBasedAuthConfigurationsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/me/direct_reports/count/count.rb b/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/count/count.rb similarity index 100% rename from lib/me/direct_reports/count/count.rb rename to lib/directory/public_key_infrastructure/certificate_based_auth_configurations/count/count.rb diff --git a/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/count/count_request_builder.rb b/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/count/count_request_builder.rb new file mode 100644 index 0000000000..32ebb52f98 --- /dev/null +++ b/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/count/count_request_builder.rb @@ -0,0 +1,100 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../directory' +require_relative '../../public_key_infrastructure' +require_relative '../certificate_based_auth_configurations' +require_relative './count' + +module MicrosoftGraph + module Directory + module PublicKeyInfrastructure + module CertificateBasedAuthConfigurations + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/directory/publicKeyInfrastructure/certificateBasedAuthConfigurations/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/messages/item/hosted_contents/hosted_contents.rb b/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/certificate_authorities/certificate_authorities.rb similarity index 100% rename from lib/me/chats/item/messages/item/hosted_contents/hosted_contents.rb rename to lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/certificate_authorities/certificate_authorities.rb diff --git a/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/certificate_authorities/certificate_authorities_request_builder.rb b/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/certificate_authorities/certificate_authorities_request_builder.rb new file mode 100644 index 0000000000..2fd32d250b --- /dev/null +++ b/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/certificate_authorities/certificate_authorities_request_builder.rb @@ -0,0 +1,188 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/certificate_authority_detail' +require_relative '../../../../../models/certificate_authority_detail_collection_response' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../directory' +require_relative '../../../public_key_infrastructure' +require_relative '../../certificate_based_auth_configurations' +require_relative '../item' +require_relative './certificate_authorities' +require_relative './count/count_request_builder' +require_relative './item/certificate_authority_detail_item_request_builder' + +module MicrosoftGraph + module Directory + module PublicKeyInfrastructure + module CertificateBasedAuthConfigurations + module Item + module CertificateAuthorities + ## + # Provides operations to manage the certificateAuthorities property of the microsoft.graph.certificateBasedAuthPki entity. + class CertificateAuthoritiesRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::Directory::PublicKeyInfrastructure::CertificateBasedAuthConfigurations::Item::CertificateAuthorities::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the certificateAuthorities property of the microsoft.graph.certificateBasedAuthPki entity. + ## @param certificate_authority_detail_id The unique identifier of certificateAuthorityDetail + ## @return a certificate_authority_detail_item_request_builder + ## + def by_certificate_authority_detail_id(certificate_authority_detail_id) + raise StandardError, 'certificate_authority_detail_id cannot be null' if certificate_authority_detail_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["certificateAuthorityDetail%2Did"] = certificate_authority_detail_id + return MicrosoftGraph::Directory::PublicKeyInfrastructure::CertificateBasedAuthConfigurations::Item::CertificateAuthorities::Item::CertificateAuthorityDetailItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new CertificateAuthoritiesRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/directory/publicKeyInfrastructure/certificateBasedAuthConfigurations/{certificateBasedAuthPki%2Did}/certificateAuthorities{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Get a list of the certificateAuthorityDetail objects and their properties. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of certificate_authority_detail_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CertificateAuthorityDetailCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create a new certificateAuthorityDetail object. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of certificate_authority_detail + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CertificateAuthorityDetail.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get a list of the certificateAuthorityDetail objects and their properties. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create a new certificateAuthorityDetail object. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a certificate_authorities_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CertificateAuthoritiesRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get a list of the certificateAuthorityDetail objects and their properties. + class CertificateAuthoritiesRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/direct_reports/graph_org_contact/count/count.rb b/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/certificate_authorities/count/count.rb similarity index 100% rename from lib/me/direct_reports/graph_org_contact/count/count.rb rename to lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/certificate_authorities/count/count.rb diff --git a/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/certificate_authorities/count/count_request_builder.rb b/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/certificate_authorities/count/count_request_builder.rb new file mode 100644 index 0000000000..4e8d0a3123 --- /dev/null +++ b/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/certificate_authorities/count/count_request_builder.rb @@ -0,0 +1,106 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../directory' +require_relative '../../../../public_key_infrastructure' +require_relative '../../../certificate_based_auth_configurations' +require_relative '../../item' +require_relative '../certificate_authorities' +require_relative './count' + +module MicrosoftGraph + module Directory + module PublicKeyInfrastructure + module CertificateBasedAuthConfigurations + module Item + module CertificateAuthorities + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/directory/publicKeyInfrastructure/certificateBasedAuthConfigurations/{certificateBasedAuthPki%2Did}/certificateAuthorities/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/certificate_authorities/item/certificate_authority_detail_item_request_builder.rb b/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/certificate_authorities/item/certificate_authority_detail_item_request_builder.rb new file mode 100644 index 0000000000..18c8f1492d --- /dev/null +++ b/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/certificate_authorities/item/certificate_authority_detail_item_request_builder.rb @@ -0,0 +1,172 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/certificate_authority_detail' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../directory' +require_relative '../../../../public_key_infrastructure' +require_relative '../../../certificate_based_auth_configurations' +require_relative '../../item' +require_relative '../certificate_authorities' +require_relative './item' + +module MicrosoftGraph + module Directory + module PublicKeyInfrastructure + module CertificateBasedAuthConfigurations + module Item + module CertificateAuthorities + module Item + ## + # Provides operations to manage the certificateAuthorities property of the microsoft.graph.certificateBasedAuthPki entity. + class CertificateAuthorityDetailItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CertificateAuthorityDetailItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/directory/publicKeyInfrastructure/certificateBasedAuthConfigurations/{certificateBasedAuthPki%2Did}/certificateAuthorities/{certificateAuthorityDetail%2Did}{?%24expand,%24select}") + end + ## + ## Delete a certificateAuthorityDetail object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The collection of certificate authorities contained in this public key infrastructure resource. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of certificate_authority_detail + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CertificateAuthorityDetail.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update certificateAuthorityDetail + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of certificate_authority_detail + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CertificateAuthorityDetail.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete a certificateAuthorityDetail object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The collection of certificate authorities contained in this public key infrastructure resource. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update certificateAuthorityDetail + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a certificate_authority_detail_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CertificateAuthorityDetailItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of certificate authorities contained in this public key infrastructure resource. + class CertificateAuthorityDetailItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/contact_folders/item/child_folders/item/contacts/item/extensions/item/item.rb b/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/certificate_authorities/item/item.rb similarity index 100% rename from lib/me/contact_folders/item/child_folders/item/contacts/item/extensions/item/item.rb rename to lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/certificate_authorities/item/item.rb diff --git a/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/certificate_based_auth_pki_item_request_builder.rb b/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/certificate_based_auth_pki_item_request_builder.rb new file mode 100644 index 0000000000..1fbec68bf4 --- /dev/null +++ b/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/certificate_based_auth_pki_item_request_builder.rb @@ -0,0 +1,178 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/certificate_based_auth_pki' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../directory' +require_relative '../../public_key_infrastructure' +require_relative '../certificate_based_auth_configurations' +require_relative './certificate_authorities/certificate_authorities_request_builder' +require_relative './item' +require_relative './upload/upload_request_builder' + +module MicrosoftGraph + module Directory + module PublicKeyInfrastructure + module CertificateBasedAuthConfigurations + module Item + ## + # Provides operations to manage the certificateBasedAuthConfigurations property of the microsoft.graph.publicKeyInfrastructureRoot entity. + class CertificateBasedAuthPkiItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the certificateAuthorities property of the microsoft.graph.certificateBasedAuthPki entity. + def certificate_authorities() + return MicrosoftGraph::Directory::PublicKeyInfrastructure::CertificateBasedAuthConfigurations::Item::CertificateAuthorities::CertificateAuthoritiesRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + # Provides operations to call the upload method. + def upload() + return MicrosoftGraph::Directory::PublicKeyInfrastructure::CertificateBasedAuthConfigurations::Item::Upload::UploadRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new CertificateBasedAuthPkiItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/directory/publicKeyInfrastructure/certificateBasedAuthConfigurations/{certificateBasedAuthPki%2Did}{?%24expand,%24select}") + end + ## + ## Delete a certificateBasedAuthPki object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Read the properties and relationships of a certificateBasedAuthPki object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of certificate_based_auth_pki + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CertificateBasedAuthPki.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the properties of a certificateBasedAuthPki object. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of certificate_based_auth_pki + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CertificateBasedAuthPki.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete a certificateBasedAuthPki object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Read the properties and relationships of a certificateBasedAuthPki object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the properties of a certificateBasedAuthPki object. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a certificate_based_auth_pki_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CertificateBasedAuthPkiItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Read the properties and relationships of a certificateBasedAuthPki object. + class CertificateBasedAuthPkiItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/me/contact_folders/item/child_folders/item/contacts/item/item.rb b/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/item.rb similarity index 100% rename from lib/me/contact_folders/item/child_folders/item/contacts/item/item.rb rename to lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/item.rb diff --git a/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/upload/upload.rb b/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/upload/upload.rb new file mode 100644 index 0000000000..001863d2ad --- /dev/null +++ b/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/upload/upload.rb @@ -0,0 +1 @@ +require_relative 'upload_post_request_body' diff --git a/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/upload/upload_post_request_body.rb b/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/upload/upload_post_request_body.rb new file mode 100644 index 0000000000..d74e2d4625 --- /dev/null +++ b/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/upload/upload_post_request_body.rb @@ -0,0 +1,114 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../directory' +require_relative '../../../public_key_infrastructure' +require_relative '../../certificate_based_auth_configurations' +require_relative '../item' +require_relative './upload' + +module MicrosoftGraph + module Directory + module PublicKeyInfrastructure + module CertificateBasedAuthConfigurations + module Item + module Upload + class UploadPostRequestBody + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The sha256FileHash property + @sha256_file_hash + ## + # The uploadUrl property + @upload_url + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new UploadPostRequestBody and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a upload_post_request_body + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return UploadPostRequestBody.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "sha256FileHash" => lambda {|n| @sha256_file_hash = n.get_string_value() }, + "uploadUrl" => lambda {|n| @upload_url = n.get_string_value() }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_string_value("sha256FileHash", @sha256_file_hash) + writer.write_string_value("uploadUrl", @upload_url) + writer.write_additional_data(@additional_data) + end + ## + ## Gets the sha256FileHash property value. The sha256FileHash property + ## @return a string + ## + def sha256_file_hash + return @sha256_file_hash + end + ## + ## Sets the sha256FileHash property value. The sha256FileHash property + ## @param value Value to set for the sha256FileHash property. + ## @return a void + ## + def sha256_file_hash=(value) + @sha256_file_hash = value + end + ## + ## Gets the uploadUrl property value. The uploadUrl property + ## @return a string + ## + def upload_url + return @upload_url + end + ## + ## Sets the uploadUrl property value. The uploadUrl property + ## @param value Value to set for the uploadUrl property. + ## @return a void + ## + def upload_url=(value) + @upload_url = value + end + end + end + end + end + end + end +end diff --git a/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/upload/upload_request_builder.rb b/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/upload/upload_request_builder.rb new file mode 100644 index 0000000000..bea9d72815 --- /dev/null +++ b/lib/directory/public_key_infrastructure/certificate_based_auth_configurations/item/upload/upload_request_builder.rb @@ -0,0 +1,79 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../directory' +require_relative '../../../public_key_infrastructure' +require_relative '../../certificate_based_auth_configurations' +require_relative '../item' +require_relative './upload' + +module MicrosoftGraph + module Directory + module PublicKeyInfrastructure + module CertificateBasedAuthConfigurations + module Item + module Upload + ## + # Provides operations to call the upload method. + class UploadRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new UploadRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/directory/publicKeyInfrastructure/certificateBasedAuthConfigurations/{certificateBasedAuthPki%2Did}/upload") + end + ## + ## Append additional certificate authority details to a certificateBasedAuthPki resource. Only one operation can run at a time and this operation can take up to 30 minutes to complete. To know whether another upload is in progress, call the Get certificateBasedAuthPki. The status property will have the value running. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Append additional certificate authority details to a certificateBasedAuthPki resource. Only one operation can run at a time and this operation can take up to 30 minutes to complete. To know whether another upload is in progress, call the Get certificateBasedAuthPki. The status property will have the value running. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a upload_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UploadRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/messages/item/hosted_contents/item/value/value.rb b/lib/directory/public_key_infrastructure/public_key_infrastructure.rb similarity index 100% rename from lib/me/chats/item/messages/item/hosted_contents/item/value/value.rb rename to lib/directory/public_key_infrastructure/public_key_infrastructure.rb diff --git a/lib/directory/public_key_infrastructure/public_key_infrastructure_request_builder.rb b/lib/directory/public_key_infrastructure/public_key_infrastructure_request_builder.rb new file mode 100644 index 0000000000..ebd0510e2e --- /dev/null +++ b/lib/directory/public_key_infrastructure/public_key_infrastructure_request_builder.rb @@ -0,0 +1,166 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/o_data_errors_o_data_error' +require_relative '../../models/public_key_infrastructure_root' +require_relative '../directory' +require_relative './certificate_based_auth_configurations/certificate_based_auth_configurations_request_builder' +require_relative './public_key_infrastructure' + +module MicrosoftGraph + module Directory + module PublicKeyInfrastructure + ## + # Provides operations to manage the publicKeyInfrastructure property of the microsoft.graph.directory entity. + class PublicKeyInfrastructureRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to manage the certificateBasedAuthConfigurations property of the microsoft.graph.publicKeyInfrastructureRoot entity. + def certificate_based_auth_configurations() + return MicrosoftGraph::Directory::PublicKeyInfrastructure::CertificateBasedAuthConfigurations::CertificateBasedAuthConfigurationsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new PublicKeyInfrastructureRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/directory/publicKeyInfrastructure{?%24expand,%24select}") + end + ## + ## Delete navigation property publicKeyInfrastructure for directory + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The collection of public key infrastructure instances for the certificate-based authentication feature for users in a Microsoft Entra tenant. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of public_key_infrastructure_root + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::PublicKeyInfrastructureRoot.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property publicKeyInfrastructure in directory + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of public_key_infrastructure_root + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::PublicKeyInfrastructureRoot.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property publicKeyInfrastructure for directory + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The collection of public key infrastructure instances for the certificate-based authentication feature for users in a Microsoft Entra tenant. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property publicKeyInfrastructure in directory + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a public_key_infrastructure_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return PublicKeyInfrastructureRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The collection of public key infrastructure instances for the certificate-based authentication feature for users in a Microsoft Entra tenant. + class PublicKeyInfrastructureRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end +end diff --git a/lib/me/direct_reports/graph_user/count/count.rb b/lib/directory/subscriptions/count/count.rb similarity index 100% rename from lib/me/direct_reports/graph_user/count/count.rb rename to lib/directory/subscriptions/count/count.rb diff --git a/lib/directory/subscriptions/count/count_request_builder.rb b/lib/directory/subscriptions/count/count_request_builder.rb new file mode 100644 index 0000000000..1c0cc29219 --- /dev/null +++ b/lib/directory/subscriptions/count/count_request_builder.rb @@ -0,0 +1,97 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../directory' +require_relative '../subscriptions' +require_relative './count' + +module MicrosoftGraph + module Directory + module Subscriptions + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/directory/subscriptions/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/directory/subscriptions/item/company_subscription_item_request_builder.rb b/lib/directory/subscriptions/item/company_subscription_item_request_builder.rb new file mode 100644 index 0000000000..bad9c1452b --- /dev/null +++ b/lib/directory/subscriptions/item/company_subscription_item_request_builder.rb @@ -0,0 +1,163 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/company_subscription' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../directory' +require_relative '../subscriptions' +require_relative './item' + +module MicrosoftGraph + module Directory + module Subscriptions + module Item + ## + # Provides operations to manage the subscriptions property of the microsoft.graph.directory entity. + class CompanySubscriptionItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CompanySubscriptionItemRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/directory/subscriptions/{companySubscription%2Did}{?%24expand,%24select}") + end + ## + ## Delete navigation property subscriptions for directory + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Get a specific commercial subscription that an organization acquired. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of company_subscription + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CompanySubscription.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property subscriptions in directory + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of company_subscription + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CompanySubscription.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property subscriptions for directory + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Get a specific commercial subscription that an organization acquired. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property subscriptions in directory + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a company_subscription_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CompanySubscriptionItemRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get a specific commercial subscription that an organization acquired. + class CompanySubscriptionItemRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/me/contact_folders/item/child_folders/item/item.rb b/lib/directory/subscriptions/item/item.rb similarity index 100% rename from lib/me/contact_folders/item/child_folders/item/item.rb rename to lib/directory/subscriptions/item/item.rb diff --git a/lib/me/chats/item/messages/item/replies/item/hosted_contents/hosted_contents.rb b/lib/directory/subscriptions/subscriptions.rb similarity index 100% rename from lib/me/chats/item/messages/item/replies/item/hosted_contents/hosted_contents.rb rename to lib/directory/subscriptions/subscriptions.rb diff --git a/lib/directory/subscriptions/subscriptions_request_builder.rb b/lib/directory/subscriptions/subscriptions_request_builder.rb new file mode 100644 index 0000000000..fb74528e93 --- /dev/null +++ b/lib/directory/subscriptions/subscriptions_request_builder.rb @@ -0,0 +1,179 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/company_subscription' +require_relative '../../models/company_subscription_collection_response' +require_relative '../../models/o_data_errors_o_data_error' +require_relative '../directory' +require_relative './count/count_request_builder' +require_relative './item/company_subscription_item_request_builder' +require_relative './subscriptions' + +module MicrosoftGraph + module Directory + module Subscriptions + ## + # Provides operations to manage the subscriptions property of the microsoft.graph.directory entity. + class SubscriptionsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::Directory::Subscriptions::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Provides operations to manage the subscriptions property of the microsoft.graph.directory entity. + ## @param company_subscription_id The unique identifier of companySubscription + ## @return a company_subscription_item_request_builder + ## + def by_company_subscription_id(company_subscription_id) + raise StandardError, 'company_subscription_id cannot be null' if company_subscription_id.nil? + url_tpl_params = @path_parameters.clone + url_tpl_params["companySubscription%2Did"] = company_subscription_id + return MicrosoftGraph::Directory::Subscriptions::Item::CompanySubscriptionItemRequestBuilder.new(url_tpl_params, @request_adapter) + end + ## + ## Instantiates a new SubscriptionsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/directory/subscriptions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Get the list of commercial subscriptions that an organization acquired. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of company_subscription_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CompanySubscriptionCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Create new navigation property to subscriptions for directory + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of company_subscription + ## + def post(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_post_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CompanySubscription.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the list of commercial subscriptions that an organization acquired. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Create new navigation property to subscriptions for directory + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a subscriptions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SubscriptionsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the list of commercial subscriptions that an organization acquired. + class SubscriptionsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/messages/item/replies/item/hosted_contents/item/value/value.rb b/lib/directory/subscriptions_with_commerce_subscription_id/subscriptions_with_commerce_subscription_id.rb similarity index 100% rename from lib/me/chats/item/messages/item/replies/item/hosted_contents/item/value/value.rb rename to lib/directory/subscriptions_with_commerce_subscription_id/subscriptions_with_commerce_subscription_id.rb diff --git a/lib/directory/subscriptions_with_commerce_subscription_id/subscriptions_with_commerce_subscription_id_request_builder.rb b/lib/directory/subscriptions_with_commerce_subscription_id/subscriptions_with_commerce_subscription_id_request_builder.rb new file mode 100644 index 0000000000..8ab1addff9 --- /dev/null +++ b/lib/directory/subscriptions_with_commerce_subscription_id/subscriptions_with_commerce_subscription_id_request_builder.rb @@ -0,0 +1,161 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/company_subscription' +require_relative '../../models/o_data_errors_o_data_error' +require_relative '../directory' +require_relative './subscriptions_with_commerce_subscription_id' + +module MicrosoftGraph + module Directory + module SubscriptionsWithCommerceSubscriptionId + ## + # Provides operations to manage the subscriptions property of the microsoft.graph.directory entity. + class SubscriptionsWithCommerceSubscriptionIdRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new SubscriptionsWithCommerceSubscriptionIdRequestBuilder and sets the default values. + ## @param commerce_subscription_id Alternate key of companySubscription + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter, commerce_subscription_id=nil) + super(path_parameters, request_adapter, "{+baseurl}/directory/subscriptions(commerceSubscriptionId='{commerceSubscriptionId}'){?%24expand,%24select}") + end + ## + ## Delete navigation property subscriptions for directory + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Get a specific commercial subscription that an organization acquired. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of company_subscription + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CompanySubscription.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Update the navigation property subscriptions in directory + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of company_subscription + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CompanySubscription.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Delete navigation property subscriptions for directory + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Get a specific commercial subscription that an organization acquired. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Update the navigation property subscriptions in directory + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a subscriptions_with_commerce_subscription_id_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SubscriptionsWithCommerceSubscriptionIdRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get a specific commercial subscription that an organization acquired. + class SubscriptionsWithCommerceSubscriptionIdRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end +end diff --git a/lib/directory_objects/count/count_request_builder.rb b/lib/directory_objects/count/count_request_builder.rb index d0ebad09f7..9a70fbc7fc 100644 --- a/lib/directory_objects/count/count_request_builder.rb +++ b/lib/directory_objects/count/count_request_builder.rb @@ -18,7 +18,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryObjects/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directoryObjects/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -30,8 +30,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -41,17 +40,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory_objects/delta/delta.rb b/lib/directory_objects/delta/delta.rb index 0c348d20cb..8a3dc08b72 100644 --- a/lib/directory_objects/delta/delta.rb +++ b/lib/directory_objects/delta/delta.rb @@ -1 +1 @@ -require_relative 'delta_response' +require_relative 'delta_get_response' diff --git a/lib/directory_objects/delta/delta_get_response.rb b/lib/directory_objects/delta/delta_get_response.rb new file mode 100644 index 0000000000..3d5897efdb --- /dev/null +++ b/lib/directory_objects/delta/delta_get_response.rb @@ -0,0 +1,69 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/base_delta_function_response' +require_relative '../../models/directory_object' +require_relative '../directory_objects' +require_relative './delta' + +module MicrosoftGraph + module DirectoryObjects + module Delta + class DeltaGetResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new DeltaGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a delta_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return DeltaGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a directory_object + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/directory_objects/delta/delta_request_builder.rb b/lib/directory_objects/delta/delta_request_builder.rb index 739c719a73..1a947d0183 100644 --- a/lib/directory_objects/delta/delta_request_builder.rb +++ b/lib/directory_objects/delta/delta_request_builder.rb @@ -18,49 +18,60 @@ class DeltaRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryObjects/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/directoryObjects/delta(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Invoke function delta + ## Get newly created, updated, or deleted directory objects without performing a full read of the entire directoryObject collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of delta_response + ## @return a Fiber of delta_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryObjects::Delta::DeltaResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryObjects::Delta::DeltaGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Invoke function delta + ## Get newly created, updated, or deleted directory objects without performing a full read of the entire directoryObject collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a delta_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeltaRequestBuilder.new(raw_url, @request_adapter) + end ## - # Invoke function delta + # Get newly created, updated, or deleted directory objects without performing a full read of the entire directoryObject collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. class DeltaRequestBuilderGetQueryParameters ## # Include count of items attr_accessor :count ## + # Expand related entities + attr_accessor :expand + ## # Filter items by property values attr_accessor :filter ## @@ -88,6 +99,8 @@ def get_query_parameter(original_name) case original_name when "count" return "%24count" + when "expand" + return "%24expand" when "filter" return "%24filter" when "orderby" diff --git a/lib/directory_objects/delta/delta_response.rb b/lib/directory_objects/delta/delta_response.rb deleted file mode 100644 index b28296164c..0000000000 --- a/lib/directory_objects/delta/delta_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../microsoft_graph' -require_relative '../../models/base_delta_function_response' -require_relative '../../models/directory_object' -require_relative '../directory_objects' -require_relative './delta' - -module MicrosoftGraph - module DirectoryObjects - module Delta - class DeltaResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new deltaResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a delta_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return DeltaResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a directory_object - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end -end diff --git a/lib/directory_objects/directory_objects_request_builder.rb b/lib/directory_objects/directory_objects_request_builder.rb index f72e83add2..5a6fead3d3 100644 --- a/lib/directory_objects/directory_objects_request_builder.rb +++ b/lib/directory_objects/directory_objects_request_builder.rb @@ -60,7 +60,7 @@ def by_directory_object_id(directory_object_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryObjects{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directoryObjects{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get entities from directoryObjects @@ -72,8 +72,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObjectCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -88,8 +87,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -99,15 +97,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -119,17 +117,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a directory_objects_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DirectoryObjectsRequestBuilder.new(raw_url, @request_adapter) + end ## # Get entities from directoryObjects diff --git a/lib/directory_objects/get_available_extension_properties/get_available_extension_properties.rb b/lib/directory_objects/get_available_extension_properties/get_available_extension_properties.rb index b6fee576bf..ce1b642cad 100644 --- a/lib/directory_objects/get_available_extension_properties/get_available_extension_properties.rb +++ b/lib/directory_objects/get_available_extension_properties/get_available_extension_properties.rb @@ -1,2 +1,2 @@ require_relative 'get_available_extension_properties_post_request_body' -require_relative 'get_available_extension_properties_response' +require_relative 'get_available_extension_properties_post_response' diff --git a/lib/directory_objects/get_available_extension_properties/get_available_extension_properties_post_request_body.rb b/lib/directory_objects/get_available_extension_properties/get_available_extension_properties_post_request_body.rb index d3b3d2dbd7..b08429d49f 100644 --- a/lib/directory_objects/get_available_extension_properties/get_available_extension_properties_post_request_body.rb +++ b/lib/directory_objects/get_available_extension_properties/get_available_extension_properties_post_request_body.rb @@ -15,22 +15,22 @@ class GetAvailableExtensionPropertiesPostRequestBody # The isSyncedFromOnPremises property @is_synced_from_on_premises ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getAvailableExtensionPropertiesPostRequestBody and sets the default values. + ## Instantiates a new GetAvailableExtensionPropertiesPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory_objects/get_available_extension_properties/get_available_extension_properties_post_response.rb b/lib/directory_objects/get_available_extension_properties/get_available_extension_properties_post_response.rb new file mode 100644 index 0000000000..b04779f4c4 --- /dev/null +++ b/lib/directory_objects/get_available_extension_properties/get_available_extension_properties_post_response.rb @@ -0,0 +1,69 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/base_collection_pagination_count_response' +require_relative '../../models/extension_property' +require_relative '../directory_objects' +require_relative './get_available_extension_properties' + +module MicrosoftGraph + module DirectoryObjects + module GetAvailableExtensionProperties + class GetAvailableExtensionPropertiesPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetAvailableExtensionPropertiesPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_available_extension_properties_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetAvailableExtensionPropertiesPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ExtensionProperty.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a extension_property + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/directory_objects/get_available_extension_properties/get_available_extension_properties_request_builder.rb b/lib/directory_objects/get_available_extension_properties/get_available_extension_properties_request_builder.rb index 207fe7bc0c..1e33ec4afc 100644 --- a/lib/directory_objects/get_available_extension_properties/get_available_extension_properties_request_builder.rb +++ b/lib/directory_objects/get_available_extension_properties/get_available_extension_properties_request_builder.rb @@ -21,10 +21,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/directoryObjects/getAvailableExtensionProperties") end ## - ## Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + ## Return all directory extension definitions that are registered in a directory, including through multitenant apps. The following entities support extension properties: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_available_extension_properties_response + ## @return a Fiber of get_available_extension_properties_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -32,12 +32,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryObjects::GetAvailableExtensionProperties::GetAvailableExtensionPropertiesResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryObjects::GetAvailableExtensionProperties::GetAvailableExtensionPropertiesPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + ## Return all directory extension definitions that are registered in a directory, including through multitenant apps. The following entities support extension properties: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -45,17 +44,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_available_extension_properties_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetAvailableExtensionPropertiesRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory_objects/get_available_extension_properties/get_available_extension_properties_response.rb b/lib/directory_objects/get_available_extension_properties/get_available_extension_properties_response.rb deleted file mode 100644 index a4a1fa9b5f..0000000000 --- a/lib/directory_objects/get_available_extension_properties/get_available_extension_properties_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../microsoft_graph' -require_relative '../../models/base_collection_pagination_count_response' -require_relative '../../models/extension_property' -require_relative '../directory_objects' -require_relative './get_available_extension_properties' - -module MicrosoftGraph - module DirectoryObjects - module GetAvailableExtensionProperties - class GetAvailableExtensionPropertiesResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getAvailableExtensionPropertiesResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_available_extension_properties_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetAvailableExtensionPropertiesResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ExtensionProperty.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a extension_property - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end -end diff --git a/lib/directory_objects/get_by_ids/get_by_ids.rb b/lib/directory_objects/get_by_ids/get_by_ids.rb index e4b0824834..131a179969 100644 --- a/lib/directory_objects/get_by_ids/get_by_ids.rb +++ b/lib/directory_objects/get_by_ids/get_by_ids.rb @@ -1,2 +1,2 @@ require_relative 'get_by_ids_post_request_body' -require_relative 'get_by_ids_response' +require_relative 'get_by_ids_post_response' diff --git a/lib/directory_objects/get_by_ids/get_by_ids_post_request_body.rb b/lib/directory_objects/get_by_ids/get_by_ids_post_request_body.rb index 65c3295e8f..482b2f5544 100644 --- a/lib/directory_objects/get_by_ids/get_by_ids_post_request_body.rb +++ b/lib/directory_objects/get_by_ids/get_by_ids_post_request_body.rb @@ -18,22 +18,22 @@ class GetByIdsPostRequestBody # The types property @types ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getByIdsPostRequestBody and sets the default values. + ## Instantiates a new GetByIdsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory_objects/get_by_ids/get_by_ids_post_response.rb b/lib/directory_objects/get_by_ids/get_by_ids_post_response.rb new file mode 100644 index 0000000000..6bef5c5d5d --- /dev/null +++ b/lib/directory_objects/get_by_ids/get_by_ids_post_response.rb @@ -0,0 +1,69 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/base_collection_pagination_count_response' +require_relative '../../models/directory_object' +require_relative '../directory_objects' +require_relative './get_by_ids' + +module MicrosoftGraph + module DirectoryObjects + module GetByIds + class GetByIdsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetByIdsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_by_ids_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetByIdsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a directory_object + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/directory_objects/get_by_ids/get_by_ids_request_builder.rb b/lib/directory_objects/get_by_ids/get_by_ids_request_builder.rb index 24dd342491..dff80eaa91 100644 --- a/lib/directory_objects/get_by_ids/get_by_ids_request_builder.rb +++ b/lib/directory_objects/get_by_ids/get_by_ids_request_builder.rb @@ -24,7 +24,7 @@ def initialize(path_parameters, request_adapter) ## Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_by_ids_response + ## @return a Fiber of get_by_ids_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -32,9 +32,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryObjects::GetByIds::GetByIdsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryObjects::GetByIds::GetByIdsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: @@ -45,17 +44,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_by_ids_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetByIdsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory_objects/get_by_ids/get_by_ids_response.rb b/lib/directory_objects/get_by_ids/get_by_ids_response.rb deleted file mode 100644 index a345502b8f..0000000000 --- a/lib/directory_objects/get_by_ids/get_by_ids_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../microsoft_graph' -require_relative '../../models/base_collection_pagination_count_response' -require_relative '../../models/directory_object' -require_relative '../directory_objects' -require_relative './get_by_ids' - -module MicrosoftGraph - module DirectoryObjects - module GetByIds - class GetByIdsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getByIdsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_by_ids_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetByIdsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a directory_object - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end -end diff --git a/lib/directory_objects/item/check_member_groups/check_member_groups.rb b/lib/directory_objects/item/check_member_groups/check_member_groups.rb index 938b908522..98148024fe 100644 --- a/lib/directory_objects/item/check_member_groups/check_member_groups.rb +++ b/lib/directory_objects/item/check_member_groups/check_member_groups.rb @@ -1,2 +1,2 @@ require_relative 'check_member_groups_post_request_body' -require_relative 'check_member_groups_response' +require_relative 'check_member_groups_post_response' diff --git a/lib/directory_objects/item/check_member_groups/check_member_groups_post_request_body.rb b/lib/directory_objects/item/check_member_groups/check_member_groups_post_request_body.rb index ffc53dc3f4..b9a86f23ad 100644 --- a/lib/directory_objects/item/check_member_groups/check_member_groups_post_request_body.rb +++ b/lib/directory_objects/item/check_member_groups/check_member_groups_post_request_body.rb @@ -17,22 +17,22 @@ class CheckMemberGroupsPostRequestBody # The groupIds property @group_ids ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new checkMemberGroupsPostRequestBody and sets the default values. + ## Instantiates a new CheckMemberGroupsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory_objects/item/check_member_groups/check_member_groups_post_response.rb b/lib/directory_objects/item/check_member_groups/check_member_groups_post_response.rb new file mode 100644 index 0000000000..a10dd62869 --- /dev/null +++ b/lib/directory_objects/item/check_member_groups/check_member_groups_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../directory_objects' +require_relative '../item' +require_relative './check_member_groups' + +module MicrosoftGraph + module DirectoryObjects + module Item + module CheckMemberGroups + class CheckMemberGroupsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new CheckMemberGroupsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a check_member_groups_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CheckMemberGroupsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/directory_objects/item/check_member_groups/check_member_groups_request_builder.rb b/lib/directory_objects/item/check_member_groups/check_member_groups_request_builder.rb index 9e9b6992a9..2d970111a4 100644 --- a/lib/directory_objects/item/check_member_groups/check_member_groups_request_builder.rb +++ b/lib/directory_objects/item/check_member_groups/check_member_groups_request_builder.rb @@ -23,10 +23,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/directoryObjects/{directoryObject%2Did}/checkMemberGroups") end ## - ## Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + ## Check for membership in a specified list of group IDs, and return from that list the IDs of groups where a specified object is a member. The specified object can be of one of the following types:- user- group- service principal- organizational contact- device- directory object This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of check_member_groups_response + ## @return a Fiber of check_member_groups_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,12 +34,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryObjects::Item::CheckMemberGroups::CheckMemberGroupsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryObjects::Item::CheckMemberGroups::CheckMemberGroupsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + ## Check for membership in a specified list of group IDs, and return from that list the IDs of groups where a specified object is a member. The specified object can be of one of the following types:- user- group- service principal- organizational contact- device- directory object This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a check_member_groups_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CheckMemberGroupsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory_objects/item/check_member_groups/check_member_groups_response.rb b/lib/directory_objects/item/check_member_groups/check_member_groups_response.rb deleted file mode 100644 index 71e23e634e..0000000000 --- a/lib/directory_objects/item/check_member_groups/check_member_groups_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../directory_objects' -require_relative '../item' -require_relative './check_member_groups' - -module MicrosoftGraph - module DirectoryObjects - module Item - module CheckMemberGroups - class CheckMemberGroupsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new checkMemberGroupsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a check_member_groups_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return CheckMemberGroupsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/directory_objects/item/check_member_objects/check_member_objects.rb b/lib/directory_objects/item/check_member_objects/check_member_objects.rb index 67fbf971e7..1826285d49 100644 --- a/lib/directory_objects/item/check_member_objects/check_member_objects.rb +++ b/lib/directory_objects/item/check_member_objects/check_member_objects.rb @@ -1,2 +1,2 @@ require_relative 'check_member_objects_post_request_body' -require_relative 'check_member_objects_response' +require_relative 'check_member_objects_post_response' diff --git a/lib/directory_objects/item/check_member_objects/check_member_objects_post_request_body.rb b/lib/directory_objects/item/check_member_objects/check_member_objects_post_request_body.rb index e3b10a9b0a..eae196ada1 100644 --- a/lib/directory_objects/item/check_member_objects/check_member_objects_post_request_body.rb +++ b/lib/directory_objects/item/check_member_objects/check_member_objects_post_request_body.rb @@ -17,22 +17,22 @@ class CheckMemberObjectsPostRequestBody # The ids property @ids ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new checkMemberObjectsPostRequestBody and sets the default values. + ## Instantiates a new CheckMemberObjectsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory_objects/item/check_member_objects/check_member_objects_post_response.rb b/lib/directory_objects/item/check_member_objects/check_member_objects_post_response.rb new file mode 100644 index 0000000000..1efe6d8bea --- /dev/null +++ b/lib/directory_objects/item/check_member_objects/check_member_objects_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../directory_objects' +require_relative '../item' +require_relative './check_member_objects' + +module MicrosoftGraph + module DirectoryObjects + module Item + module CheckMemberObjects + class CheckMemberObjectsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new CheckMemberObjectsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a check_member_objects_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CheckMemberObjectsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/directory_objects/item/check_member_objects/check_member_objects_request_builder.rb b/lib/directory_objects/item/check_member_objects/check_member_objects_request_builder.rb index 84cc2b9264..9d4d26fba9 100644 --- a/lib/directory_objects/item/check_member_objects/check_member_objects_request_builder.rb +++ b/lib/directory_objects/item/check_member_objects/check_member_objects_request_builder.rb @@ -26,7 +26,7 @@ def initialize(path_parameters, request_adapter) ## Invoke action checkMemberObjects ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of check_member_objects_response + ## @return a Fiber of check_member_objects_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,9 +34,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryObjects::Item::CheckMemberObjects::CheckMemberObjectsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryObjects::Item::CheckMemberObjects::CheckMemberObjectsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Invoke action checkMemberObjects @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a check_member_objects_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CheckMemberObjectsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory_objects/item/check_member_objects/check_member_objects_response.rb b/lib/directory_objects/item/check_member_objects/check_member_objects_response.rb deleted file mode 100644 index 8562f32f55..0000000000 --- a/lib/directory_objects/item/check_member_objects/check_member_objects_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../directory_objects' -require_relative '../item' -require_relative './check_member_objects' - -module MicrosoftGraph - module DirectoryObjects - module Item - module CheckMemberObjects - class CheckMemberObjectsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new checkMemberObjectsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a check_member_objects_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return CheckMemberObjectsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/directory_objects/item/directory_object_item_request_builder.rb b/lib/directory_objects/item/directory_object_item_request_builder.rb index 07a488a7f8..34cfa8a70c 100644 --- a/lib/directory_objects/item/directory_object_item_request_builder.rb +++ b/lib/directory_objects/item/directory_object_item_request_builder.rb @@ -49,7 +49,7 @@ def restore() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryObjects/{directoryObject%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directoryObjects/{directoryObject%2Did}{?%24expand,%24select}") end ## ## Delete a directory object, for example, a group, user, application, or service principal. @@ -61,8 +61,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -75,8 +74,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -91,8 +89,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -102,13 +99,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -118,15 +116,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -138,17 +136,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a directory_object_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DirectoryObjectItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve the properties and relationships of a directoryObject object. diff --git a/lib/directory_objects/item/get_member_groups/get_member_groups.rb b/lib/directory_objects/item/get_member_groups/get_member_groups.rb index 0a25b012ea..9190b99738 100644 --- a/lib/directory_objects/item/get_member_groups/get_member_groups.rb +++ b/lib/directory_objects/item/get_member_groups/get_member_groups.rb @@ -1,2 +1,2 @@ require_relative 'get_member_groups_post_request_body' -require_relative 'get_member_groups_response' +require_relative 'get_member_groups_post_response' diff --git a/lib/directory_objects/item/get_member_groups/get_member_groups_post_request_body.rb b/lib/directory_objects/item/get_member_groups/get_member_groups_post_request_body.rb index 59df718907..7405e357e2 100644 --- a/lib/directory_objects/item/get_member_groups/get_member_groups_post_request_body.rb +++ b/lib/directory_objects/item/get_member_groups/get_member_groups_post_request_body.rb @@ -17,22 +17,22 @@ class GetMemberGroupsPostRequestBody # The securityEnabledOnly property @security_enabled_only ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getMemberGroupsPostRequestBody and sets the default values. + ## Instantiates a new GetMemberGroupsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory_objects/item/get_member_groups/get_member_groups_post_response.rb b/lib/directory_objects/item/get_member_groups/get_member_groups_post_response.rb new file mode 100644 index 0000000000..012f00387c --- /dev/null +++ b/lib/directory_objects/item/get_member_groups/get_member_groups_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../directory_objects' +require_relative '../item' +require_relative './get_member_groups' + +module MicrosoftGraph + module DirectoryObjects + module Item + module GetMemberGroups + class GetMemberGroupsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetMemberGroupsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_member_groups_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetMemberGroupsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/directory_objects/item/get_member_groups/get_member_groups_request_builder.rb b/lib/directory_objects/item/get_member_groups/get_member_groups_request_builder.rb index 62521ce29a..b9c6b9b5c9 100644 --- a/lib/directory_objects/item/get_member_groups/get_member_groups_request_builder.rb +++ b/lib/directory_objects/item/get_member_groups/get_member_groups_request_builder.rb @@ -23,10 +23,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/directoryObjects/{directoryObject%2Did}/getMemberGroups") end ## - ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. + ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the DirectoryResultSizeLimitExceeded error code. If you get the DirectoryResultSizeLimitExceeded error code, use the List group transitive memberOf API instead. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_member_groups_response + ## @return a Fiber of get_member_groups_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,12 +34,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryObjects::Item::GetMemberGroups::GetMemberGroupsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryObjects::Item::GetMemberGroups::GetMemberGroupsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. + ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the DirectoryResultSizeLimitExceeded error code. If you get the DirectoryResultSizeLimitExceeded error code, use the List group transitive memberOf API instead. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_member_groups_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetMemberGroupsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory_objects/item/get_member_groups/get_member_groups_response.rb b/lib/directory_objects/item/get_member_groups/get_member_groups_response.rb deleted file mode 100644 index 38ba4e1ee8..0000000000 --- a/lib/directory_objects/item/get_member_groups/get_member_groups_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../directory_objects' -require_relative '../item' -require_relative './get_member_groups' - -module MicrosoftGraph - module DirectoryObjects - module Item - module GetMemberGroups - class GetMemberGroupsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getMemberGroupsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_member_groups_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetMemberGroupsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/directory_objects/item/get_member_objects/get_member_objects.rb b/lib/directory_objects/item/get_member_objects/get_member_objects.rb index 40edad6b9e..f7a486b0f9 100644 --- a/lib/directory_objects/item/get_member_objects/get_member_objects.rb +++ b/lib/directory_objects/item/get_member_objects/get_member_objects.rb @@ -1,2 +1,2 @@ require_relative 'get_member_objects_post_request_body' -require_relative 'get_member_objects_response' +require_relative 'get_member_objects_post_response' diff --git a/lib/directory_objects/item/get_member_objects/get_member_objects_post_request_body.rb b/lib/directory_objects/item/get_member_objects/get_member_objects_post_request_body.rb index a4242eb623..030b4e6346 100644 --- a/lib/directory_objects/item/get_member_objects/get_member_objects_post_request_body.rb +++ b/lib/directory_objects/item/get_member_objects/get_member_objects_post_request_body.rb @@ -17,22 +17,22 @@ class GetMemberObjectsPostRequestBody # The securityEnabledOnly property @security_enabled_only ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getMemberObjectsPostRequestBody and sets the default values. + ## Instantiates a new GetMemberObjectsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory_objects/item/get_member_objects/get_member_objects_post_response.rb b/lib/directory_objects/item/get_member_objects/get_member_objects_post_response.rb new file mode 100644 index 0000000000..c120a39846 --- /dev/null +++ b/lib/directory_objects/item/get_member_objects/get_member_objects_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../directory_objects' +require_relative '../item' +require_relative './get_member_objects' + +module MicrosoftGraph + module DirectoryObjects + module Item + module GetMemberObjects + class GetMemberObjectsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetMemberObjectsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_member_objects_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetMemberObjectsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/directory_objects/item/get_member_objects/get_member_objects_request_builder.rb b/lib/directory_objects/item/get_member_objects/get_member_objects_request_builder.rb index 4c4025bb15..d549801d19 100644 --- a/lib/directory_objects/item/get_member_objects/get_member_objects_request_builder.rb +++ b/lib/directory_objects/item/get_member_objects/get_member_objects_request_builder.rb @@ -23,10 +23,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/directoryObjects/{directoryObject%2Did}/getMemberObjects") end ## - ## Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + ## Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:- user- group- service principal- organizational contact- device- directory object This function is transitive. Only users and role-enabled groups can be members of directory roles. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_member_objects_response + ## @return a Fiber of get_member_objects_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,12 +34,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryObjects::Item::GetMemberObjects::GetMemberObjectsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryObjects::Item::GetMemberObjects::GetMemberObjectsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + ## Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:- user- group- service principal- organizational contact- device- directory object This function is transitive. Only users and role-enabled groups can be members of directory roles. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_member_objects_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetMemberObjectsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory_objects/item/get_member_objects/get_member_objects_response.rb b/lib/directory_objects/item/get_member_objects/get_member_objects_response.rb deleted file mode 100644 index b22b378938..0000000000 --- a/lib/directory_objects/item/get_member_objects/get_member_objects_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../directory_objects' -require_relative '../item' -require_relative './get_member_objects' - -module MicrosoftGraph - module DirectoryObjects - module Item - module GetMemberObjects - class GetMemberObjectsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getMemberObjectsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_member_objects_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetMemberObjectsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/directory_objects/item/restore/restore_request_builder.rb b/lib/directory_objects/item/restore/restore_request_builder.rb index 289f19af46..c0c9ea0529 100644 --- a/lib/directory_objects/item/restore/restore_request_builder.rb +++ b/lib/directory_objects/item/restore/restore_request_builder.rb @@ -24,7 +24,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/directoryObjects/{directoryObject%2Did}/restore") end ## - ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. Restore a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_object ## @@ -33,27 +33,35 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. Restore a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a restore_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RestoreRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory_objects/validate_properties/validate_properties_post_request_body.rb b/lib/directory_objects/validate_properties/validate_properties_post_request_body.rb index fd72c3c542..863c6f13c3 100644 --- a/lib/directory_objects/validate_properties/validate_properties_post_request_body.rb +++ b/lib/directory_objects/validate_properties/validate_properties_post_request_body.rb @@ -24,22 +24,22 @@ class ValidatePropertiesPostRequestBody # The onBehalfOfUserId property @on_behalf_of_user_id ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new validatePropertiesPostRequestBody and sets the default values. + ## Instantiates a new ValidatePropertiesPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory_objects/validate_properties/validate_properties_request_builder.rb b/lib/directory_objects/validate_properties/validate_properties_request_builder.rb index 8152a9b621..6db2975794 100644 --- a/lib/directory_objects/validate_properties/validate_properties_request_builder.rb +++ b/lib/directory_objects/validate_properties/validate_properties_request_builder.rb @@ -21,7 +21,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/directoryObjects/validateProperties") end ## - ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you're only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void @@ -32,12 +32,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you're only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -45,16 +44,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a validate_properties_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ValidatePropertiesRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory_role_templates/count/count_request_builder.rb b/lib/directory_role_templates/count/count_request_builder.rb index a74a2353d1..39eaf17dbb 100644 --- a/lib/directory_role_templates/count/count_request_builder.rb +++ b/lib/directory_role_templates/count/count_request_builder.rb @@ -18,7 +18,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoleTemplates/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoleTemplates/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -30,8 +30,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -41,17 +40,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory_role_templates/delta/delta.rb b/lib/directory_role_templates/delta/delta.rb index 0c348d20cb..8a3dc08b72 100644 --- a/lib/directory_role_templates/delta/delta.rb +++ b/lib/directory_role_templates/delta/delta.rb @@ -1 +1 @@ -require_relative 'delta_response' +require_relative 'delta_get_response' diff --git a/lib/directory_role_templates/delta/delta_get_response.rb b/lib/directory_role_templates/delta/delta_get_response.rb new file mode 100644 index 0000000000..920d677b73 --- /dev/null +++ b/lib/directory_role_templates/delta/delta_get_response.rb @@ -0,0 +1,69 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/base_delta_function_response' +require_relative '../../models/directory_object' +require_relative '../directory_role_templates' +require_relative './delta' + +module MicrosoftGraph + module DirectoryRoleTemplates + module Delta + class DeltaGetResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new DeltaGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a delta_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return DeltaGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a directory_object + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/directory_role_templates/delta/delta_request_builder.rb b/lib/directory_role_templates/delta/delta_request_builder.rb index 09342b0ab4..bcc3cf32b0 100644 --- a/lib/directory_role_templates/delta/delta_request_builder.rb +++ b/lib/directory_role_templates/delta/delta_request_builder.rb @@ -18,49 +18,60 @@ class DeltaRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoleTemplates/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoleTemplates/delta(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Invoke function delta + ## Get newly created, updated, or deleted directory objects without performing a full read of the entire directoryObject collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of delta_response + ## @return a Fiber of delta_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoleTemplates::Delta::DeltaResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoleTemplates::Delta::DeltaGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Invoke function delta + ## Get newly created, updated, or deleted directory objects without performing a full read of the entire directoryObject collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a delta_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeltaRequestBuilder.new(raw_url, @request_adapter) + end ## - # Invoke function delta + # Get newly created, updated, or deleted directory objects without performing a full read of the entire directoryObject collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. class DeltaRequestBuilderGetQueryParameters ## # Include count of items attr_accessor :count ## + # Expand related entities + attr_accessor :expand + ## # Filter items by property values attr_accessor :filter ## @@ -88,6 +99,8 @@ def get_query_parameter(original_name) case original_name when "count" return "%24count" + when "expand" + return "%24expand" when "filter" return "%24filter" when "orderby" diff --git a/lib/directory_role_templates/delta/delta_response.rb b/lib/directory_role_templates/delta/delta_response.rb deleted file mode 100644 index fe1ec75c7d..0000000000 --- a/lib/directory_role_templates/delta/delta_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../microsoft_graph' -require_relative '../../models/base_delta_function_response' -require_relative '../../models/directory_object' -require_relative '../directory_role_templates' -require_relative './delta' - -module MicrosoftGraph - module DirectoryRoleTemplates - module Delta - class DeltaResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new deltaResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a delta_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return DeltaResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a directory_object - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end -end diff --git a/lib/directory_role_templates/directory_role_templates_request_builder.rb b/lib/directory_role_templates/directory_role_templates_request_builder.rb index 2f27f20438..a4db423e8a 100644 --- a/lib/directory_role_templates/directory_role_templates_request_builder.rb +++ b/lib/directory_role_templates/directory_role_templates_request_builder.rb @@ -60,7 +60,7 @@ def by_directory_role_template_id(directory_role_template_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoleTemplates{?%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoleTemplates{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Retrieve a list of directoryRoleTemplate objects. @@ -72,8 +72,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryRoleTemplateCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -88,8 +87,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryRoleTemplate.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -99,15 +97,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -119,17 +117,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a directory_role_templates_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DirectoryRoleTemplatesRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve a list of directoryRoleTemplate objects. @@ -157,6 +164,9 @@ class DirectoryRoleTemplatesRequestBuilderGetQueryParameters # Skip the first n items attr_accessor :skip ## + # Show only the first n items + attr_accessor :top + ## ## Maps the query parameters names to their encoded names for the URI template parsing. ## @param original_name The original query parameter name in the class. ## @return a string @@ -178,6 +188,8 @@ def get_query_parameter(original_name) return "%24select" when "skip" return "%24skip" + when "top" + return "%24top" else return original_name end diff --git a/lib/directory_role_templates/get_available_extension_properties/get_available_extension_properties.rb b/lib/directory_role_templates/get_available_extension_properties/get_available_extension_properties.rb index b6fee576bf..ce1b642cad 100644 --- a/lib/directory_role_templates/get_available_extension_properties/get_available_extension_properties.rb +++ b/lib/directory_role_templates/get_available_extension_properties/get_available_extension_properties.rb @@ -1,2 +1,2 @@ require_relative 'get_available_extension_properties_post_request_body' -require_relative 'get_available_extension_properties_response' +require_relative 'get_available_extension_properties_post_response' diff --git a/lib/directory_role_templates/get_available_extension_properties/get_available_extension_properties_post_request_body.rb b/lib/directory_role_templates/get_available_extension_properties/get_available_extension_properties_post_request_body.rb index 4854882445..f2e7adc0ef 100644 --- a/lib/directory_role_templates/get_available_extension_properties/get_available_extension_properties_post_request_body.rb +++ b/lib/directory_role_templates/get_available_extension_properties/get_available_extension_properties_post_request_body.rb @@ -15,22 +15,22 @@ class GetAvailableExtensionPropertiesPostRequestBody # The isSyncedFromOnPremises property @is_synced_from_on_premises ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getAvailableExtensionPropertiesPostRequestBody and sets the default values. + ## Instantiates a new GetAvailableExtensionPropertiesPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory_role_templates/get_available_extension_properties/get_available_extension_properties_post_response.rb b/lib/directory_role_templates/get_available_extension_properties/get_available_extension_properties_post_response.rb new file mode 100644 index 0000000000..7f5d74b86a --- /dev/null +++ b/lib/directory_role_templates/get_available_extension_properties/get_available_extension_properties_post_response.rb @@ -0,0 +1,69 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/base_collection_pagination_count_response' +require_relative '../../models/extension_property' +require_relative '../directory_role_templates' +require_relative './get_available_extension_properties' + +module MicrosoftGraph + module DirectoryRoleTemplates + module GetAvailableExtensionProperties + class GetAvailableExtensionPropertiesPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetAvailableExtensionPropertiesPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_available_extension_properties_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetAvailableExtensionPropertiesPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ExtensionProperty.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a extension_property + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/directory_role_templates/get_available_extension_properties/get_available_extension_properties_request_builder.rb b/lib/directory_role_templates/get_available_extension_properties/get_available_extension_properties_request_builder.rb index f32ee95860..1ec4b6f7b1 100644 --- a/lib/directory_role_templates/get_available_extension_properties/get_available_extension_properties_request_builder.rb +++ b/lib/directory_role_templates/get_available_extension_properties/get_available_extension_properties_request_builder.rb @@ -21,10 +21,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/directoryRoleTemplates/getAvailableExtensionProperties") end ## - ## Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + ## Return all directory extension definitions that are registered in a directory, including through multitenant apps. The following entities support extension properties: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_available_extension_properties_response + ## @return a Fiber of get_available_extension_properties_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -32,12 +32,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoleTemplates::GetAvailableExtensionProperties::GetAvailableExtensionPropertiesResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoleTemplates::GetAvailableExtensionProperties::GetAvailableExtensionPropertiesPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + ## Return all directory extension definitions that are registered in a directory, including through multitenant apps. The following entities support extension properties: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -45,17 +44,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_available_extension_properties_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetAvailableExtensionPropertiesRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory_role_templates/get_available_extension_properties/get_available_extension_properties_response.rb b/lib/directory_role_templates/get_available_extension_properties/get_available_extension_properties_response.rb deleted file mode 100644 index 2844a91cbc..0000000000 --- a/lib/directory_role_templates/get_available_extension_properties/get_available_extension_properties_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../microsoft_graph' -require_relative '../../models/base_collection_pagination_count_response' -require_relative '../../models/extension_property' -require_relative '../directory_role_templates' -require_relative './get_available_extension_properties' - -module MicrosoftGraph - module DirectoryRoleTemplates - module GetAvailableExtensionProperties - class GetAvailableExtensionPropertiesResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getAvailableExtensionPropertiesResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_available_extension_properties_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetAvailableExtensionPropertiesResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ExtensionProperty.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a extension_property - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end -end diff --git a/lib/directory_role_templates/get_by_ids/get_by_ids.rb b/lib/directory_role_templates/get_by_ids/get_by_ids.rb index e4b0824834..131a179969 100644 --- a/lib/directory_role_templates/get_by_ids/get_by_ids.rb +++ b/lib/directory_role_templates/get_by_ids/get_by_ids.rb @@ -1,2 +1,2 @@ require_relative 'get_by_ids_post_request_body' -require_relative 'get_by_ids_response' +require_relative 'get_by_ids_post_response' diff --git a/lib/directory_role_templates/get_by_ids/get_by_ids_post_request_body.rb b/lib/directory_role_templates/get_by_ids/get_by_ids_post_request_body.rb index 93acca9dcc..15eb3d9e75 100644 --- a/lib/directory_role_templates/get_by_ids/get_by_ids_post_request_body.rb +++ b/lib/directory_role_templates/get_by_ids/get_by_ids_post_request_body.rb @@ -18,22 +18,22 @@ class GetByIdsPostRequestBody # The types property @types ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getByIdsPostRequestBody and sets the default values. + ## Instantiates a new GetByIdsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory_role_templates/get_by_ids/get_by_ids_post_response.rb b/lib/directory_role_templates/get_by_ids/get_by_ids_post_response.rb new file mode 100644 index 0000000000..41603c24da --- /dev/null +++ b/lib/directory_role_templates/get_by_ids/get_by_ids_post_response.rb @@ -0,0 +1,69 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/base_collection_pagination_count_response' +require_relative '../../models/directory_object' +require_relative '../directory_role_templates' +require_relative './get_by_ids' + +module MicrosoftGraph + module DirectoryRoleTemplates + module GetByIds + class GetByIdsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetByIdsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_by_ids_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetByIdsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a directory_object + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/directory_role_templates/get_by_ids/get_by_ids_request_builder.rb b/lib/directory_role_templates/get_by_ids/get_by_ids_request_builder.rb index dda56daf33..d67bfb4788 100644 --- a/lib/directory_role_templates/get_by_ids/get_by_ids_request_builder.rb +++ b/lib/directory_role_templates/get_by_ids/get_by_ids_request_builder.rb @@ -24,7 +24,7 @@ def initialize(path_parameters, request_adapter) ## Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_by_ids_response + ## @return a Fiber of get_by_ids_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -32,9 +32,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoleTemplates::GetByIds::GetByIdsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoleTemplates::GetByIds::GetByIdsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: @@ -45,17 +44,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_by_ids_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetByIdsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory_role_templates/get_by_ids/get_by_ids_response.rb b/lib/directory_role_templates/get_by_ids/get_by_ids_response.rb deleted file mode 100644 index d133762b72..0000000000 --- a/lib/directory_role_templates/get_by_ids/get_by_ids_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../microsoft_graph' -require_relative '../../models/base_collection_pagination_count_response' -require_relative '../../models/directory_object' -require_relative '../directory_role_templates' -require_relative './get_by_ids' - -module MicrosoftGraph - module DirectoryRoleTemplates - module GetByIds - class GetByIdsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getByIdsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_by_ids_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetByIdsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a directory_object - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end -end diff --git a/lib/directory_role_templates/item/check_member_groups/check_member_groups.rb b/lib/directory_role_templates/item/check_member_groups/check_member_groups.rb index 938b908522..98148024fe 100644 --- a/lib/directory_role_templates/item/check_member_groups/check_member_groups.rb +++ b/lib/directory_role_templates/item/check_member_groups/check_member_groups.rb @@ -1,2 +1,2 @@ require_relative 'check_member_groups_post_request_body' -require_relative 'check_member_groups_response' +require_relative 'check_member_groups_post_response' diff --git a/lib/directory_role_templates/item/check_member_groups/check_member_groups_post_request_body.rb b/lib/directory_role_templates/item/check_member_groups/check_member_groups_post_request_body.rb index 2692222f6d..1fd2145e70 100644 --- a/lib/directory_role_templates/item/check_member_groups/check_member_groups_post_request_body.rb +++ b/lib/directory_role_templates/item/check_member_groups/check_member_groups_post_request_body.rb @@ -17,22 +17,22 @@ class CheckMemberGroupsPostRequestBody # The groupIds property @group_ids ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new checkMemberGroupsPostRequestBody and sets the default values. + ## Instantiates a new CheckMemberGroupsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory_role_templates/item/check_member_groups/check_member_groups_post_response.rb b/lib/directory_role_templates/item/check_member_groups/check_member_groups_post_response.rb new file mode 100644 index 0000000000..effcc0cf71 --- /dev/null +++ b/lib/directory_role_templates/item/check_member_groups/check_member_groups_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../directory_role_templates' +require_relative '../item' +require_relative './check_member_groups' + +module MicrosoftGraph + module DirectoryRoleTemplates + module Item + module CheckMemberGroups + class CheckMemberGroupsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new CheckMemberGroupsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a check_member_groups_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CheckMemberGroupsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/directory_role_templates/item/check_member_groups/check_member_groups_request_builder.rb b/lib/directory_role_templates/item/check_member_groups/check_member_groups_request_builder.rb index b878a8d7ab..ff31cfee7b 100644 --- a/lib/directory_role_templates/item/check_member_groups/check_member_groups_request_builder.rb +++ b/lib/directory_role_templates/item/check_member_groups/check_member_groups_request_builder.rb @@ -23,10 +23,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/directoryRoleTemplates/{directoryRoleTemplate%2Did}/checkMemberGroups") end ## - ## Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + ## Check for membership in a specified list of group IDs, and return from that list the IDs of groups where a specified object is a member. The specified object can be of one of the following types:- user- group- service principal- organizational contact- device- directory object This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of check_member_groups_response + ## @return a Fiber of check_member_groups_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,12 +34,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoleTemplates::Item::CheckMemberGroups::CheckMemberGroupsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoleTemplates::Item::CheckMemberGroups::CheckMemberGroupsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + ## Check for membership in a specified list of group IDs, and return from that list the IDs of groups where a specified object is a member. The specified object can be of one of the following types:- user- group- service principal- organizational contact- device- directory object This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a check_member_groups_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CheckMemberGroupsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory_role_templates/item/check_member_groups/check_member_groups_response.rb b/lib/directory_role_templates/item/check_member_groups/check_member_groups_response.rb deleted file mode 100644 index b77d5f0a59..0000000000 --- a/lib/directory_role_templates/item/check_member_groups/check_member_groups_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../directory_role_templates' -require_relative '../item' -require_relative './check_member_groups' - -module MicrosoftGraph - module DirectoryRoleTemplates - module Item - module CheckMemberGroups - class CheckMemberGroupsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new checkMemberGroupsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a check_member_groups_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return CheckMemberGroupsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/directory_role_templates/item/check_member_objects/check_member_objects.rb b/lib/directory_role_templates/item/check_member_objects/check_member_objects.rb index 67fbf971e7..1826285d49 100644 --- a/lib/directory_role_templates/item/check_member_objects/check_member_objects.rb +++ b/lib/directory_role_templates/item/check_member_objects/check_member_objects.rb @@ -1,2 +1,2 @@ require_relative 'check_member_objects_post_request_body' -require_relative 'check_member_objects_response' +require_relative 'check_member_objects_post_response' diff --git a/lib/directory_role_templates/item/check_member_objects/check_member_objects_post_request_body.rb b/lib/directory_role_templates/item/check_member_objects/check_member_objects_post_request_body.rb index 3234e14323..eaa547625c 100644 --- a/lib/directory_role_templates/item/check_member_objects/check_member_objects_post_request_body.rb +++ b/lib/directory_role_templates/item/check_member_objects/check_member_objects_post_request_body.rb @@ -17,22 +17,22 @@ class CheckMemberObjectsPostRequestBody # The ids property @ids ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new checkMemberObjectsPostRequestBody and sets the default values. + ## Instantiates a new CheckMemberObjectsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory_role_templates/item/check_member_objects/check_member_objects_post_response.rb b/lib/directory_role_templates/item/check_member_objects/check_member_objects_post_response.rb new file mode 100644 index 0000000000..b7df4588e0 --- /dev/null +++ b/lib/directory_role_templates/item/check_member_objects/check_member_objects_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../directory_role_templates' +require_relative '../item' +require_relative './check_member_objects' + +module MicrosoftGraph + module DirectoryRoleTemplates + module Item + module CheckMemberObjects + class CheckMemberObjectsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new CheckMemberObjectsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a check_member_objects_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CheckMemberObjectsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/directory_role_templates/item/check_member_objects/check_member_objects_request_builder.rb b/lib/directory_role_templates/item/check_member_objects/check_member_objects_request_builder.rb index 48df6299f5..5a0b0f3d08 100644 --- a/lib/directory_role_templates/item/check_member_objects/check_member_objects_request_builder.rb +++ b/lib/directory_role_templates/item/check_member_objects/check_member_objects_request_builder.rb @@ -26,7 +26,7 @@ def initialize(path_parameters, request_adapter) ## Invoke action checkMemberObjects ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of check_member_objects_response + ## @return a Fiber of check_member_objects_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,9 +34,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoleTemplates::Item::CheckMemberObjects::CheckMemberObjectsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoleTemplates::Item::CheckMemberObjects::CheckMemberObjectsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Invoke action checkMemberObjects @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a check_member_objects_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CheckMemberObjectsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory_role_templates/item/check_member_objects/check_member_objects_response.rb b/lib/directory_role_templates/item/check_member_objects/check_member_objects_response.rb deleted file mode 100644 index bda20bdbad..0000000000 --- a/lib/directory_role_templates/item/check_member_objects/check_member_objects_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../directory_role_templates' -require_relative '../item' -require_relative './check_member_objects' - -module MicrosoftGraph - module DirectoryRoleTemplates - module Item - module CheckMemberObjects - class CheckMemberObjectsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new checkMemberObjectsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a check_member_objects_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return CheckMemberObjectsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/directory_role_templates/item/directory_role_template_item_request_builder.rb b/lib/directory_role_templates/item/directory_role_template_item_request_builder.rb index ad230c5ecb..8b37f36345 100644 --- a/lib/directory_role_templates/item/directory_role_template_item_request_builder.rb +++ b/lib/directory_role_templates/item/directory_role_template_item_request_builder.rb @@ -49,7 +49,7 @@ def restore() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoleTemplates/{directoryRoleTemplate%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoleTemplates/{directoryRoleTemplate%2Did}{?%24expand,%24select}") end ## ## Delete entity from directoryRoleTemplates @@ -61,8 +61,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -75,8 +74,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryRoleTemplate.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -91,8 +89,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryRoleTemplate.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -102,13 +99,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -118,15 +116,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -138,17 +136,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a directory_role_template_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DirectoryRoleTemplateItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve the properties and relationships of a directoryroletemplate object. diff --git a/lib/directory_role_templates/item/get_member_groups/get_member_groups.rb b/lib/directory_role_templates/item/get_member_groups/get_member_groups.rb index 0a25b012ea..9190b99738 100644 --- a/lib/directory_role_templates/item/get_member_groups/get_member_groups.rb +++ b/lib/directory_role_templates/item/get_member_groups/get_member_groups.rb @@ -1,2 +1,2 @@ require_relative 'get_member_groups_post_request_body' -require_relative 'get_member_groups_response' +require_relative 'get_member_groups_post_response' diff --git a/lib/directory_role_templates/item/get_member_groups/get_member_groups_post_request_body.rb b/lib/directory_role_templates/item/get_member_groups/get_member_groups_post_request_body.rb index 4e9c4ac2ec..ddc012824c 100644 --- a/lib/directory_role_templates/item/get_member_groups/get_member_groups_post_request_body.rb +++ b/lib/directory_role_templates/item/get_member_groups/get_member_groups_post_request_body.rb @@ -17,22 +17,22 @@ class GetMemberGroupsPostRequestBody # The securityEnabledOnly property @security_enabled_only ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getMemberGroupsPostRequestBody and sets the default values. + ## Instantiates a new GetMemberGroupsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory_role_templates/item/get_member_groups/get_member_groups_post_response.rb b/lib/directory_role_templates/item/get_member_groups/get_member_groups_post_response.rb new file mode 100644 index 0000000000..b7a80a213c --- /dev/null +++ b/lib/directory_role_templates/item/get_member_groups/get_member_groups_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../directory_role_templates' +require_relative '../item' +require_relative './get_member_groups' + +module MicrosoftGraph + module DirectoryRoleTemplates + module Item + module GetMemberGroups + class GetMemberGroupsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetMemberGroupsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_member_groups_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetMemberGroupsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/directory_role_templates/item/get_member_groups/get_member_groups_request_builder.rb b/lib/directory_role_templates/item/get_member_groups/get_member_groups_request_builder.rb index 430df6d066..c422c54817 100644 --- a/lib/directory_role_templates/item/get_member_groups/get_member_groups_request_builder.rb +++ b/lib/directory_role_templates/item/get_member_groups/get_member_groups_request_builder.rb @@ -23,10 +23,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/directoryRoleTemplates/{directoryRoleTemplate%2Did}/getMemberGroups") end ## - ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. + ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the DirectoryResultSizeLimitExceeded error code. If you get the DirectoryResultSizeLimitExceeded error code, use the List group transitive memberOf API instead. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_member_groups_response + ## @return a Fiber of get_member_groups_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,12 +34,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoleTemplates::Item::GetMemberGroups::GetMemberGroupsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoleTemplates::Item::GetMemberGroups::GetMemberGroupsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. + ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the DirectoryResultSizeLimitExceeded error code. If you get the DirectoryResultSizeLimitExceeded error code, use the List group transitive memberOf API instead. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_member_groups_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetMemberGroupsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory_role_templates/item/get_member_groups/get_member_groups_response.rb b/lib/directory_role_templates/item/get_member_groups/get_member_groups_response.rb deleted file mode 100644 index 9b31631e04..0000000000 --- a/lib/directory_role_templates/item/get_member_groups/get_member_groups_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../directory_role_templates' -require_relative '../item' -require_relative './get_member_groups' - -module MicrosoftGraph - module DirectoryRoleTemplates - module Item - module GetMemberGroups - class GetMemberGroupsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getMemberGroupsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_member_groups_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetMemberGroupsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/directory_role_templates/item/get_member_objects/get_member_objects.rb b/lib/directory_role_templates/item/get_member_objects/get_member_objects.rb index 40edad6b9e..f7a486b0f9 100644 --- a/lib/directory_role_templates/item/get_member_objects/get_member_objects.rb +++ b/lib/directory_role_templates/item/get_member_objects/get_member_objects.rb @@ -1,2 +1,2 @@ require_relative 'get_member_objects_post_request_body' -require_relative 'get_member_objects_response' +require_relative 'get_member_objects_post_response' diff --git a/lib/directory_role_templates/item/get_member_objects/get_member_objects_post_request_body.rb b/lib/directory_role_templates/item/get_member_objects/get_member_objects_post_request_body.rb index b7e80d4fbd..ccf2d32510 100644 --- a/lib/directory_role_templates/item/get_member_objects/get_member_objects_post_request_body.rb +++ b/lib/directory_role_templates/item/get_member_objects/get_member_objects_post_request_body.rb @@ -17,22 +17,22 @@ class GetMemberObjectsPostRequestBody # The securityEnabledOnly property @security_enabled_only ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getMemberObjectsPostRequestBody and sets the default values. + ## Instantiates a new GetMemberObjectsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory_role_templates/item/get_member_objects/get_member_objects_post_response.rb b/lib/directory_role_templates/item/get_member_objects/get_member_objects_post_response.rb new file mode 100644 index 0000000000..6b3ce260db --- /dev/null +++ b/lib/directory_role_templates/item/get_member_objects/get_member_objects_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../directory_role_templates' +require_relative '../item' +require_relative './get_member_objects' + +module MicrosoftGraph + module DirectoryRoleTemplates + module Item + module GetMemberObjects + class GetMemberObjectsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetMemberObjectsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_member_objects_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetMemberObjectsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/directory_role_templates/item/get_member_objects/get_member_objects_request_builder.rb b/lib/directory_role_templates/item/get_member_objects/get_member_objects_request_builder.rb index 7e1322631c..d8c48ffded 100644 --- a/lib/directory_role_templates/item/get_member_objects/get_member_objects_request_builder.rb +++ b/lib/directory_role_templates/item/get_member_objects/get_member_objects_request_builder.rb @@ -23,10 +23,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/directoryRoleTemplates/{directoryRoleTemplate%2Did}/getMemberObjects") end ## - ## Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + ## Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:- user- group- service principal- organizational contact- device- directory object This function is transitive. Only users and role-enabled groups can be members of directory roles. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_member_objects_response + ## @return a Fiber of get_member_objects_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,12 +34,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoleTemplates::Item::GetMemberObjects::GetMemberObjectsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoleTemplates::Item::GetMemberObjects::GetMemberObjectsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + ## Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:- user- group- service principal- organizational contact- device- directory object This function is transitive. Only users and role-enabled groups can be members of directory roles. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_member_objects_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetMemberObjectsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory_role_templates/item/get_member_objects/get_member_objects_response.rb b/lib/directory_role_templates/item/get_member_objects/get_member_objects_response.rb deleted file mode 100644 index 5994ff778d..0000000000 --- a/lib/directory_role_templates/item/get_member_objects/get_member_objects_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../directory_role_templates' -require_relative '../item' -require_relative './get_member_objects' - -module MicrosoftGraph - module DirectoryRoleTemplates - module Item - module GetMemberObjects - class GetMemberObjectsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getMemberObjectsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_member_objects_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetMemberObjectsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/directory_role_templates/item/restore/restore_request_builder.rb b/lib/directory_role_templates/item/restore/restore_request_builder.rb index 1e71fd2304..e8882f3a55 100644 --- a/lib/directory_role_templates/item/restore/restore_request_builder.rb +++ b/lib/directory_role_templates/item/restore/restore_request_builder.rb @@ -24,7 +24,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/directoryRoleTemplates/{directoryRoleTemplate%2Did}/restore") end ## - ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. Restore a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_object ## @@ -33,27 +33,35 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. Restore a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a restore_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RestoreRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory_role_templates/validate_properties/validate_properties_post_request_body.rb b/lib/directory_role_templates/validate_properties/validate_properties_post_request_body.rb index 8f0d619e83..afe6f3f342 100644 --- a/lib/directory_role_templates/validate_properties/validate_properties_post_request_body.rb +++ b/lib/directory_role_templates/validate_properties/validate_properties_post_request_body.rb @@ -24,22 +24,22 @@ class ValidatePropertiesPostRequestBody # The onBehalfOfUserId property @on_behalf_of_user_id ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new validatePropertiesPostRequestBody and sets the default values. + ## Instantiates a new ValidatePropertiesPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory_role_templates/validate_properties/validate_properties_request_builder.rb b/lib/directory_role_templates/validate_properties/validate_properties_request_builder.rb index f949af7a55..2815616089 100644 --- a/lib/directory_role_templates/validate_properties/validate_properties_request_builder.rb +++ b/lib/directory_role_templates/validate_properties/validate_properties_request_builder.rb @@ -21,7 +21,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/directoryRoleTemplates/validateProperties") end ## - ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you're only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void @@ -32,12 +32,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you're only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -45,16 +44,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a validate_properties_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ValidatePropertiesRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory_roles/count/count_request_builder.rb b/lib/directory_roles/count/count_request_builder.rb index 7f42b66f25..aeeb1bdb83 100644 --- a/lib/directory_roles/count/count_request_builder.rb +++ b/lib/directory_roles/count/count_request_builder.rb @@ -18,7 +18,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -30,8 +30,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -41,17 +40,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory_roles/delta/delta.rb b/lib/directory_roles/delta/delta.rb index 0c348d20cb..8a3dc08b72 100644 --- a/lib/directory_roles/delta/delta.rb +++ b/lib/directory_roles/delta/delta.rb @@ -1 +1 @@ -require_relative 'delta_response' +require_relative 'delta_get_response' diff --git a/lib/directory_roles/delta/delta_get_response.rb b/lib/directory_roles/delta/delta_get_response.rb new file mode 100644 index 0000000000..374fa2deda --- /dev/null +++ b/lib/directory_roles/delta/delta_get_response.rb @@ -0,0 +1,69 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/base_delta_function_response' +require_relative '../../models/directory_role' +require_relative '../directory_roles' +require_relative './delta' + +module MicrosoftGraph + module DirectoryRoles + module Delta + class DeltaGetResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new DeltaGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a delta_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return DeltaGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryRole.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a directory_role + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/directory_roles/delta/delta_request_builder.rb b/lib/directory_roles/delta/delta_request_builder.rb index 70a98b5a8b..733bb440a8 100644 --- a/lib/directory_roles/delta/delta_request_builder.rb +++ b/lib/directory_roles/delta/delta_request_builder.rb @@ -18,49 +18,60 @@ class DeltaRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/delta(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Invoke function delta + ## Get newly created, updated, or deleted directory roles without having to perform a full read of the entire resource collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of delta_response + ## @return a Fiber of delta_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoles::Delta::DeltaResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoles::Delta::DeltaGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Invoke function delta + ## Get newly created, updated, or deleted directory roles without having to perform a full read of the entire resource collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a delta_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeltaRequestBuilder.new(raw_url, @request_adapter) + end ## - # Invoke function delta + # Get newly created, updated, or deleted directory roles without having to perform a full read of the entire resource collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. class DeltaRequestBuilderGetQueryParameters ## # Include count of items attr_accessor :count ## + # Expand related entities + attr_accessor :expand + ## # Filter items by property values attr_accessor :filter ## @@ -88,6 +99,8 @@ def get_query_parameter(original_name) case original_name when "count" return "%24count" + when "expand" + return "%24expand" when "filter" return "%24filter" when "orderby" diff --git a/lib/directory_roles/delta/delta_response.rb b/lib/directory_roles/delta/delta_response.rb deleted file mode 100644 index aa20962281..0000000000 --- a/lib/directory_roles/delta/delta_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../microsoft_graph' -require_relative '../../models/base_delta_function_response' -require_relative '../../models/directory_role' -require_relative '../directory_roles' -require_relative './delta' - -module MicrosoftGraph - module DirectoryRoles - module Delta - class DeltaResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new deltaResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a delta_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return DeltaResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryRole.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a directory_role - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end -end diff --git a/lib/directory_roles/directory_roles_request_builder.rb b/lib/directory_roles/directory_roles_request_builder.rb index e06433db5c..73dcfb2ba8 100644 --- a/lib/directory_roles/directory_roles_request_builder.rb +++ b/lib/directory_roles/directory_roles_request_builder.rb @@ -60,10 +60,10 @@ def by_directory_role_id(directory_role_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles{?%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## List the directory roles that are activated in the tenant. This operation only returns roles that have been activated. A role becomes activated when an admin activates the role using the Activate directoryRole API. Not all built-in roles are initially activated. When assigning a role using the Azure portal, the role activation step is implicitly done on the admin's behalf. To get the full list of roles that are available in Azure AD, use List directoryRoleTemplates. + ## List the directory roles that are activated in the tenant. This operation only returns roles that have been activated. A role becomes activated when an admin activates the role using the Activate directoryRole API. Not all built-in roles are initially activated. When assigning a role using the Microsoft Entra admin center, the role activation step is implicitly done on the admin's behalf. To get the full list of roles that are available in Microsoft Entra ID, use List directoryRoleTemplates. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_role_collection_response ## @@ -72,8 +72,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryRoleCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -88,26 +87,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryRole.create_from_discriminator_value(pn) }, error_mapping) end ## - ## List the directory roles that are activated in the tenant. This operation only returns roles that have been activated. A role becomes activated when an admin activates the role using the Activate directoryRole API. Not all built-in roles are initially activated. When assigning a role using the Azure portal, the role activation step is implicitly done on the admin's behalf. To get the full list of roles that are available in Azure AD, use List directoryRoleTemplates. + ## List the directory roles that are activated in the tenant. This operation only returns roles that have been activated. A role becomes activated when an admin activates the role using the Activate directoryRole API. Not all built-in roles are initially activated. When assigning a role using the Microsoft Entra admin center, the role activation step is implicitly done on the admin's behalf. To get the full list of roles that are available in Microsoft Entra ID, use List directoryRoleTemplates. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -119,20 +117,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a directory_roles_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DirectoryRolesRequestBuilder.new(raw_url, @request_adapter) + end ## - # List the directory roles that are activated in the tenant. This operation only returns roles that have been activated. A role becomes activated when an admin activates the role using the Activate directoryRole API. Not all built-in roles are initially activated. When assigning a role using the Azure portal, the role activation step is implicitly done on the admin's behalf. To get the full list of roles that are available in Azure AD, use List directoryRoleTemplates. + # List the directory roles that are activated in the tenant. This operation only returns roles that have been activated. A role becomes activated when an admin activates the role using the Activate directoryRole API. Not all built-in roles are initially activated. When assigning a role using the Microsoft Entra admin center, the role activation step is implicitly done on the admin's behalf. To get the full list of roles that are available in Microsoft Entra ID, use List directoryRoleTemplates. class DirectoryRolesRequestBuilderGetQueryParameters ## @@ -157,6 +164,9 @@ class DirectoryRolesRequestBuilderGetQueryParameters # Skip the first n items attr_accessor :skip ## + # Show only the first n items + attr_accessor :top + ## ## Maps the query parameters names to their encoded names for the URI template parsing. ## @param original_name The original query parameter name in the class. ## @return a string @@ -178,6 +188,8 @@ def get_query_parameter(original_name) return "%24select" when "skip" return "%24skip" + when "top" + return "%24top" else return original_name end diff --git a/lib/directory_roles/get_available_extension_properties/get_available_extension_properties.rb b/lib/directory_roles/get_available_extension_properties/get_available_extension_properties.rb index b6fee576bf..ce1b642cad 100644 --- a/lib/directory_roles/get_available_extension_properties/get_available_extension_properties.rb +++ b/lib/directory_roles/get_available_extension_properties/get_available_extension_properties.rb @@ -1,2 +1,2 @@ require_relative 'get_available_extension_properties_post_request_body' -require_relative 'get_available_extension_properties_response' +require_relative 'get_available_extension_properties_post_response' diff --git a/lib/directory_roles/get_available_extension_properties/get_available_extension_properties_post_request_body.rb b/lib/directory_roles/get_available_extension_properties/get_available_extension_properties_post_request_body.rb index 5ce3bbe642..38ad2296a4 100644 --- a/lib/directory_roles/get_available_extension_properties/get_available_extension_properties_post_request_body.rb +++ b/lib/directory_roles/get_available_extension_properties/get_available_extension_properties_post_request_body.rb @@ -15,22 +15,22 @@ class GetAvailableExtensionPropertiesPostRequestBody # The isSyncedFromOnPremises property @is_synced_from_on_premises ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getAvailableExtensionPropertiesPostRequestBody and sets the default values. + ## Instantiates a new GetAvailableExtensionPropertiesPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory_roles/get_available_extension_properties/get_available_extension_properties_post_response.rb b/lib/directory_roles/get_available_extension_properties/get_available_extension_properties_post_response.rb new file mode 100644 index 0000000000..2f92aed3b8 --- /dev/null +++ b/lib/directory_roles/get_available_extension_properties/get_available_extension_properties_post_response.rb @@ -0,0 +1,69 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/base_collection_pagination_count_response' +require_relative '../../models/extension_property' +require_relative '../directory_roles' +require_relative './get_available_extension_properties' + +module MicrosoftGraph + module DirectoryRoles + module GetAvailableExtensionProperties + class GetAvailableExtensionPropertiesPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetAvailableExtensionPropertiesPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_available_extension_properties_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetAvailableExtensionPropertiesPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ExtensionProperty.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a extension_property + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/directory_roles/get_available_extension_properties/get_available_extension_properties_request_builder.rb b/lib/directory_roles/get_available_extension_properties/get_available_extension_properties_request_builder.rb index 5fe0500375..f1a8a93b68 100644 --- a/lib/directory_roles/get_available_extension_properties/get_available_extension_properties_request_builder.rb +++ b/lib/directory_roles/get_available_extension_properties/get_available_extension_properties_request_builder.rb @@ -21,10 +21,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/getAvailableExtensionProperties") end ## - ## Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + ## Return all directory extension definitions that are registered in a directory, including through multitenant apps. The following entities support extension properties: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_available_extension_properties_response + ## @return a Fiber of get_available_extension_properties_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -32,12 +32,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoles::GetAvailableExtensionProperties::GetAvailableExtensionPropertiesResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoles::GetAvailableExtensionProperties::GetAvailableExtensionPropertiesPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:+ user+ group+ administrativeUnit+ application+ device+ organization + ## Return all directory extension definitions that are registered in a directory, including through multitenant apps. The following entities support extension properties: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -45,17 +44,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_available_extension_properties_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetAvailableExtensionPropertiesRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory_roles/get_available_extension_properties/get_available_extension_properties_response.rb b/lib/directory_roles/get_available_extension_properties/get_available_extension_properties_response.rb deleted file mode 100644 index 406e7e08a5..0000000000 --- a/lib/directory_roles/get_available_extension_properties/get_available_extension_properties_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../microsoft_graph' -require_relative '../../models/base_collection_pagination_count_response' -require_relative '../../models/extension_property' -require_relative '../directory_roles' -require_relative './get_available_extension_properties' - -module MicrosoftGraph - module DirectoryRoles - module GetAvailableExtensionProperties - class GetAvailableExtensionPropertiesResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getAvailableExtensionPropertiesResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_available_extension_properties_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetAvailableExtensionPropertiesResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ExtensionProperty.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a extension_property - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end -end diff --git a/lib/directory_roles/get_by_ids/get_by_ids.rb b/lib/directory_roles/get_by_ids/get_by_ids.rb index e4b0824834..131a179969 100644 --- a/lib/directory_roles/get_by_ids/get_by_ids.rb +++ b/lib/directory_roles/get_by_ids/get_by_ids.rb @@ -1,2 +1,2 @@ require_relative 'get_by_ids_post_request_body' -require_relative 'get_by_ids_response' +require_relative 'get_by_ids_post_response' diff --git a/lib/directory_roles/get_by_ids/get_by_ids_post_request_body.rb b/lib/directory_roles/get_by_ids/get_by_ids_post_request_body.rb index 7f45aa8f06..639a92ed90 100644 --- a/lib/directory_roles/get_by_ids/get_by_ids_post_request_body.rb +++ b/lib/directory_roles/get_by_ids/get_by_ids_post_request_body.rb @@ -18,22 +18,22 @@ class GetByIdsPostRequestBody # The types property @types ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getByIdsPostRequestBody and sets the default values. + ## Instantiates a new GetByIdsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory_roles/get_by_ids/get_by_ids_post_response.rb b/lib/directory_roles/get_by_ids/get_by_ids_post_response.rb new file mode 100644 index 0000000000..43cbfd3daa --- /dev/null +++ b/lib/directory_roles/get_by_ids/get_by_ids_post_response.rb @@ -0,0 +1,69 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../microsoft_graph' +require_relative '../../models/base_collection_pagination_count_response' +require_relative '../../models/directory_object' +require_relative '../directory_roles' +require_relative './get_by_ids' + +module MicrosoftGraph + module DirectoryRoles + module GetByIds + class GetByIdsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetByIdsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_by_ids_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetByIdsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a directory_object + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end +end diff --git a/lib/directory_roles/get_by_ids/get_by_ids_request_builder.rb b/lib/directory_roles/get_by_ids/get_by_ids_request_builder.rb index 92a43be24c..c6b9b55fb1 100644 --- a/lib/directory_roles/get_by_ids/get_by_ids_request_builder.rb +++ b/lib/directory_roles/get_by_ids/get_by_ids_request_builder.rb @@ -24,7 +24,7 @@ def initialize(path_parameters, request_adapter) ## Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_by_ids_response + ## @return a Fiber of get_by_ids_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -32,9 +32,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoles::GetByIds::GetByIdsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoles::GetByIds::GetByIdsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to: @@ -45,17 +44,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_by_ids_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetByIdsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory_roles/get_by_ids/get_by_ids_response.rb b/lib/directory_roles/get_by_ids/get_by_ids_response.rb deleted file mode 100644 index bef0472dfc..0000000000 --- a/lib/directory_roles/get_by_ids/get_by_ids_response.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../microsoft_graph' -require_relative '../../models/base_collection_pagination_count_response' -require_relative '../../models/directory_object' -require_relative '../directory_roles' -require_relative './get_by_ids' - -module MicrosoftGraph - module DirectoryRoles - module GetByIds - class GetByIdsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getByIdsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_by_ids_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetByIdsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a directory_object - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end -end diff --git a/lib/directory_roles/item/check_member_groups/check_member_groups.rb b/lib/directory_roles/item/check_member_groups/check_member_groups.rb index 938b908522..98148024fe 100644 --- a/lib/directory_roles/item/check_member_groups/check_member_groups.rb +++ b/lib/directory_roles/item/check_member_groups/check_member_groups.rb @@ -1,2 +1,2 @@ require_relative 'check_member_groups_post_request_body' -require_relative 'check_member_groups_response' +require_relative 'check_member_groups_post_response' diff --git a/lib/directory_roles/item/check_member_groups/check_member_groups_post_request_body.rb b/lib/directory_roles/item/check_member_groups/check_member_groups_post_request_body.rb index 4089662235..c5df884607 100644 --- a/lib/directory_roles/item/check_member_groups/check_member_groups_post_request_body.rb +++ b/lib/directory_roles/item/check_member_groups/check_member_groups_post_request_body.rb @@ -17,22 +17,22 @@ class CheckMemberGroupsPostRequestBody # The groupIds property @group_ids ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new checkMemberGroupsPostRequestBody and sets the default values. + ## Instantiates a new CheckMemberGroupsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory_roles/item/check_member_groups/check_member_groups_post_response.rb b/lib/directory_roles/item/check_member_groups/check_member_groups_post_response.rb new file mode 100644 index 0000000000..0f540d5b60 --- /dev/null +++ b/lib/directory_roles/item/check_member_groups/check_member_groups_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../directory_roles' +require_relative '../item' +require_relative './check_member_groups' + +module MicrosoftGraph + module DirectoryRoles + module Item + module CheckMemberGroups + class CheckMemberGroupsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new CheckMemberGroupsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a check_member_groups_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CheckMemberGroupsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/directory_roles/item/check_member_groups/check_member_groups_request_builder.rb b/lib/directory_roles/item/check_member_groups/check_member_groups_request_builder.rb index 644042ab65..29cd8c124a 100644 --- a/lib/directory_roles/item/check_member_groups/check_member_groups_request_builder.rb +++ b/lib/directory_roles/item/check_member_groups/check_member_groups_request_builder.rb @@ -23,10 +23,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/checkMemberGroups") end ## - ## Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + ## Check for membership in a specified list of group IDs, and return from that list the IDs of groups where a specified object is a member. The specified object can be of one of the following types:- user- group- service principal- organizational contact- device- directory object This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of check_member_groups_response + ## @return a Fiber of check_member_groups_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,12 +34,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoles::Item::CheckMemberGroups::CheckMemberGroupsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoles::Item::CheckMemberGroups::CheckMemberGroupsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Check for membership in a specified list of group IDs, and return from that list those groups (identified by IDs) of which the specified user, group, service principal, organizational contact, device, or directory object is a member. This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Azure AD. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. + ## Check for membership in a specified list of group IDs, and return from that list the IDs of groups where a specified object is a member. The specified object can be of one of the following types:- user- group- service principal- organizational contact- device- directory object This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a check_member_groups_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CheckMemberGroupsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory_roles/item/check_member_groups/check_member_groups_response.rb b/lib/directory_roles/item/check_member_groups/check_member_groups_response.rb deleted file mode 100644 index 5e22162d5a..0000000000 --- a/lib/directory_roles/item/check_member_groups/check_member_groups_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../directory_roles' -require_relative '../item' -require_relative './check_member_groups' - -module MicrosoftGraph - module DirectoryRoles - module Item - module CheckMemberGroups - class CheckMemberGroupsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new checkMemberGroupsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a check_member_groups_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return CheckMemberGroupsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/directory_roles/item/check_member_objects/check_member_objects.rb b/lib/directory_roles/item/check_member_objects/check_member_objects.rb index 67fbf971e7..1826285d49 100644 --- a/lib/directory_roles/item/check_member_objects/check_member_objects.rb +++ b/lib/directory_roles/item/check_member_objects/check_member_objects.rb @@ -1,2 +1,2 @@ require_relative 'check_member_objects_post_request_body' -require_relative 'check_member_objects_response' +require_relative 'check_member_objects_post_response' diff --git a/lib/directory_roles/item/check_member_objects/check_member_objects_post_request_body.rb b/lib/directory_roles/item/check_member_objects/check_member_objects_post_request_body.rb index 82c631e9ce..8104c3f510 100644 --- a/lib/directory_roles/item/check_member_objects/check_member_objects_post_request_body.rb +++ b/lib/directory_roles/item/check_member_objects/check_member_objects_post_request_body.rb @@ -17,22 +17,22 @@ class CheckMemberObjectsPostRequestBody # The ids property @ids ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new checkMemberObjectsPostRequestBody and sets the default values. + ## Instantiates a new CheckMemberObjectsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory_roles/item/check_member_objects/check_member_objects_post_response.rb b/lib/directory_roles/item/check_member_objects/check_member_objects_post_response.rb new file mode 100644 index 0000000000..025fb955b6 --- /dev/null +++ b/lib/directory_roles/item/check_member_objects/check_member_objects_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../directory_roles' +require_relative '../item' +require_relative './check_member_objects' + +module MicrosoftGraph + module DirectoryRoles + module Item + module CheckMemberObjects + class CheckMemberObjectsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new CheckMemberObjectsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a check_member_objects_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return CheckMemberObjectsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/directory_roles/item/check_member_objects/check_member_objects_request_builder.rb b/lib/directory_roles/item/check_member_objects/check_member_objects_request_builder.rb index 4fe8225fa5..c9b96b3be7 100644 --- a/lib/directory_roles/item/check_member_objects/check_member_objects_request_builder.rb +++ b/lib/directory_roles/item/check_member_objects/check_member_objects_request_builder.rb @@ -26,7 +26,7 @@ def initialize(path_parameters, request_adapter) ## Invoke action checkMemberObjects ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of check_member_objects_response + ## @return a Fiber of check_member_objects_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,9 +34,8 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoles::Item::CheckMemberObjects::CheckMemberObjectsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoles::Item::CheckMemberObjects::CheckMemberObjectsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Invoke action checkMemberObjects @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a check_member_objects_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CheckMemberObjectsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory_roles/item/check_member_objects/check_member_objects_response.rb b/lib/directory_roles/item/check_member_objects/check_member_objects_response.rb deleted file mode 100644 index 730228c019..0000000000 --- a/lib/directory_roles/item/check_member_objects/check_member_objects_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../directory_roles' -require_relative '../item' -require_relative './check_member_objects' - -module MicrosoftGraph - module DirectoryRoles - module Item - module CheckMemberObjects - class CheckMemberObjectsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new checkMemberObjectsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a check_member_objects_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return CheckMemberObjectsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/directory_roles/item/directory_role_item_request_builder.rb b/lib/directory_roles/item/directory_role_item_request_builder.rb index dc4f1d3f5d..c1ce52c6e5 100644 --- a/lib/directory_roles/item/directory_role_item_request_builder.rb +++ b/lib/directory_roles/item/directory_role_item_request_builder.rb @@ -61,7 +61,7 @@ def scoped_members() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}{?%24expand,%24select}") end ## ## Delete entity from directoryRoles @@ -73,12 +73,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + ## Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_role ## @@ -87,8 +86,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryRole.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -103,8 +101,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryRole.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -114,31 +111,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + ## Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -150,20 +148,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a directory_role_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DirectoryRoleItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + # Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. class DirectoryRoleItemRequestBuilderGetQueryParameters ## diff --git a/lib/directory_roles/item/get_member_groups/get_member_groups.rb b/lib/directory_roles/item/get_member_groups/get_member_groups.rb index 0a25b012ea..9190b99738 100644 --- a/lib/directory_roles/item/get_member_groups/get_member_groups.rb +++ b/lib/directory_roles/item/get_member_groups/get_member_groups.rb @@ -1,2 +1,2 @@ require_relative 'get_member_groups_post_request_body' -require_relative 'get_member_groups_response' +require_relative 'get_member_groups_post_response' diff --git a/lib/directory_roles/item/get_member_groups/get_member_groups_post_request_body.rb b/lib/directory_roles/item/get_member_groups/get_member_groups_post_request_body.rb index d76e839641..5ff121ca39 100644 --- a/lib/directory_roles/item/get_member_groups/get_member_groups_post_request_body.rb +++ b/lib/directory_roles/item/get_member_groups/get_member_groups_post_request_body.rb @@ -17,22 +17,22 @@ class GetMemberGroupsPostRequestBody # The securityEnabledOnly property @security_enabled_only ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getMemberGroupsPostRequestBody and sets the default values. + ## Instantiates a new GetMemberGroupsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory_roles/item/get_member_groups/get_member_groups_post_response.rb b/lib/directory_roles/item/get_member_groups/get_member_groups_post_response.rb new file mode 100644 index 0000000000..c33452218d --- /dev/null +++ b/lib/directory_roles/item/get_member_groups/get_member_groups_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../directory_roles' +require_relative '../item' +require_relative './get_member_groups' + +module MicrosoftGraph + module DirectoryRoles + module Item + module GetMemberGroups + class GetMemberGroupsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetMemberGroupsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_member_groups_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetMemberGroupsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/directory_roles/item/get_member_groups/get_member_groups_request_builder.rb b/lib/directory_roles/item/get_member_groups/get_member_groups_request_builder.rb index 6c3298c564..7bf380bb2d 100644 --- a/lib/directory_roles/item/get_member_groups/get_member_groups_request_builder.rb +++ b/lib/directory_roles/item/get_member_groups/get_member_groups_request_builder.rb @@ -23,10 +23,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/getMemberGroups") end ## - ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. + ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the DirectoryResultSizeLimitExceeded error code. If you get the DirectoryResultSizeLimitExceeded error code, use the List group transitive memberOf API instead. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_member_groups_response + ## @return a Fiber of get_member_groups_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,12 +34,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoles::Item::GetMemberGroups::GetMemberGroupsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoles::Item::GetMemberGroups::GetMemberGroupsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. + ## Return all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the DirectoryResultSizeLimitExceeded error code. If you get the DirectoryResultSizeLimitExceeded error code, use the List group transitive memberOf API instead. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_member_groups_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetMemberGroupsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory_roles/item/get_member_groups/get_member_groups_response.rb b/lib/directory_roles/item/get_member_groups/get_member_groups_response.rb deleted file mode 100644 index 594ca5b048..0000000000 --- a/lib/directory_roles/item/get_member_groups/get_member_groups_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../directory_roles' -require_relative '../item' -require_relative './get_member_groups' - -module MicrosoftGraph - module DirectoryRoles - module Item - module GetMemberGroups - class GetMemberGroupsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getMemberGroupsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_member_groups_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetMemberGroupsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/directory_roles/item/get_member_objects/get_member_objects.rb b/lib/directory_roles/item/get_member_objects/get_member_objects.rb index 40edad6b9e..f7a486b0f9 100644 --- a/lib/directory_roles/item/get_member_objects/get_member_objects.rb +++ b/lib/directory_roles/item/get_member_objects/get_member_objects.rb @@ -1,2 +1,2 @@ require_relative 'get_member_objects_post_request_body' -require_relative 'get_member_objects_response' +require_relative 'get_member_objects_post_response' diff --git a/lib/directory_roles/item/get_member_objects/get_member_objects_post_request_body.rb b/lib/directory_roles/item/get_member_objects/get_member_objects_post_request_body.rb index fe4feecc0c..b0b535e45c 100644 --- a/lib/directory_roles/item/get_member_objects/get_member_objects_post_request_body.rb +++ b/lib/directory_roles/item/get_member_objects/get_member_objects_post_request_body.rb @@ -17,22 +17,22 @@ class GetMemberObjectsPostRequestBody # The securityEnabledOnly property @security_enabled_only ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new getMemberObjectsPostRequestBody and sets the default values. + ## Instantiates a new GetMemberObjectsPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory_roles/item/get_member_objects/get_member_objects_post_response.rb b/lib/directory_roles/item/get_member_objects/get_member_objects_post_response.rb new file mode 100644 index 0000000000..fe7b82158e --- /dev/null +++ b/lib/directory_roles/item/get_member_objects/get_member_objects_post_response.rb @@ -0,0 +1,71 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/base_collection_pagination_count_response' +require_relative '../../directory_roles' +require_relative '../item' +require_relative './get_member_objects' + +module MicrosoftGraph + module DirectoryRoles + module Item + module GetMemberObjects + class GetMemberObjectsPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetMemberObjectsPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_member_objects_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetMemberObjectsPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_primitive_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a string + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/directory_roles/item/get_member_objects/get_member_objects_request_builder.rb b/lib/directory_roles/item/get_member_objects/get_member_objects_request_builder.rb index 9eca4d8b56..ecbd67ffad 100644 --- a/lib/directory_roles/item/get_member_objects/get_member_objects_request_builder.rb +++ b/lib/directory_roles/item/get_member_objects/get_member_objects_request_builder.rb @@ -23,10 +23,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/getMemberObjects") end ## - ## Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + ## Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:- user- group- service principal- organizational contact- device- directory object This function is transitive. Only users and role-enabled groups can be members of directory roles. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_member_objects_response + ## @return a Fiber of get_member_objects_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -34,12 +34,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoles::Item::GetMemberObjects::GetMemberObjectsResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::DirectoryRoles::Item::GetMemberObjects::GetMemberObjectsPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Return all IDs for the groups, administrative units, and directory roles that a user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. Note: Only users and role-enabled groups can be members of directory roles. + ## Return all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:- user- group- service principal- organizational contact- device- directory object This function is transitive. Only users and role-enabled groups can be members of directory roles. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -47,17 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_member_objects_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetMemberObjectsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory_roles/item/get_member_objects/get_member_objects_response.rb b/lib/directory_roles/item/get_member_objects/get_member_objects_response.rb deleted file mode 100644 index f50a9dfbf3..0000000000 --- a/lib/directory_roles/item/get_member_objects/get_member_objects_response.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../../models/base_collection_pagination_count_response' -require_relative '../../directory_roles' -require_relative '../item' -require_relative './get_member_objects' - -module MicrosoftGraph - module DirectoryRoles - module Item - module GetMemberObjects - class GetMemberObjectsResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getMemberObjectsResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_member_objects_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetMemberObjectsResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_primitive_values(String) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_primitive_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a string - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/directory_roles/item/members/count/count_request_builder.rb b/lib/directory_roles/item/members/count/count_request_builder.rb index 52c095a8cb..cc17ff575a 100644 --- a/lib/directory_roles/item/members/count/count_request_builder.rb +++ b/lib/directory_roles/item/members/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory_roles/item/members/graph_application/count/count_request_builder.rb b/lib/directory_roles/item/members/graph_application/count/count_request_builder.rb index 65ecad747c..f74739d9f4 100644 --- a/lib/directory_roles/item/members/graph_application/count/count_request_builder.rb +++ b/lib/directory_roles/item/members/graph_application/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/graph.application/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/graph.application/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory_roles/item/members/graph_application/graph_application_request_builder.rb b/lib/directory_roles/item/members/graph_application/graph_application_request_builder.rb index f4ff954f15..0ae143a675 100644 --- a/lib/directory_roles/item/members/graph_application/graph_application_request_builder.rb +++ b/lib/directory_roles/item/members/graph_application/graph_application_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/graph.application{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/graph.application{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.application in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ApplicationCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_application_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphApplicationRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.application in the microsoft.graph.directoryObject collection diff --git a/lib/directory_roles/item/members/graph_device/count/count_request_builder.rb b/lib/directory_roles/item/members/graph_device/count/count_request_builder.rb index c30747c072..fbd34fc69e 100644 --- a/lib/directory_roles/item/members/graph_device/count/count_request_builder.rb +++ b/lib/directory_roles/item/members/graph_device/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/graph.device/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/graph.device/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory_roles/item/members/graph_device/graph_device_request_builder.rb b/lib/directory_roles/item/members/graph_device/graph_device_request_builder.rb index bf2808a633..6608da125b 100644 --- a/lib/directory_roles/item/members/graph_device/graph_device_request_builder.rb +++ b/lib/directory_roles/item/members/graph_device/graph_device_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/graph.device{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/graph.device{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.device in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DeviceCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_device_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphDeviceRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.device in the microsoft.graph.directoryObject collection diff --git a/lib/directory_roles/item/members/graph_group/count/count_request_builder.rb b/lib/directory_roles/item/members/graph_group/count/count_request_builder.rb index f5f8a55308..38560a1be1 100644 --- a/lib/directory_roles/item/members/graph_group/count/count_request_builder.rb +++ b/lib/directory_roles/item/members/graph_group/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/graph.group/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/graph.group/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory_roles/item/members/graph_group/graph_group_request_builder.rb b/lib/directory_roles/item/members/graph_group/graph_group_request_builder.rb index f8af1dd76c..85a5dbf78b 100644 --- a/lib/directory_roles/item/members/graph_group/graph_group_request_builder.rb +++ b/lib/directory_roles/item/members/graph_group/graph_group_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/graph.group{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/graph.group{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::GroupCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_group_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphGroupRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection diff --git a/lib/directory_roles/item/members/graph_org_contact/count/count_request_builder.rb b/lib/directory_roles/item/members/graph_org_contact/count/count_request_builder.rb index 39abc3fc35..40a1cd54b0 100644 --- a/lib/directory_roles/item/members/graph_org_contact/count/count_request_builder.rb +++ b/lib/directory_roles/item/members/graph_org_contact/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/graph.orgContact/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/graph.orgContact/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory_roles/item/members/graph_org_contact/graph_org_contact_request_builder.rb b/lib/directory_roles/item/members/graph_org_contact/graph_org_contact_request_builder.rb index 61ac24c472..ca18b2447f 100644 --- a/lib/directory_roles/item/members/graph_org_contact/graph_org_contact_request_builder.rb +++ b/lib/directory_roles/item/members/graph_org_contact/graph_org_contact_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/graph.orgContact{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/graph.orgContact{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.orgContact in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::OrgContactCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_org_contact_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphOrgContactRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.orgContact in the microsoft.graph.directoryObject collection diff --git a/lib/directory_roles/item/members/graph_service_principal/count/count_request_builder.rb b/lib/directory_roles/item/members/graph_service_principal/count/count_request_builder.rb index 6458350983..e003746062 100644 --- a/lib/directory_roles/item/members/graph_service_principal/count/count_request_builder.rb +++ b/lib/directory_roles/item/members/graph_service_principal/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/graph.servicePrincipal/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/graph.servicePrincipal/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory_roles/item/members/graph_service_principal/graph_service_principal_request_builder.rb b/lib/directory_roles/item/members/graph_service_principal/graph_service_principal_request_builder.rb index 751f813f10..c6b7023246 100644 --- a/lib/directory_roles/item/members/graph_service_principal/graph_service_principal_request_builder.rb +++ b/lib/directory_roles/item/members/graph_service_principal/graph_service_principal_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/graph.servicePrincipal{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/graph.servicePrincipal{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.servicePrincipal in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServicePrincipalCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_service_principal_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphServicePrincipalRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.servicePrincipal in the microsoft.graph.directoryObject collection diff --git a/lib/directory_roles/item/members/graph_user/count/count_request_builder.rb b/lib/directory_roles/item/members/graph_user/count/count_request_builder.rb index ae9a11281b..d361a91dad 100644 --- a/lib/directory_roles/item/members/graph_user/count/count_request_builder.rb +++ b/lib/directory_roles/item/members/graph_user/count/count_request_builder.rb @@ -24,7 +24,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/graph.user/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/graph.user/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -36,8 +36,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -47,17 +46,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory_roles/item/members/graph_user/graph_user_request_builder.rb b/lib/directory_roles/item/members/graph_user/graph_user_request_builder.rb index d32427e9e8..a45bc99c55 100644 --- a/lib/directory_roles/item/members/graph_user/graph_user_request_builder.rb +++ b/lib/directory_roles/item/members/graph_user/graph_user_request_builder.rb @@ -29,7 +29,7 @@ def count() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/graph.user{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/graph.user{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get the items of type microsoft.graph.user in the microsoft.graph.directoryObject collection @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UserCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_user_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphUserRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the items of type microsoft.graph.user in the microsoft.graph.directoryObject collection diff --git a/lib/directory_roles/item/members/item/graph_application/graph_application_request_builder.rb b/lib/directory_roles/item/members/item/graph_application/graph_application_request_builder.rb index 24cab1eed4..af2f2f27b5 100644 --- a/lib/directory_roles/item/members/item/graph_application/graph_application_request_builder.rb +++ b/lib/directory_roles/item/members/item/graph_application/graph_application_request_builder.rb @@ -25,7 +25,7 @@ class GraphApplicationRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBu ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/{directoryObject%2Did}/graph.application{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/{directoryObject%2Did}/graph.application{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.application @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Application.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_application_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphApplicationRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.application diff --git a/lib/directory_roles/item/members/item/graph_device/graph_device_request_builder.rb b/lib/directory_roles/item/members/item/graph_device/graph_device_request_builder.rb index aa97d22feb..c0b2c18f2d 100644 --- a/lib/directory_roles/item/members/item/graph_device/graph_device_request_builder.rb +++ b/lib/directory_roles/item/members/item/graph_device/graph_device_request_builder.rb @@ -25,7 +25,7 @@ class GraphDeviceRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/{directoryObject%2Did}/graph.device{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/{directoryObject%2Did}/graph.device{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.device @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Device.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_device_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphDeviceRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.device diff --git a/lib/directory_roles/item/members/item/graph_group/graph_group_request_builder.rb b/lib/directory_roles/item/members/item/graph_group/graph_group_request_builder.rb index cad3203c81..a59a884c74 100644 --- a/lib/directory_roles/item/members/item/graph_group/graph_group_request_builder.rb +++ b/lib/directory_roles/item/members/item/graph_group/graph_group_request_builder.rb @@ -25,7 +25,7 @@ class GraphGroupRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/{directoryObject%2Did}/graph.group{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/{directoryObject%2Did}/graph.group{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.group @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Group.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_group_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphGroupRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.group diff --git a/lib/directory_roles/item/members/item/graph_org_contact/graph_org_contact_request_builder.rb b/lib/directory_roles/item/members/item/graph_org_contact/graph_org_contact_request_builder.rb index 33b1c3ca2b..88f6500831 100644 --- a/lib/directory_roles/item/members/item/graph_org_contact/graph_org_contact_request_builder.rb +++ b/lib/directory_roles/item/members/item/graph_org_contact/graph_org_contact_request_builder.rb @@ -25,7 +25,7 @@ class GraphOrgContactRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBui ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/{directoryObject%2Did}/graph.orgContact{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/{directoryObject%2Did}/graph.orgContact{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.orgContact @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::OrgContact.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_org_contact_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphOrgContactRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.orgContact diff --git a/lib/directory_roles/item/members/item/graph_service_principal/graph_service_principal_request_builder.rb b/lib/directory_roles/item/members/item/graph_service_principal/graph_service_principal_request_builder.rb index b3fa7e0c6f..645232ba2a 100644 --- a/lib/directory_roles/item/members/item/graph_service_principal/graph_service_principal_request_builder.rb +++ b/lib/directory_roles/item/members/item/graph_service_principal/graph_service_principal_request_builder.rb @@ -25,7 +25,7 @@ class GraphServicePrincipalRequestBuilder < MicrosoftKiotaAbstractions::BaseRequ ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/{directoryObject%2Did}/graph.servicePrincipal{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/{directoryObject%2Did}/graph.servicePrincipal{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.servicePrincipal @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServicePrincipal.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_service_principal_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphServicePrincipalRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.servicePrincipal diff --git a/lib/directory_roles/item/members/item/graph_user/graph_user_request_builder.rb b/lib/directory_roles/item/members/item/graph_user/graph_user_request_builder.rb index 5d92cbae19..8afc35eed8 100644 --- a/lib/directory_roles/item/members/item/graph_user/graph_user_request_builder.rb +++ b/lib/directory_roles/item/members/item/graph_user/graph_user_request_builder.rb @@ -25,7 +25,7 @@ class GraphUserRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/{directoryObject%2Did}/graph.user{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/{directoryObject%2Did}/graph.user{?%24expand,%24select}") end ## ## Get the item of type microsoft.graph.directoryObject as microsoft.graph.user @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::User.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a graph_user_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GraphUserRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the item of type microsoft.graph.directoryObject as microsoft.graph.user diff --git a/lib/directory_roles/item/members/item/ref/ref_request_builder.rb b/lib/directory_roles/item/members/item/ref/ref_request_builder.rb index 5fc6ee83cc..2a575bff89 100644 --- a/lib/directory_roles/item/members/item/ref/ref_request_builder.rb +++ b/lib/directory_roles/item/members/item/ref/ref_request_builder.rb @@ -24,10 +24,10 @@ class RefRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/{directoryObject%2Did}/$ref{?%40id*}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/{directoryObject%2Did}/$ref") end ## - ## Remove a member from a directoryRole. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + ## Remove a member from a directoryRole. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void ## @@ -36,49 +36,34 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Remove a member from a directoryRole. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + ## Remove a member from a directoryRole. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) - request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end - ## - # Remove a member from a directoryRole. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. - class RefRequestBuilderDeleteQueryParameters - - ## - # Delete Uri - attr_accessor :id - ## - ## Maps the query parameters names to their encoded names for the URI template parsing. - ## @param original_name The original query parameter name in the class. - ## @return a string - ## - def get_query_parameter(original_name) - raise StandardError, 'original_name cannot be null' if original_name.nil? - case original_name - when "id" - return "%40id" - else - return original_name - end - end + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ref_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RefRequestBuilder.new(raw_url, @request_adapter) end end end diff --git a/lib/directory_roles/item/members/members_request_builder.rb b/lib/directory_roles/item/members/members_request_builder.rb index 31a10ded5a..4ff85d8c3a 100644 --- a/lib/directory_roles/item/members/members_request_builder.rb +++ b/lib/directory_roles/item/members/members_request_builder.rb @@ -65,7 +65,7 @@ def ref() end ## ## Gets an item from the MicrosoftGraph.directoryRoles.item.members.item collection - ## @param directory_object_id Unique identifier of the item + ## @param directory_object_id The unique identifier of directoryObject ## @return a directory_object_item_request_builder ## def by_directory_object_id(directory_object_id) @@ -81,10 +81,10 @@ def by_directory_object_id(directory_object_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Users that are members of this directory role. HTTP Methods: GET, POST, DELETE. Read-only. Nullable. Supports $expand. + ## Retrieve the list of principals that are assigned to the directory role. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_object_collection_response ## @@ -93,31 +93,39 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObjectCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Users that are members of this directory role. HTTP Methods: GET, POST, DELETE. Read-only. Nullable. Supports $expand. + ## Retrieve the list of principals that are assigned to the directory role. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a members_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MembersRequestBuilder.new(raw_url, @request_adapter) + end ## - # Users that are members of this directory role. HTTP Methods: GET, POST, DELETE. Read-only. Nullable. Supports $expand. + # Retrieve the list of principals that are assigned to the directory role. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. class MembersRequestBuilderGetQueryParameters ## diff --git a/lib/directory_roles/item/members/ref/ref_request_builder.rb b/lib/directory_roles/item/members/ref/ref_request_builder.rb index 29add70fae..f84e787b97 100644 --- a/lib/directory_roles/item/members/ref/ref_request_builder.rb +++ b/lib/directory_roles/item/members/ref/ref_request_builder.rb @@ -24,10 +24,23 @@ class RefRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/$ref{?%24top,%24skip,%24search,%24filter,%24count,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/$ref?@id={%40id}{&%24count,%24filter,%24orderby,%24search,%24skip,%24top}") end ## - ## Users that are members of this directory role. HTTP Methods: GET, POST, DELETE. Read-only. Nullable. Supports $expand. + ## Remove a member from a directoryRole. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Retrieve the list of principals that are assigned to the directory role. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of string_collection_response ## @@ -36,12 +49,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::StringCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Create a new directory role member. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + ## Create a new directory role member. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void @@ -52,30 +64,47 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Users that are members of this directory role. HTTP Methods: GET, POST, DELETE. Read-only. Nullable. Supports $expand. + ## Remove a member from a directoryRole. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## - def to_get_request_information(request_configuration=nil) + def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = '{+baseurl}/directoryRoles/{directoryRole%2Did}/members/$ref?@id={%40id}' request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Retrieve the list of principals that are assigned to the directory role. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = '{+baseurl}/directoryRoles/{directoryRole%2Did}/members/$ref{?%24count,%24filter,%24orderby,%24search,%24skip,%24top}' + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Create a new directory role member. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + ## Create a new directory role member. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -83,19 +112,52 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = '{+baseurl}/directoryRoles/{directoryRole%2Did}/members/$ref' + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ref_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RefRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Remove a member from a directoryRole. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. + class RefRequestBuilderDeleteQueryParameters + + ## + # The delete Uri + attr_accessor :id + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "id" + return "%40id" + else + return original_name + end + end + end ## - # Users that are members of this directory role. HTTP Methods: GET, POST, DELETE. Read-only. Nullable. Supports $expand. + # Retrieve the list of principals that are assigned to the directory role. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. class RefRequestBuilderGetQueryParameters ## diff --git a/lib/directory_roles/item/restore/restore_request_builder.rb b/lib/directory_roles/item/restore/restore_request_builder.rb index a6811b6bd0..2bd977ab4b 100644 --- a/lib/directory_roles/item/restore/restore_request_builder.rb +++ b/lib/directory_roles/item/restore/restore_request_builder.rb @@ -24,7 +24,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/restore") end ## - ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. Restore a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_object ## @@ -33,27 +33,35 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. If an item was accidentally deleted, you can fully restore the item. This is not applicable to security groups, which are deleted permanently. A recently deleted item will remain available for up to 30 days. After 30 days, the item is permanently deleted. + ## Restore a recently deleted application, group, servicePrincipal, administrative unit, or user object from deleted items. Restore a recently deleted directory object from deleted items. The following types are supported:- administrativeUnit- application- certificateBasedAuthPki- certificateAuthorityDetail- group- servicePrincipal ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a restore_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RestoreRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory_roles/item/scoped_members/count/count_request_builder.rb b/lib/directory_roles/item/scoped_members/count/count_request_builder.rb index ac7783f705..637ee9abff 100644 --- a/lib/directory_roles/item/scoped_members/count/count_request_builder.rb +++ b/lib/directory_roles/item/scoped_members/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/scopedMembers/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/scopedMembers/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/directory_roles/item/scoped_members/item/scoped_role_membership_item_request_builder.rb b/lib/directory_roles/item/scoped_members/item/scoped_role_membership_item_request_builder.rb index c5037d4ddb..a218cfc70e 100644 --- a/lib/directory_roles/item/scoped_members/item/scoped_role_membership_item_request_builder.rb +++ b/lib/directory_roles/item/scoped_members/item/scoped_role_membership_item_request_builder.rb @@ -23,7 +23,7 @@ class ScopedRoleMembershipItemRequestBuilder < MicrosoftKiotaAbstractions::BaseR ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/scopedMembers/{scopedRoleMembership%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/scopedMembers/{scopedRoleMembership%2Did}{?%24expand,%24select}") end ## ## Delete navigation property scopedMembers for directoryRoles @@ -35,8 +35,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ScopedRoleMembership.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -65,8 +63,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ScopedRoleMembership.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,13 +73,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -92,15 +90,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,17 +110,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a scoped_role_membership_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ScopedRoleMembershipItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Members of this directory role that are scoped to administrative units. Read-only. Nullable. diff --git a/lib/directory_roles/item/scoped_members/scoped_members_request_builder.rb b/lib/directory_roles/item/scoped_members/scoped_members_request_builder.rb index f33619eb80..e6990b4ab1 100644 --- a/lib/directory_roles/item/scoped_members/scoped_members_request_builder.rb +++ b/lib/directory_roles/item/scoped_members/scoped_members_request_builder.rb @@ -40,7 +40,7 @@ def by_scoped_role_membership_id(scoped_role_membership_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/scopedMembers{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/{directoryRole%2Did}/scopedMembers{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Retrieve a list of scopedRoleMembership objects for a directory role. @@ -52,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ScopedRoleMembershipCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -68,8 +67,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ScopedRoleMembership.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -79,15 +77,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -99,17 +97,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a scoped_members_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ScopedMembersRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve a list of scopedRoleMembership objects for a directory role. diff --git a/lib/directory_roles/validate_properties/validate_properties_post_request_body.rb b/lib/directory_roles/validate_properties/validate_properties_post_request_body.rb index 573067132c..d39899a148 100644 --- a/lib/directory_roles/validate_properties/validate_properties_post_request_body.rb +++ b/lib/directory_roles/validate_properties/validate_properties_post_request_body.rb @@ -24,22 +24,22 @@ class ValidatePropertiesPostRequestBody # The onBehalfOfUserId property @on_behalf_of_user_id ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new validatePropertiesPostRequestBody and sets the default values. + ## Instantiates a new ValidatePropertiesPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/directory_roles/validate_properties/validate_properties_request_builder.rb b/lib/directory_roles/validate_properties/validate_properties_request_builder.rb index 6fd18fd554..b567bfa08d 100644 --- a/lib/directory_roles/validate_properties/validate_properties_request_builder.rb +++ b/lib/directory_roles/validate_properties/validate_properties_request_builder.rb @@ -21,7 +21,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/directoryRoles/validateProperties") end ## - ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you're only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void @@ -32,12 +32,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you are only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. + ## Validate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:1. Validate the prefix and suffix naming policy2. Validate the custom banned words policy3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you're only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -45,16 +44,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a validate_properties_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ValidatePropertiesRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/directory_roles_with_role_template_id/directory_roles_with_role_template_id_request_builder.rb b/lib/directory_roles_with_role_template_id/directory_roles_with_role_template_id_request_builder.rb index 208f5ff995..36862b9e1b 100644 --- a/lib/directory_roles_with_role_template_id/directory_roles_with_role_template_id_request_builder.rb +++ b/lib/directory_roles_with_role_template_id/directory_roles_with_role_template_id_request_builder.rb @@ -18,7 +18,7 @@ class DirectoryRolesWithRoleTemplateIdRequestBuilder < MicrosoftKiotaAbstraction ## @return a void ## def initialize(path_parameters, request_adapter, role_template_id=nil) - super(path_parameters, request_adapter, "{+baseurl}/directoryRoles(roleTemplateId='{roleTemplateId}'){?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/directoryRoles(roleTemplateId='{roleTemplateId}'){?%24expand,%24select}") end ## ## Delete entity from directoryRoles by roleTemplateId @@ -30,12 +30,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + ## Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_role ## @@ -44,8 +43,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryRole.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -60,8 +58,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryRole.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -71,31 +68,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + ## Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -107,20 +105,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a directory_roles_with_role_template_id_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DirectoryRolesWithRoleTemplateIdRequestBuilder.new(raw_url, @request_adapter) + end ## - # Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs. + # Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Microsoft Entra admin center. For details, see Role template IDs. class DirectoryRolesWithRoleTemplateIdRequestBuilderGetQueryParameters ## diff --git a/lib/domain_dns_records/count/count_request_builder.rb b/lib/domain_dns_records/count/count_request_builder.rb index 7d7e1c1b98..7b56c5412c 100644 --- a/lib/domain_dns_records/count/count_request_builder.rb +++ b/lib/domain_dns_records/count/count_request_builder.rb @@ -18,7 +18,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/domainDnsRecords/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/domainDnsRecords/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -30,8 +30,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -41,17 +40,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/domain_dns_records/domain_dns_records_request_builder.rb b/lib/domain_dns_records/domain_dns_records_request_builder.rb index 49616edd48..0833bb885e 100644 --- a/lib/domain_dns_records/domain_dns_records_request_builder.rb +++ b/lib/domain_dns_records/domain_dns_records_request_builder.rb @@ -36,7 +36,7 @@ def by_domain_dns_record_id(domain_dns_record_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/domainDnsRecords{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/domainDnsRecords{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get entities from domainDnsRecords @@ -48,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DomainDnsRecordCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -64,8 +63,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DomainDnsRecord.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -75,15 +73,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -95,17 +93,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a domain_dns_records_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DomainDnsRecordsRequestBuilder.new(raw_url, @request_adapter) + end ## # Get entities from domainDnsRecords diff --git a/lib/domain_dns_records/item/domain_dns_record_item_request_builder.rb b/lib/domain_dns_records/item/domain_dns_record_item_request_builder.rb index 71cd05f10d..da08f1cfc2 100644 --- a/lib/domain_dns_records/item/domain_dns_record_item_request_builder.rb +++ b/lib/domain_dns_records/item/domain_dns_record_item_request_builder.rb @@ -19,7 +19,7 @@ class DomainDnsRecordItemRequestBuilder < MicrosoftKiotaAbstractions::BaseReques ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/domainDnsRecords/{domainDnsRecord%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/domainDnsRecords/{domainDnsRecord%2Did}{?%24expand,%24select}") end ## ## Delete entity from domainDnsRecords @@ -31,8 +31,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -45,8 +44,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DomainDnsRecord.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -61,8 +59,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DomainDnsRecord.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -72,13 +69,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -88,15 +86,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -108,17 +106,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a domain_dns_record_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DomainDnsRecordItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Get entity from domainDnsRecords by key diff --git a/lib/domains/count/count_request_builder.rb b/lib/domains/count/count_request_builder.rb index fc4a63abad..b25eb1e821 100644 --- a/lib/domains/count/count_request_builder.rb +++ b/lib/domains/count/count_request_builder.rb @@ -18,7 +18,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/domains/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/domains/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -30,8 +30,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -41,17 +40,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/domains/domains_request_builder.rb b/lib/domains/domains_request_builder.rb index 5f8bb0ebe0..e16212a0b1 100644 --- a/lib/domains/domains_request_builder.rb +++ b/lib/domains/domains_request_builder.rb @@ -36,7 +36,7 @@ def by_domain_id(domain_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/domains{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/domains{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Retrieve a list of domain objects. @@ -48,12 +48,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DomainCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Adds a domain to the tenant. Important: You cannot use an associated domain with your Azure AD tenant until ownership is verified. See List verificationDnsRecords for details. Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. + ## Adds a domain to the tenant. Important: You cannot use an associated domain with your Microsoft Entra tenant until ownership is verified. See List verificationDnsRecords for details. Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of domain @@ -64,8 +63,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Domain.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -75,19 +73,19 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Adds a domain to the tenant. Important: You cannot use an associated domain with your Azure AD tenant until ownership is verified. See List verificationDnsRecords for details. Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. + ## Adds a domain to the tenant. Important: You cannot use an associated domain with your Microsoft Entra tenant until ownership is verified. See List verificationDnsRecords for details. Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -95,17 +93,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a domains_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DomainsRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve a list of domain objects. diff --git a/lib/domains/item/domain_item_request_builder.rb b/lib/domains/item/domain_item_request_builder.rb index bbf18b9c8e..342aaaa940 100644 --- a/lib/domains/item/domain_item_request_builder.rb +++ b/lib/domains/item/domain_item_request_builder.rb @@ -8,6 +8,7 @@ require_relative './force_delete/force_delete_request_builder' require_relative './item' require_relative './promote/promote_request_builder' +require_relative './root_domain/root_domain_request_builder' require_relative './service_configuration_records/service_configuration_records_request_builder' require_relative './verification_dns_records/verification_dns_records_request_builder' require_relative './verify/verify_request_builder' @@ -40,6 +41,11 @@ def promote() return MicrosoftGraph::Domains::Item::Promote::PromoteRequestBuilder.new(@path_parameters, @request_adapter) end ## + # Provides operations to manage the rootDomain property of the microsoft.graph.domain entity. + def root_domain() + return MicrosoftGraph::Domains::Item::RootDomain::RootDomainRequestBuilder.new(@path_parameters, @request_adapter) + end + ## # Provides operations to manage the serviceConfigurationRecords property of the microsoft.graph.domain entity. def service_configuration_records() return MicrosoftGraph::Domains::Item::ServiceConfigurationRecords::ServiceConfigurationRecordsRequestBuilder.new(@path_parameters, @request_adapter) @@ -61,10 +67,10 @@ def verify() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}{?%24expand,%24select}") end ## - ## Deletes a domain from a tenant. + ## Delete a domain from a tenant. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void ## @@ -73,8 +79,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -87,12 +92,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Domain.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Update the properties of domain object. + ## Update the properties of domain object. Only verified domains can be updated. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of domain @@ -103,24 +107,24 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Domain.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Deletes a domain from a tenant. + ## Delete a domain from a tenant. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -130,19 +134,19 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Update the properties of domain object. + ## Update the properties of domain object. Only verified domains can be updated. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -150,17 +154,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a domain_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DomainItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve the properties and relationships of domain object. diff --git a/lib/domains/item/domain_name_references/count/count_request_builder.rb b/lib/domains/item/domain_name_references/count/count_request_builder.rb index 28dd2caec5..eb36174da1 100644 --- a/lib/domains/item/domain_name_references/count/count_request_builder.rb +++ b/lib/domains/item/domain_name_references/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/domainNameReferences/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/domainNameReferences/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/domains/item/domain_name_references/domain_name_references_request_builder.rb b/lib/domains/item/domain_name_references/domain_name_references_request_builder.rb index b7653a0ddb..bf50aa703d 100644 --- a/lib/domains/item/domain_name_references/domain_name_references_request_builder.rb +++ b/lib/domains/item/domain_name_references/domain_name_references_request_builder.rb @@ -39,7 +39,7 @@ def by_directory_object_id(directory_object_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/domainNameReferences{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/domainNameReferences{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Retrieve a list of directoryObject with a reference to the domain. The returned list will contain all directory objects that have a dependency on the domain. @@ -51,8 +51,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObjectCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -62,17 +61,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a domain_name_references_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DomainNameReferencesRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieve a list of directoryObject with a reference to the domain. The returned list will contain all directory objects that have a dependency on the domain. diff --git a/lib/domains/item/domain_name_references/item/directory_object_item_request_builder.rb b/lib/domains/item/domain_name_references/item/directory_object_item_request_builder.rb index a2833c961c..76be14f318 100644 --- a/lib/domains/item/domain_name_references/item/directory_object_item_request_builder.rb +++ b/lib/domains/item/domain_name_references/item/directory_object_item_request_builder.rb @@ -23,10 +23,10 @@ class DirectoryObjectItemRequestBuilder < MicrosoftKiotaAbstractions::BaseReques ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/domainNameReferences/{directoryObject%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/domainNameReferences/{directoryObject%2Did}{?%24expand,%24select}") end ## - ## The objects such as users and groups that reference the domain ID. Read-only, Nullable. Supports $expand and $filter by the OData type of objects returned. For example /domains/{domainId}/domainNameReferences/microsoft.graph.user and /domains/{domainId}/domainNameReferences/microsoft.graph.group. + ## The objects such as users and groups that reference the domain ID. Read-only, Nullable. Doesn't support $expand. Supports $filter by the OData type of objects returned. For example, /domains/{domainId}/domainNameReferences/microsoft.graph.user and /domains/{domainId}/domainNameReferences/microsoft.graph.group. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of directory_object ## @@ -35,31 +35,39 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }, error_mapping) end ## - ## The objects such as users and groups that reference the domain ID. Read-only, Nullable. Supports $expand and $filter by the OData type of objects returned. For example /domains/{domainId}/domainNameReferences/microsoft.graph.user and /domains/{domainId}/domainNameReferences/microsoft.graph.group. + ## The objects such as users and groups that reference the domain ID. Read-only, Nullable. Doesn't support $expand. Supports $filter by the OData type of objects returned. For example, /domains/{domainId}/domainNameReferences/microsoft.graph.user and /domains/{domainId}/domainNameReferences/microsoft.graph.group. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a directory_object_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DirectoryObjectItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # The objects such as users and groups that reference the domain ID. Read-only, Nullable. Supports $expand and $filter by the OData type of objects returned. For example /domains/{domainId}/domainNameReferences/microsoft.graph.user and /domains/{domainId}/domainNameReferences/microsoft.graph.group. + # The objects such as users and groups that reference the domain ID. Read-only, Nullable. Doesn't support $expand. Supports $filter by the OData type of objects returned. For example, /domains/{domainId}/domainNameReferences/microsoft.graph.user and /domains/{domainId}/domainNameReferences/microsoft.graph.group. class DirectoryObjectItemRequestBuilderGetQueryParameters ## diff --git a/lib/domains/item/federation_configuration/count/count_request_builder.rb b/lib/domains/item/federation_configuration/count/count_request_builder.rb index 2b5ad252c8..64582a0a1b 100644 --- a/lib/domains/item/federation_configuration/count/count_request_builder.rb +++ b/lib/domains/item/federation_configuration/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/federationConfiguration/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/federationConfiguration/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/domains/item/federation_configuration/federation_configuration_request_builder.rb b/lib/domains/item/federation_configuration/federation_configuration_request_builder.rb index de91c3ee38..2c88f338de 100644 --- a/lib/domains/item/federation_configuration/federation_configuration_request_builder.rb +++ b/lib/domains/item/federation_configuration/federation_configuration_request_builder.rb @@ -40,10 +40,10 @@ def by_internal_domain_federation_id(internal_domain_federation_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/federationConfiguration{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/federationConfiguration{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Read the properties and relationships of an internalDomainFederation object. + ## Read the properties of the internalDomainFederation objects for the domain. This API returns only one object in the collection. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of internal_domain_federation_collection_response ## @@ -52,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::InternalDomainFederationCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -68,26 +67,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::InternalDomainFederation.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Read the properties and relationships of an internalDomainFederation object. + ## Read the properties of the internalDomainFederation objects for the domain. This API returns only one object in the collection. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -99,20 +97,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a federation_configuration_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return FederationConfigurationRequestBuilder.new(raw_url, @request_adapter) + end ## - # Read the properties and relationships of an internalDomainFederation object. + # Read the properties of the internalDomainFederation objects for the domain. This API returns only one object in the collection. class FederationConfigurationRequestBuilderGetQueryParameters ## diff --git a/lib/domains/item/federation_configuration/item/internal_domain_federation_item_request_builder.rb b/lib/domains/item/federation_configuration/item/internal_domain_federation_item_request_builder.rb index a786000c8f..ea63fde9c6 100644 --- a/lib/domains/item/federation_configuration/item/internal_domain_federation_item_request_builder.rb +++ b/lib/domains/item/federation_configuration/item/internal_domain_federation_item_request_builder.rb @@ -23,7 +23,7 @@ class InternalDomainFederationItemRequestBuilder < MicrosoftKiotaAbstractions::B ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/federationConfiguration/{internalDomainFederation%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/federationConfiguration/{internalDomainFederation%2Did}{?%24expand,%24select}") end ## ## Delete an internalDomainFederation object. @@ -35,8 +35,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::InternalDomainFederation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -65,8 +63,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::InternalDomainFederation.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,13 +73,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -92,15 +90,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,17 +110,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a internal_domain_federation_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return InternalDomainFederationItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Read the properties and relationships of an internalDomainFederation object. diff --git a/lib/domains/item/force_delete/force_delete_post_request_body.rb b/lib/domains/item/force_delete/force_delete_post_request_body.rb index aefa772dfa..67e39dfac7 100644 --- a/lib/domains/item/force_delete/force_delete_post_request_body.rb +++ b/lib/domains/item/force_delete/force_delete_post_request_body.rb @@ -17,22 +17,22 @@ class ForceDeletePostRequestBody # The disableUserAccounts property @disable_user_accounts ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new forceDeletePostRequestBody and sets the default values. + ## Instantiates a new ForceDeletePostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/domains/item/force_delete/force_delete_request_builder.rb b/lib/domains/item/force_delete/force_delete_request_builder.rb index 8cf1a1e3b4..c84994921f 100644 --- a/lib/domains/item/force_delete/force_delete_request_builder.rb +++ b/lib/domains/item/force_delete/force_delete_request_builder.rb @@ -23,7 +23,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/forceDelete") end ## - ## Deletes a domain using an asynchronous long-running operation. Prior to calling forceDelete, you must update or remove any references to Exchange as the provisioning service. The following actions are performed as part of this operation: After the domain deletion completes, API operations for the deleted domain will return a HTTP 404 status code. To verify deletion of a domain, you can perform a get domain operation. + ## Delete a domain using an asynchronous long-running operation. Before performing this operation, you must update or remove any references to Exchange as the provisioning service. The following actions are performed as part of this operation: After the domain deletion completes, API operations for the deleted domain return an HTTP 404 status code. To verify deletion of a domain, you can perform a get domain operation. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void @@ -34,12 +34,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Deletes a domain using an asynchronous long-running operation. Prior to calling forceDelete, you must update or remove any references to Exchange as the provisioning service. The following actions are performed as part of this operation: After the domain deletion completes, API operations for the deleted domain will return a HTTP 404 status code. To verify deletion of a domain, you can perform a get domain operation. + ## Delete a domain using an asynchronous long-running operation. Before performing this operation, you must update or remove any references to Exchange as the provisioning service. The following actions are performed as part of this operation: After the domain deletion completes, API operations for the deleted domain return an HTTP 404 status code. To verify deletion of a domain, you can perform a get domain operation. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -47,16 +46,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a force_delete_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ForceDeleteRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/domains/item/promote/promote.rb b/lib/domains/item/promote/promote.rb index e308b7f5d2..5672eaa500 100644 --- a/lib/domains/item/promote/promote.rb +++ b/lib/domains/item/promote/promote.rb @@ -1 +1 @@ -require_relative 'promote_response' +require_relative 'promote_post_response' diff --git a/lib/domains/item/promote/promote_post_response.rb b/lib/domains/item/promote/promote_post_response.rb new file mode 100644 index 0000000000..d34b800303 --- /dev/null +++ b/lib/domains/item/promote/promote_post_response.rb @@ -0,0 +1,88 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../domains' +require_relative '../item' +require_relative './promote' + +module MicrosoftGraph + module Domains + module Item + module Promote + class PromotePostResponse + include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable + ## + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + @additional_data + ## + # The value property + @value + ## + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @return a i_dictionary + ## + def additional_data + return @additional_data + end + ## + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. + ## @return a void + ## + def additional_data=(value) + @additional_data = value + end + ## + ## Instantiates a new PromotePostResponse and sets the default values. + ## @return a void + ## + def initialize() + @additional_data = Hash.new + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a promote_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return PromotePostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return { + "value" => lambda {|n| @value = n.get_boolean_value() }, + } + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_boolean_value("value", @value) + writer.write_additional_data(@additional_data) + end + ## + ## Gets the value property value. The value property + ## @return a boolean + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end +end diff --git a/lib/domains/item/promote/promote_request_builder.rb b/lib/domains/item/promote/promote_request_builder.rb index 031f7d2d88..a69dd860ae 100644 --- a/lib/domains/item/promote/promote_request_builder.rb +++ b/lib/domains/item/promote/promote_request_builder.rb @@ -25,16 +25,15 @@ def initialize(path_parameters, request_adapter) ## ## Promote a verified subdomain to the root domain. A verified domain has its isVerified property set to true. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of promote_response + ## @return a Fiber of promote_post_response ## def post(request_configuration=nil) request_info = self.to_post_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Domains::Item::Promote::PromoteResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Domains::Item::Promote::PromotePostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Promote a verified subdomain to the root domain. A verified domain has its isVerified property set to true. @@ -43,16 +42,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a promote_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return PromoteRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/domains/item/promote/promote_response.rb b/lib/domains/item/promote/promote_response.rb deleted file mode 100644 index c1f9c13a97..0000000000 --- a/lib/domains/item/promote/promote_response.rb +++ /dev/null @@ -1,88 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../microsoft_graph' -require_relative '../../domains' -require_relative '../item' -require_relative './promote' - -module MicrosoftGraph - module Domains - module Item - module Promote - class PromoteResponse - include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable - ## - # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - @additional_data - ## - # The value property - @value - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @return a i_dictionary - ## - def additional_data - return @additional_data - end - ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. - ## @return a void - ## - def additional_data=(value) - @additional_data = value - end - ## - ## Instantiates a new promoteResponse and sets the default values. - ## @return a void - ## - def initialize() - @additional_data = Hash.new - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a promote_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return PromoteResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return { - "value" => lambda {|n| @value = n.get_boolean_value() }, - } - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_boolean_value("value", @value) - writer.write_additional_data(@additional_data) - end - ## - ## Gets the value property value. The value property - ## @return a boolean - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end -end diff --git a/lib/me/chats/item/messages/item/replies/item/soft_delete/soft_delete.rb b/lib/domains/item/root_domain/root_domain.rb similarity index 100% rename from lib/me/chats/item/messages/item/replies/item/soft_delete/soft_delete.rb rename to lib/domains/item/root_domain/root_domain.rb diff --git a/lib/domains/item/root_domain/root_domain_request_builder.rb b/lib/domains/item/root_domain/root_domain_request_builder.rb new file mode 100644 index 0000000000..810df2b29c --- /dev/null +++ b/lib/domains/item/root_domain/root_domain_request_builder.rb @@ -0,0 +1,98 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../microsoft_graph' +require_relative '../../../models/domain' +require_relative '../../../models/o_data_errors_o_data_error' +require_relative '../../domains' +require_relative '../item' +require_relative './root_domain' + +module MicrosoftGraph + module Domains + module Item + module RootDomain + ## + # Provides operations to manage the rootDomain property of the microsoft.graph.domain entity. + class RootDomainRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new RootDomainRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/rootDomain{?%24expand,%24select}") + end + ## + ## Get the root domain of a subdomain. This API returns a single object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of domain + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Domain.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Get the root domain of a subdomain. This API returns a single object. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a root_domain_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RootDomainRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the root domain of a subdomain. This API returns a single object. + class RootDomainRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end +end diff --git a/lib/domains/item/service_configuration_records/count/count_request_builder.rb b/lib/domains/item/service_configuration_records/count/count_request_builder.rb index 6b246aacd9..e180987698 100644 --- a/lib/domains/item/service_configuration_records/count/count_request_builder.rb +++ b/lib/domains/item/service_configuration_records/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/serviceConfigurationRecords/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/serviceConfigurationRecords/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/domains/item/service_configuration_records/item/domain_dns_record_item_request_builder.rb b/lib/domains/item/service_configuration_records/item/domain_dns_record_item_request_builder.rb index 36b6f98052..0e37e9c717 100644 --- a/lib/domains/item/service_configuration_records/item/domain_dns_record_item_request_builder.rb +++ b/lib/domains/item/service_configuration_records/item/domain_dns_record_item_request_builder.rb @@ -23,7 +23,7 @@ class DomainDnsRecordItemRequestBuilder < MicrosoftKiotaAbstractions::BaseReques ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/serviceConfigurationRecords/{domainDnsRecord%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/serviceConfigurationRecords/{domainDnsRecord%2Did}{?%24expand,%24select}") end ## ## Delete navigation property serviceConfigurationRecords for domains @@ -35,12 +35,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## DNS records the customer adds to the DNS zone file of the domain before the domain can be used by Microsoft Online services. Read-only, Nullable. Supports $expand. + ## DNS records the customer adds to the DNS zone file of the domain before the domain can be used by Microsoft Online services. Read-only, Nullable. Doesn't support $expand. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of domain_dns_record ## @@ -49,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DomainDnsRecord.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -65,8 +63,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DomainDnsRecord.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,31 +73,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## DNS records the customer adds to the DNS zone file of the domain before the domain can be used by Microsoft Online services. Read-only, Nullable. Supports $expand. + ## DNS records the customer adds to the DNS zone file of the domain before the domain can be used by Microsoft Online services. Read-only, Nullable. Doesn't support $expand. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,20 +110,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a domain_dns_record_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DomainDnsRecordItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # DNS records the customer adds to the DNS zone file of the domain before the domain can be used by Microsoft Online services. Read-only, Nullable. Supports $expand. + # DNS records the customer adds to the DNS zone file of the domain before the domain can be used by Microsoft Online services. Read-only, Nullable. Doesn't support $expand. class DomainDnsRecordItemRequestBuilderGetQueryParameters ## diff --git a/lib/domains/item/service_configuration_records/service_configuration_records_request_builder.rb b/lib/domains/item/service_configuration_records/service_configuration_records_request_builder.rb index 74e723c377..3d355ec6c6 100644 --- a/lib/domains/item/service_configuration_records/service_configuration_records_request_builder.rb +++ b/lib/domains/item/service_configuration_records/service_configuration_records_request_builder.rb @@ -40,7 +40,7 @@ def by_domain_dns_record_id(domain_dns_record_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/serviceConfigurationRecords{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/serviceConfigurationRecords{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Retrieves a list of domainDnsRecord objects needed to enable services for the domain. Use the returned list to add records to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. @@ -52,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DomainDnsRecordCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -68,8 +67,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DomainDnsRecord.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -79,15 +77,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -99,17 +97,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a service_configuration_records_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ServiceConfigurationRecordsRequestBuilder.new(raw_url, @request_adapter) + end ## # Retrieves a list of domainDnsRecord objects needed to enable services for the domain. Use the returned list to add records to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. diff --git a/lib/domains/item/verification_dns_records/count/count_request_builder.rb b/lib/domains/item/verification_dns_records/count/count_request_builder.rb index 1739f96dd4..84d5321217 100644 --- a/lib/domains/item/verification_dns_records/count/count_request_builder.rb +++ b/lib/domains/item/verification_dns_records/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/verificationDnsRecords/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/verificationDnsRecords/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/domains/item/verification_dns_records/item/domain_dns_record_item_request_builder.rb b/lib/domains/item/verification_dns_records/item/domain_dns_record_item_request_builder.rb index 59790f8df7..5bfa67e457 100644 --- a/lib/domains/item/verification_dns_records/item/domain_dns_record_item_request_builder.rb +++ b/lib/domains/item/verification_dns_records/item/domain_dns_record_item_request_builder.rb @@ -23,7 +23,7 @@ class DomainDnsRecordItemRequestBuilder < MicrosoftKiotaAbstractions::BaseReques ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/verificationDnsRecords/{domainDnsRecord%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/verificationDnsRecords/{domainDnsRecord%2Did}{?%24expand,%24select}") end ## ## Delete navigation property verificationDnsRecords for domains @@ -35,12 +35,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## DNS records that the customer adds to the DNS zone file of the domain before the customer can complete domain ownership verification with Azure AD. Read-only, Nullable. Supports $expand. + ## DNS records that the customer adds to the DNS zone file of the domain before the customer can complete domain ownership verification with Microsoft Entra ID. Read-only, Nullable. Doesn't support $expand. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of domain_dns_record ## @@ -49,8 +48,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DomainDnsRecord.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -65,8 +63,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DomainDnsRecord.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -76,31 +73,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## DNS records that the customer adds to the DNS zone file of the domain before the customer can complete domain ownership verification with Azure AD. Read-only, Nullable. Supports $expand. + ## DNS records that the customer adds to the DNS zone file of the domain before the customer can complete domain ownership verification with Microsoft Entra ID. Read-only, Nullable. Doesn't support $expand. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,20 +110,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a domain_dns_record_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DomainDnsRecordItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # DNS records that the customer adds to the DNS zone file of the domain before the customer can complete domain ownership verification with Azure AD. Read-only, Nullable. Supports $expand. + # DNS records that the customer adds to the DNS zone file of the domain before the customer can complete domain ownership verification with Microsoft Entra ID. Read-only, Nullable. Doesn't support $expand. class DomainDnsRecordItemRequestBuilderGetQueryParameters ## diff --git a/lib/domains/item/verification_dns_records/verification_dns_records_request_builder.rb b/lib/domains/item/verification_dns_records/verification_dns_records_request_builder.rb index 0498417b40..200762f6aa 100644 --- a/lib/domains/item/verification_dns_records/verification_dns_records_request_builder.rb +++ b/lib/domains/item/verification_dns_records/verification_dns_records_request_builder.rb @@ -40,10 +40,10 @@ def by_domain_dns_record_id(domain_dns_record_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/verificationDnsRecords{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/verificationDnsRecords{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Retrieve a list of domainDnsRecord objects. You cannot use an associated domain with your Azure AD tenant until ownership is verified. To verify the ownership of the domain, retrieve the domain verification records and add the details to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. + ## Retrieve a list of domainDnsRecord objects. You cannot use an associated domain with your Microsoft Entra tenant until ownership is verified. To verify the ownership of the domain, retrieve the domain verification records and add the details to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of domain_dns_record_collection_response ## @@ -52,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DomainDnsRecordCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -68,26 +67,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DomainDnsRecord.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Retrieve a list of domainDnsRecord objects. You cannot use an associated domain with your Azure AD tenant until ownership is verified. To verify the ownership of the domain, retrieve the domain verification records and add the details to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. + ## Retrieve a list of domainDnsRecord objects. You cannot use an associated domain with your Microsoft Entra tenant until ownership is verified. To verify the ownership of the domain, retrieve the domain verification records and add the details to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -99,20 +97,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a verification_dns_records_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return VerificationDnsRecordsRequestBuilder.new(raw_url, @request_adapter) + end ## - # Retrieve a list of domainDnsRecord objects. You cannot use an associated domain with your Azure AD tenant until ownership is verified. To verify the ownership of the domain, retrieve the domain verification records and add the details to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. + # Retrieve a list of domainDnsRecord objects. You cannot use an associated domain with your Microsoft Entra tenant until ownership is verified. To verify the ownership of the domain, retrieve the domain verification records and add the details to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. class VerificationDnsRecordsRequestBuilderGetQueryParameters ## diff --git a/lib/domains/item/verify/verify_request_builder.rb b/lib/domains/item/verify/verify_request_builder.rb index 137e1784a3..f4bc2d37b3 100644 --- a/lib/domains/item/verify/verify_request_builder.rb +++ b/lib/domains/item/verify/verify_request_builder.rb @@ -24,7 +24,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/domains/{domain%2Did}/verify") end ## - ## Validates the ownership of the domain. + ## Validate the ownership of a domain. This operation only applies to an unverified domain. For an unverified domain, the isVerified property is false. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of domain ## @@ -33,27 +33,35 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Domain.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Validates the ownership of the domain. + ## Validate the ownership of a domain. This operation only applies to an unverified domain. For an unverified domain, the isVerified property is false. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a verify_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return VerifyRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/drives_request_builder.rb b/lib/drives/drives_request_builder.rb index 9efdacb3c7..2003ccfc09 100644 --- a/lib/drives/drives_request_builder.rb +++ b/lib/drives/drives_request_builder.rb @@ -30,7 +30,7 @@ def by_drive_id(drive_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives{?%24top,%24skip,%24search,%24filter,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives{?%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get entities from drives @@ -42,8 +42,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DriveCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -58,8 +57,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Drive.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -69,15 +67,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -89,17 +87,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a drives_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DrivesRequestBuilder.new(raw_url, @request_adapter) + end ## # Get entities from drives diff --git a/lib/drives/item/bundles/bundles_request_builder.rb b/lib/drives/item/bundles/bundles_request_builder.rb index 95c585cd64..f8ccc18bb4 100644 --- a/lib/drives/item/bundles/bundles_request_builder.rb +++ b/lib/drives/item/bundles/bundles_request_builder.rb @@ -40,10 +40,10 @@ def by_drive_item_id(drive_item_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/bundles{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/bundles{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Collection of [bundles][bundle] (albums and multi-select-shared sets of items). Only in personal OneDrive. + ## Collection of bundles (albums and multi-select-shared sets of items). Only in personal OneDrive. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of drive_item_collection_response ## @@ -52,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DriveItemCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -68,26 +67,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Collection of [bundles][bundle] (albums and multi-select-shared sets of items). Only in personal OneDrive. + ## Collection of bundles (albums and multi-select-shared sets of items). Only in personal OneDrive. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -99,20 +97,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a bundles_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BundlesRequestBuilder.new(raw_url, @request_adapter) + end ## - # Collection of [bundles][bundle] (albums and multi-select-shared sets of items). Only in personal OneDrive. + # Collection of bundles (albums and multi-select-shared sets of items). Only in personal OneDrive. class BundlesRequestBuilderGetQueryParameters ## diff --git a/lib/drives/item/bundles/count/count_request_builder.rb b/lib/drives/item/bundles/count/count_request_builder.rb index b4ee553945..4158adc4de 100644 --- a/lib/drives/item/bundles/count/count_request_builder.rb +++ b/lib/drives/item/bundles/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/bundles/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/bundles/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/drives/item/bundles/item/content/content_request_builder.rb b/lib/drives/item/bundles/item/content/content_request_builder.rb index 3f1e2f4ce0..9803282ea2 100644 --- a/lib/drives/item/bundles/item/content/content_request_builder.rb +++ b/lib/drives/item/bundles/item/content/content_request_builder.rb @@ -25,7 +25,20 @@ class ContentRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/bundles/{driveItem%2Did}/content") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/bundles/{driveItem%2Did}/content{?%24format*}") + end + ## + ## The content stream, if the item represents a file. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) end ## ## The content stream, if the item represents a file. @@ -37,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -53,8 +65,7 @@ def put(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -62,15 +73,34 @@ def put(body, request_configuration=nil) ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## - def to_get_request_information(request_configuration=nil) + def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end request_info.url_template = @url_template request_info.path_parameters = @path_parameters - request_info.http_method = :GET + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The content stream, if the item represents a file. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end ## @@ -82,17 +112,49 @@ def to_get_request_information(request_configuration=nil) def to_put_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PUT - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "", body) + request_info.set_content_from_parsable(@request_adapter, 'application/octet-stream', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PUT + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a content_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContentRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The content stream, if the item represents a file. + class ContentRequestBuilderGetQueryParameters + + ## + # Format of the content + attr_accessor :format + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "format" + return "%24format" + else + return original_name + end + end + end end end end diff --git a/lib/drives/item/bundles/item/drive_item_item_request_builder.rb b/lib/drives/item/bundles/item/drive_item_item_request_builder.rb index 2b269855fe..81cf79e2d4 100644 --- a/lib/drives/item/bundles/item/drive_item_item_request_builder.rb +++ b/lib/drives/item/bundles/item/drive_item_item_request_builder.rb @@ -29,10 +29,10 @@ def content() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/bundles/{driveItem%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/bundles/{driveItem%2Did}{?%24expand,%24select}") end ## - ## Collection of [bundles][bundle] (albums and multi-select-shared sets of items). Only in personal OneDrive. + ## Collection of bundles (albums and multi-select-shared sets of items). Only in personal OneDrive. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of drive_item ## @@ -41,31 +41,39 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Collection of [bundles][bundle] (albums and multi-select-shared sets of items). Only in personal OneDrive. + ## Collection of bundles (albums and multi-select-shared sets of items). Only in personal OneDrive. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a drive_item_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DriveItemItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Collection of [bundles][bundle] (albums and multi-select-shared sets of items). Only in personal OneDrive. + # Collection of bundles (albums and multi-select-shared sets of items). Only in personal OneDrive. class DriveItemItemRequestBuilderGetQueryParameters ## diff --git a/lib/drives/item/created_by_user/created_by_user_request_builder.rb b/lib/drives/item/created_by_user/created_by_user_request_builder.rb index 1f09bf9b52..6c8970e2a7 100644 --- a/lib/drives/item/created_by_user/created_by_user_request_builder.rb +++ b/lib/drives/item/created_by_user/created_by_user_request_builder.rb @@ -6,6 +6,7 @@ require_relative '../item' require_relative './created_by_user' require_relative './mailbox_settings/mailbox_settings_request_builder' +require_relative './service_provisioning_errors/service_provisioning_errors_request_builder' module MicrosoftGraph module Drives @@ -21,13 +22,18 @@ def mailbox_settings() return MicrosoftGraph::Drives::Item::CreatedByUser::MailboxSettings::MailboxSettingsRequestBuilder.new(@path_parameters, @request_adapter) end ## + # The serviceProvisioningErrors property + def service_provisioning_errors() + return MicrosoftGraph::Drives::Item::CreatedByUser::ServiceProvisioningErrors::ServiceProvisioningErrorsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## ## Instantiates a new CreatedByUserRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request ## @param request_adapter The request adapter to use to execute the requests. ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/createdByUser{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/createdByUser{?%24expand,%24select}") end ## ## Identity of the user who created the item. Read-only. @@ -39,8 +45,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::User.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -50,17 +55,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a created_by_user_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CreatedByUserRequestBuilder.new(raw_url, @request_adapter) + end ## # Identity of the user who created the item. Read-only. diff --git a/lib/drives/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.rb b/lib/drives/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.rb index ffbd0072c5..778bffccb4 100644 --- a/lib/drives/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.rb +++ b/lib/drives/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.rb @@ -23,10 +23,10 @@ class MailboxSettingsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBui ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/createdByUser/mailboxSettings{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/createdByUser/mailboxSettings{?%24expand,%24select}") end ## - ## Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + ## Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of mailbox_settings ## @@ -35,8 +35,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MailboxSettings.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -51,26 +50,25 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MailboxSettings.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + ## Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -82,20 +80,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mailbox_settings_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MailboxSettingsRequestBuilder.new(raw_url, @request_adapter) + end ## - # Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + # Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. class MailboxSettingsRequestBuilderGetQueryParameters ## diff --git a/lib/me/drives/count/count.rb b/lib/drives/item/created_by_user/service_provisioning_errors/count/count.rb similarity index 100% rename from lib/me/drives/count/count.rb rename to lib/drives/item/created_by_user/service_provisioning_errors/count/count.rb diff --git a/lib/drives/item/created_by_user/service_provisioning_errors/count/count_request_builder.rb b/lib/drives/item/created_by_user/service_provisioning_errors/count/count_request_builder.rb new file mode 100644 index 0000000000..0018fbda7b --- /dev/null +++ b/lib/drives/item/created_by_user/service_provisioning_errors/count/count_request_builder.rb @@ -0,0 +1,103 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../drives' +require_relative '../../../item' +require_relative '../../created_by_user' +require_relative '../service_provisioning_errors' +require_relative './count' + +module MicrosoftGraph + module Drives + module Item + module CreatedByUser + module ServiceProvisioningErrors + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete.rb b/lib/drives/item/created_by_user/service_provisioning_errors/service_provisioning_errors.rb similarity index 100% rename from lib/me/chats/item/messages/item/replies/item/undo_soft_delete/undo_soft_delete.rb rename to lib/drives/item/created_by_user/service_provisioning_errors/service_provisioning_errors.rb diff --git a/lib/drives/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.rb b/lib/drives/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.rb new file mode 100644 index 0000000000..62a3833908 --- /dev/null +++ b/lib/drives/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.rb @@ -0,0 +1,137 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../microsoft_graph' +require_relative '../../../../models/o_data_errors_o_data_error' +require_relative '../../../../models/service_provisioning_error_collection_response' +require_relative '../../../drives' +require_relative '../../item' +require_relative '../created_by_user' +require_relative './count/count_request_builder' +require_relative './service_provisioning_errors' + +module MicrosoftGraph + module Drives + module Item + module CreatedByUser + module ServiceProvisioningErrors + ## + # Builds and executes requests for operations under \drives\{drive-id}\createdByUser\serviceProvisioningErrors + class ServiceProvisioningErrorsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::Drives::Item::CreatedByUser::ServiceProvisioningErrors::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/createdByUser/serviceProvisioningErrors{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of service_provisioning_error_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceProvisioningErrorCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a service_provisioning_errors_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ServiceProvisioningErrorsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end +end diff --git a/lib/drives/item/drive_item_request_builder.rb b/lib/drives/item/drive_item_request_builder.rb index bb14f1c457..c80b4c8e7d 100644 --- a/lib/drives/item/drive_item_request_builder.rb +++ b/lib/drives/item/drive_item_request_builder.rb @@ -80,7 +80,7 @@ def special() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}{?%24expand,%24select}") end ## ## Delete entity from drives @@ -92,8 +92,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -106,8 +105,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Drive.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -122,8 +120,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Drive.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -142,13 +139,14 @@ def search_with_q(q) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -158,15 +156,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -178,17 +176,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a drive_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DriveItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Get entity from drives by key diff --git a/lib/drives/item/following/count/count_request_builder.rb b/lib/drives/item/following/count/count_request_builder.rb index bfbed0c189..20d3a7f036 100644 --- a/lib/drives/item/following/count/count_request_builder.rb +++ b/lib/drives/item/following/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/following/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/following/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/drives/item/following/following_request_builder.rb b/lib/drives/item/following/following_request_builder.rb index c1e999f2c0..dfc7daf0ec 100644 --- a/lib/drives/item/following/following_request_builder.rb +++ b/lib/drives/item/following/following_request_builder.rb @@ -39,10 +39,10 @@ def by_drive_item_id(drive_item_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/following{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/following{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## List the items that have been followed by the signed in user.This collection includes items that are in the user's drive as well as items they have access to from other drives. + ## The list of items the user is following. Only in OneDrive for Business. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of drive_item_collection_response ## @@ -51,31 +51,39 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DriveItemCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## List the items that have been followed by the signed in user.This collection includes items that are in the user's drive as well as items they have access to from other drives. + ## The list of items the user is following. Only in OneDrive for Business. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a following_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return FollowingRequestBuilder.new(raw_url, @request_adapter) + end ## - # List the items that have been followed by the signed in user.This collection includes items that are in the user's drive as well as items they have access to from other drives. + # The list of items the user is following. Only in OneDrive for Business. class FollowingRequestBuilderGetQueryParameters ## diff --git a/lib/drives/item/following/item/content/content_request_builder.rb b/lib/drives/item/following/item/content/content_request_builder.rb index 8ae560d817..06d7e80088 100644 --- a/lib/drives/item/following/item/content/content_request_builder.rb +++ b/lib/drives/item/following/item/content/content_request_builder.rb @@ -25,7 +25,20 @@ class ContentRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/following/{driveItem%2Did}/content") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/following/{driveItem%2Did}/content{?%24format*}") + end + ## + ## The content stream, if the item represents a file. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) end ## ## The content stream, if the item represents a file. @@ -37,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -53,8 +65,7 @@ def put(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -62,15 +73,34 @@ def put(body, request_configuration=nil) ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## - def to_get_request_information(request_configuration=nil) + def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end request_info.url_template = @url_template request_info.path_parameters = @path_parameters - request_info.http_method = :GET + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The content stream, if the item represents a file. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end ## @@ -82,17 +112,49 @@ def to_get_request_information(request_configuration=nil) def to_put_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PUT - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "", body) + request_info.set_content_from_parsable(@request_adapter, 'application/octet-stream', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PUT + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a content_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContentRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The content stream, if the item represents a file. + class ContentRequestBuilderGetQueryParameters + + ## + # Format of the content + attr_accessor :format + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "format" + return "%24format" + else + return original_name + end + end + end end end end diff --git a/lib/drives/item/following/item/drive_item_item_request_builder.rb b/lib/drives/item/following/item/drive_item_item_request_builder.rb index 00d933a6e6..9f3c354fa2 100644 --- a/lib/drives/item/following/item/drive_item_item_request_builder.rb +++ b/lib/drives/item/following/item/drive_item_item_request_builder.rb @@ -29,7 +29,7 @@ def content() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/following/{driveItem%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/following/{driveItem%2Did}{?%24expand,%24select}") end ## ## The list of items the user is following. Only in OneDrive for Business. @@ -41,8 +41,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a drive_item_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DriveItemItemRequestBuilder.new(raw_url, @request_adapter) + end ## # The list of items the user is following. Only in OneDrive for Business. diff --git a/lib/drives/item/items/count/count_request_builder.rb b/lib/drives/item/items/count/count_request_builder.rb index 80f7bd89cd..e4af4c9cb1 100644 --- a/lib/drives/item/items/count/count_request_builder.rb +++ b/lib/drives/item/items/count/count_request_builder.rb @@ -22,7 +22,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -34,8 +34,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -45,17 +44,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/drives/item/items/item/analytics/all_time/all_time_request_builder.rb b/lib/drives/item/items/item/analytics/all_time/all_time_request_builder.rb index fab148f265..714359c944 100644 --- a/lib/drives/item/items/item/analytics/all_time/all_time_request_builder.rb +++ b/lib/drives/item/items/item/analytics/all_time/all_time_request_builder.rb @@ -27,10 +27,10 @@ class AllTimeRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/analytics/allTime{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/analytics/allTime{?%24expand,%24select}") end ## - ## Get [itemAnalytics][] about the views that took place under this resource.The itemAnalytics resource is a convenient way to get activity stats for allTime and the lastSevenDays.For a custom time range or interval, use the [getActivitiesByInterval][] API. + ## Get itemAnalytics about the views that took place under this resource.The itemAnalytics resource is a convenient way to get activity stats for allTime and the lastSevenDays.For a custom time range or interval, use the getActivitiesByInterval API. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of item_activity_stat ## @@ -39,31 +39,39 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ItemActivityStat.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Get [itemAnalytics][] about the views that took place under this resource.The itemAnalytics resource is a convenient way to get activity stats for allTime and the lastSevenDays.For a custom time range or interval, use the [getActivitiesByInterval][] API. + ## Get itemAnalytics about the views that took place under this resource.The itemAnalytics resource is a convenient way to get activity stats for allTime and the lastSevenDays.For a custom time range or interval, use the getActivitiesByInterval API. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a all_time_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AllTimeRequestBuilder.new(raw_url, @request_adapter) + end ## - # Get [itemAnalytics][] about the views that took place under this resource.The itemAnalytics resource is a convenient way to get activity stats for allTime and the lastSevenDays.For a custom time range or interval, use the [getActivitiesByInterval][] API. + # Get itemAnalytics about the views that took place under this resource.The itemAnalytics resource is a convenient way to get activity stats for allTime and the lastSevenDays.For a custom time range or interval, use the getActivitiesByInterval API. class AllTimeRequestBuilderGetQueryParameters ## diff --git a/lib/drives/item/items/item/analytics/analytics_request_builder.rb b/lib/drives/item/items/item/analytics/analytics_request_builder.rb index dce45e2803..6171d31255 100644 --- a/lib/drives/item/items/item/analytics/analytics_request_builder.rb +++ b/lib/drives/item/items/item/analytics/analytics_request_builder.rb @@ -43,7 +43,7 @@ def last_seven_days() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/analytics{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/analytics{?%24expand,%24select}") end ## ## Delete navigation property analytics for drives @@ -55,8 +55,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -69,8 +68,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ItemAnalytics.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -85,8 +83,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ItemAnalytics.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -96,13 +93,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -112,15 +110,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -132,17 +130,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a analytics_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AnalyticsRequestBuilder.new(raw_url, @request_adapter) + end ## # Analytics about the view activities that took place on this item. diff --git a/lib/drives/item/items/item/analytics/item_activity_stats/count/count_request_builder.rb b/lib/drives/item/items/item/analytics/item_activity_stats/count/count_request_builder.rb index a061533cdf..a40e5cbb66 100644 --- a/lib/drives/item/items/item/analytics/item_activity_stats/count/count_request_builder.rb +++ b/lib/drives/item/items/item/analytics/item_activity_stats/count/count_request_builder.rb @@ -28,7 +28,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/analytics/itemActivityStats/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/analytics/itemActivityStats/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -40,8 +40,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -51,17 +50,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/drives/item/items/item/analytics/item_activity_stats/item/activities/activities_request_builder.rb b/lib/drives/item/items/item/analytics/item_activity_stats/item/activities/activities_request_builder.rb index a07a07e08f..4892eec634 100644 --- a/lib/drives/item/items/item/analytics/item_activity_stats/item/activities/activities_request_builder.rb +++ b/lib/drives/item/items/item/analytics/item_activity_stats/item/activities/activities_request_builder.rb @@ -50,7 +50,7 @@ def by_item_activity_id(item_activity_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/analytics/itemActivityStats/{itemActivityStat%2Did}/activities{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/analytics/itemActivityStats/{itemActivityStat%2Did}/activities{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Exposes the itemActivities represented in this itemActivityStat resource. @@ -62,8 +62,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ItemActivityCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,8 +77,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ItemActivity.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -89,15 +87,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -109,17 +107,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a activities_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ActivitiesRequestBuilder.new(raw_url, @request_adapter) + end ## # Exposes the itemActivities represented in this itemActivityStat resource. diff --git a/lib/drives/item/items/item/analytics/item_activity_stats/item/activities/count/count_request_builder.rb b/lib/drives/item/items/item/analytics/item_activity_stats/item/activities/count/count_request_builder.rb index a15689fe7b..fb09b6097e 100644 --- a/lib/drives/item/items/item/analytics/item_activity_stats/item/activities/count/count_request_builder.rb +++ b/lib/drives/item/items/item/analytics/item_activity_stats/item/activities/count/count_request_builder.rb @@ -32,7 +32,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/analytics/itemActivityStats/{itemActivityStat%2Did}/activities/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/analytics/itemActivityStats/{itemActivityStat%2Did}/activities/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -44,8 +44,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -55,17 +54,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/drives/item/items/item/analytics/item_activity_stats/item/activities/item/drive_item/content/content_request_builder.rb b/lib/drives/item/items/item/analytics/item_activity_stats/item/activities/item/drive_item/content/content_request_builder.rb index b2c6b70121..823a370af3 100644 --- a/lib/drives/item/items/item/analytics/item_activity_stats/item/activities/item/drive_item/content/content_request_builder.rb +++ b/lib/drives/item/items/item/analytics/item_activity_stats/item/activities/item/drive_item/content/content_request_builder.rb @@ -37,7 +37,20 @@ class ContentRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/analytics/itemActivityStats/{itemActivityStat%2Did}/activities/{itemActivity%2Did}/driveItem/content") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/analytics/itemActivityStats/{itemActivityStat%2Did}/activities/{itemActivity%2Did}/driveItem/content{?%24format*}") + end + ## + ## The content stream, if the item represents a file. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) end ## ## The content stream, if the item represents a file. @@ -49,8 +62,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -65,8 +77,7 @@ def put(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,15 +85,34 @@ def put(body, request_configuration=nil) ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## - def to_get_request_information(request_configuration=nil) + def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end request_info.url_template = @url_template request_info.path_parameters = @path_parameters - request_info.http_method = :GET + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The content stream, if the item represents a file. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end ## @@ -94,17 +124,49 @@ def to_get_request_information(request_configuration=nil) def to_put_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PUT - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "", body) + request_info.set_content_from_parsable(@request_adapter, 'application/octet-stream', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PUT + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a content_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContentRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The content stream, if the item represents a file. + class ContentRequestBuilderGetQueryParameters + + ## + # Format of the content + attr_accessor :format + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "format" + return "%24format" + else + return original_name + end + end + end end end end diff --git a/lib/drives/item/items/item/analytics/item_activity_stats/item/activities/item/drive_item/drive_item_request_builder.rb b/lib/drives/item/items/item/analytics/item_activity_stats/item/activities/item/drive_item/drive_item_request_builder.rb index 9d2b19df14..3145731dd7 100644 --- a/lib/drives/item/items/item/analytics/item_activity_stats/item/activities/item/drive_item/drive_item_request_builder.rb +++ b/lib/drives/item/items/item/analytics/item_activity_stats/item/activities/item/drive_item/drive_item_request_builder.rb @@ -41,7 +41,7 @@ def content() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/analytics/itemActivityStats/{itemActivityStat%2Did}/activities/{itemActivity%2Did}/driveItem{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/analytics/itemActivityStats/{itemActivityStat%2Did}/activities/{itemActivity%2Did}/driveItem{?%24expand,%24select}") end ## ## Exposes the driveItem that was the target of this activity. @@ -53,8 +53,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -64,17 +63,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a drive_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DriveItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Exposes the driveItem that was the target of this activity. diff --git a/lib/drives/item/items/item/analytics/item_activity_stats/item/activities/item/item_activity_item_request_builder.rb b/lib/drives/item/items/item/analytics/item_activity_stats/item/activities/item/item_activity_item_request_builder.rb index 141295ecd5..e1ebf51310 100644 --- a/lib/drives/item/items/item/analytics/item_activity_stats/item/activities/item/item_activity_item_request_builder.rb +++ b/lib/drives/item/items/item/analytics/item_activity_stats/item/activities/item/item_activity_item_request_builder.rb @@ -39,7 +39,7 @@ def drive_item() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/analytics/itemActivityStats/{itemActivityStat%2Did}/activities/{itemActivity%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/analytics/itemActivityStats/{itemActivityStat%2Did}/activities/{itemActivity%2Did}{?%24expand,%24select}") end ## ## Delete navigation property activities for drives @@ -51,8 +51,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -65,8 +64,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ItemActivity.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,8 +79,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ItemActivity.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -92,13 +89,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -108,15 +106,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -128,17 +126,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a item_activity_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ItemActivityItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Exposes the itemActivities represented in this itemActivityStat resource. diff --git a/lib/drives/item/items/item/analytics/item_activity_stats/item/item_activity_stat_item_request_builder.rb b/lib/drives/item/items/item/analytics/item_activity_stats/item/item_activity_stat_item_request_builder.rb index 380893d821..1538c9d830 100644 --- a/lib/drives/item/items/item/analytics/item_activity_stats/item/item_activity_stat_item_request_builder.rb +++ b/lib/drives/item/items/item/analytics/item_activity_stats/item/item_activity_stat_item_request_builder.rb @@ -35,7 +35,7 @@ def activities() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/analytics/itemActivityStats/{itemActivityStat%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/analytics/itemActivityStats/{itemActivityStat%2Did}{?%24expand,%24select}") end ## ## Delete navigation property itemActivityStats for drives @@ -47,8 +47,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -61,8 +60,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ItemActivityStat.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,8 +75,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ItemActivityStat.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -88,13 +85,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -104,15 +102,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -124,17 +122,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a item_activity_stat_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ItemActivityStatItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Get itemActivityStats from drives diff --git a/lib/drives/item/items/item/analytics/item_activity_stats/item_activity_stats_request_builder.rb b/lib/drives/item/items/item/analytics/item_activity_stats/item_activity_stats_request_builder.rb index 4f6ffa86a2..765b67c1a4 100644 --- a/lib/drives/item/items/item/analytics/item_activity_stats/item_activity_stats_request_builder.rb +++ b/lib/drives/item/items/item/analytics/item_activity_stats/item_activity_stats_request_builder.rb @@ -46,7 +46,7 @@ def by_item_activity_stat_id(item_activity_stat_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/analytics/itemActivityStats{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/analytics/itemActivityStats{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Get itemActivityStats from drives @@ -58,8 +58,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ItemActivityStatCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,8 +73,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ItemActivityStat.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -85,15 +83,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -105,17 +103,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a item_activity_stats_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ItemActivityStatsRequestBuilder.new(raw_url, @request_adapter) + end ## # Get itemActivityStats from drives diff --git a/lib/drives/item/items/item/analytics/last_seven_days/last_seven_days_request_builder.rb b/lib/drives/item/items/item/analytics/last_seven_days/last_seven_days_request_builder.rb index c47a0abd0c..bb03dd0b2a 100644 --- a/lib/drives/item/items/item/analytics/last_seven_days/last_seven_days_request_builder.rb +++ b/lib/drives/item/items/item/analytics/last_seven_days/last_seven_days_request_builder.rb @@ -27,7 +27,7 @@ class LastSevenDaysRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuild ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/analytics/lastSevenDays{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/analytics/lastSevenDays{?%24expand,%24select}") end ## ## Get lastSevenDays from drives @@ -39,8 +39,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ItemActivityStat.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -50,17 +49,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a last_seven_days_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return LastSevenDaysRequestBuilder.new(raw_url, @request_adapter) + end ## # Get lastSevenDays from drives diff --git a/lib/drives/item/items/item/assign_sensitivity_label/assign_sensitivity_label_post_request_body.rb b/lib/drives/item/items/item/assign_sensitivity_label/assign_sensitivity_label_post_request_body.rb index 99c527caf2..737d51ae68 100644 --- a/lib/drives/item/items/item/assign_sensitivity_label/assign_sensitivity_label_post_request_body.rb +++ b/lib/drives/item/items/item/assign_sensitivity_label/assign_sensitivity_label_post_request_body.rb @@ -28,15 +28,15 @@ class AssignSensitivityLabelPostRequestBody # The sensitivityLabelId property @sensitivity_label_id ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -58,7 +58,7 @@ def assignment_method=(value) @assignment_method = value end ## - ## Instantiates a new assignSensitivityLabelPostRequestBody and sets the default values. + ## Instantiates a new AssignSensitivityLabelPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/drives/item/items/item/assign_sensitivity_label/assign_sensitivity_label_request_builder.rb b/lib/drives/item/items/item/assign_sensitivity_label/assign_sensitivity_label_request_builder.rb index a2d96b5654..c8052f36ff 100644 --- a/lib/drives/item/items/item/assign_sensitivity_label/assign_sensitivity_label_request_builder.rb +++ b/lib/drives/item/items/item/assign_sensitivity_label/assign_sensitivity_label_request_builder.rb @@ -38,8 +38,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,16 +50,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a assign_sensitivity_label_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AssignSensitivityLabelRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/checkin/checkin_post_request_body.rb b/lib/drives/item/items/item/checkin/checkin_post_request_body.rb index 563a9a8244..a94aff52da 100644 --- a/lib/drives/item/items/item/checkin/checkin_post_request_body.rb +++ b/lib/drives/item/items/item/checkin/checkin_post_request_body.rb @@ -24,15 +24,15 @@ class CheckinPostRequestBody # The comment property @comment ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -69,7 +69,7 @@ def comment=(value) @comment = value end ## - ## Instantiates a new checkinPostRequestBody and sets the default values. + ## Instantiates a new CheckinPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/drives/item/items/item/checkin/checkin_request_builder.rb b/lib/drives/item/items/item/checkin/checkin_request_builder.rb index 4271424eff..ea81e4d9e9 100644 --- a/lib/drives/item/items/item/checkin/checkin_request_builder.rb +++ b/lib/drives/item/items/item/checkin/checkin_request_builder.rb @@ -38,8 +38,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,16 +50,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a checkin_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CheckinRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/checkout/checkout_request_builder.rb b/lib/drives/item/items/item/checkout/checkout_request_builder.rb index 21881883dd..5bd942772c 100644 --- a/lib/drives/item/items/item/checkout/checkout_request_builder.rb +++ b/lib/drives/item/items/item/checkout/checkout_request_builder.rb @@ -36,8 +36,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,15 +46,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a checkout_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CheckoutRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/children/children_request_builder.rb b/lib/drives/item/items/item/children/children_request_builder.rb index c90b1f2cde..e784024018 100644 --- a/lib/drives/item/items/item/children/children_request_builder.rb +++ b/lib/drives/item/items/item/children/children_request_builder.rb @@ -44,7 +44,7 @@ def by_drive_item_id1(drive_item_id1) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/children{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/children{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Return a collection of DriveItems in the children relationship of a DriveItem. DriveItems with a non-null folder or package facet can have one or more child DriveItems. @@ -56,8 +56,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DriveItemCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -72,8 +71,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -83,15 +81,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -103,17 +101,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a children_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ChildrenRequestBuilder.new(raw_url, @request_adapter) + end ## # Return a collection of DriveItems in the children relationship of a DriveItem. DriveItems with a non-null folder or package facet can have one or more child DriveItems. diff --git a/lib/drives/item/items/item/children/count/count_request_builder.rb b/lib/drives/item/items/item/children/count/count_request_builder.rb index cf1ce4b7e4..be62b05f5e 100644 --- a/lib/drives/item/items/item/children/count/count_request_builder.rb +++ b/lib/drives/item/items/item/children/count/count_request_builder.rb @@ -26,7 +26,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/children/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/children/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -38,8 +38,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -49,17 +48,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/drives/item/items/item/children/item/content/content_request_builder.rb b/lib/drives/item/items/item/children/item/content/content_request_builder.rb index 84476adc01..9eeddaaa25 100644 --- a/lib/drives/item/items/item/children/item/content/content_request_builder.rb +++ b/lib/drives/item/items/item/children/item/content/content_request_builder.rb @@ -29,7 +29,20 @@ class ContentRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/children/{driveItem%2Did1}/content") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/children/{driveItem%2Did1}/content{?%24format*}") + end + ## + ## The content stream, if the item represents a file. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) end ## ## The content stream, if the item represents a file. @@ -41,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -57,8 +69,7 @@ def put(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,15 +77,34 @@ def put(body, request_configuration=nil) ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## - def to_get_request_information(request_configuration=nil) + def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end request_info.url_template = @url_template request_info.path_parameters = @path_parameters - request_info.http_method = :GET + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The content stream, if the item represents a file. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end ## @@ -86,17 +116,49 @@ def to_get_request_information(request_configuration=nil) def to_put_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PUT - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "", body) + request_info.set_content_from_parsable(@request_adapter, 'application/octet-stream', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PUT + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a content_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContentRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The content stream, if the item represents a file. + class ContentRequestBuilderGetQueryParameters + + ## + # Format of the content + attr_accessor :format + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "format" + return "%24format" + else + return original_name + end + end + end end end end diff --git a/lib/drives/item/items/item/children/item/drive_item_item_request_builder.rb b/lib/drives/item/items/item/children/item/drive_item_item_request_builder.rb index 939f2b5de0..25f7e2684d 100644 --- a/lib/drives/item/items/item/children/item/drive_item_item_request_builder.rb +++ b/lib/drives/item/items/item/children/item/drive_item_item_request_builder.rb @@ -33,7 +33,7 @@ def content() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/children/{driveItem%2Did1}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/children/{driveItem%2Did1}{?%24expand,%24select}") end ## ## Collection containing Item objects for the immediate children of Item. Only items representing folders have children. Read-only. Nullable. @@ -45,8 +45,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a drive_item_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DriveItemItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Collection containing Item objects for the immediate children of Item. Only items representing folders have children. Read-only. Nullable. diff --git a/lib/drives/item/items/item/content/content_request_builder.rb b/lib/drives/item/items/item/content/content_request_builder.rb index d5a4492278..1b31edb903 100644 --- a/lib/drives/item/items/item/content/content_request_builder.rb +++ b/lib/drives/item/items/item/content/content_request_builder.rb @@ -25,7 +25,20 @@ class ContentRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/content") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/content{?%24format*}") + end + ## + ## The content stream, if the item represents a file. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) end ## ## The content stream, if the item represents a file. @@ -37,8 +50,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -53,8 +65,7 @@ def put(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -62,15 +73,34 @@ def put(body, request_configuration=nil) ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## - def to_get_request_information(request_configuration=nil) + def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end request_info.url_template = @url_template request_info.path_parameters = @path_parameters - request_info.http_method = :GET + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The content stream, if the item represents a file. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end ## @@ -82,17 +112,49 @@ def to_get_request_information(request_configuration=nil) def to_put_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PUT - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "", body) + request_info.set_content_from_parsable(@request_adapter, 'application/octet-stream', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PUT + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a content_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContentRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # The content stream, if the item represents a file. + class ContentRequestBuilderGetQueryParameters + + ## + # Format of the content + attr_accessor :format + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "format" + return "%24format" + else + return original_name + end + end + end end end end diff --git a/lib/drives/item/items/item/copy/copy_post_request_body.rb b/lib/drives/item/items/item/copy/copy_post_request_body.rb index dbfa2d66fd..d86a14aecf 100644 --- a/lib/drives/item/items/item/copy/copy_post_request_body.rb +++ b/lib/drives/item/items/item/copy/copy_post_request_body.rb @@ -19,28 +19,49 @@ class CopyPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## + # The childrenOnly property + @children_only + ## + # The includeAllVersionHistory property + @include_all_version_history + ## # The name property @name ## # The parentReference property @parent_reference ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new copyPostRequestBody and sets the default values. + ## Gets the childrenOnly property value. The childrenOnly property + ## @return a boolean + ## + def children_only + return @children_only + end + ## + ## Sets the childrenOnly property value. The childrenOnly property + ## @param value Value to set for the childrenOnly property. + ## @return a void + ## + def children_only=(value) + @children_only = value + end + ## + ## Instantiates a new CopyPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -61,11 +82,28 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { + "childrenOnly" => lambda {|n| @children_only = n.get_boolean_value() }, + "includeAllVersionHistory" => lambda {|n| @include_all_version_history = n.get_boolean_value() }, "name" => lambda {|n| @name = n.get_string_value() }, "parentReference" => lambda {|n| @parent_reference = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ItemReference.create_from_discriminator_value(pn) }) }, } end ## + ## Gets the includeAllVersionHistory property value. The includeAllVersionHistory property + ## @return a boolean + ## + def include_all_version_history + return @include_all_version_history + end + ## + ## Sets the includeAllVersionHistory property value. The includeAllVersionHistory property + ## @param value Value to set for the includeAllVersionHistory property. + ## @return a void + ## + def include_all_version_history=(value) + @include_all_version_history = value + end + ## ## Gets the name property value. The name property ## @return a string ## @@ -102,6 +140,8 @@ def parent_reference=(value) ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? + writer.write_boolean_value("childrenOnly", @children_only) + writer.write_boolean_value("includeAllVersionHistory", @include_all_version_history) writer.write_string_value("name", @name) writer.write_object_value("parentReference", @parent_reference) writer.write_additional_data(@additional_data) diff --git a/lib/drives/item/items/item/copy/copy_request_builder.rb b/lib/drives/item/items/item/copy/copy_request_builder.rb index ce5a5aab31..eda4b78920 100644 --- a/lib/drives/item/items/item/copy/copy_request_builder.rb +++ b/lib/drives/item/items/item/copy/copy_request_builder.rb @@ -28,7 +28,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/copy") end ## - ## Asynchronously creates a copy of an [driveItem][item-resource] (including any children), under a new parent item or with a new name. + ## Invoke action copy ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of drive_item @@ -39,12 +39,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Asynchronously creates a copy of an [driveItem][item-resource] (including any children), under a new parent item or with a new name. + ## Invoke action copy ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -52,17 +51,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a copy_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CopyRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/create_link/create_link_post_request_body.rb b/lib/drives/item/items/item/create_link/create_link_post_request_body.rb index aacc1d8c50..2d48fe30eb 100644 --- a/lib/drives/item/items/item/create_link/create_link_post_request_body.rb +++ b/lib/drives/item/items/item/create_link/create_link_post_request_body.rb @@ -1,6 +1,7 @@ require 'date' require 'microsoft_kiota_abstractions' require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/drive_recipient' require_relative '../../../../drives' require_relative '../../../item' require_relative '../../items' @@ -28,31 +29,37 @@ class CreateLinkPostRequestBody # The password property @password ## + # The recipients property + @recipients + ## # The retainInheritedPermissions property @retain_inherited_permissions ## # The scope property @scope ## + # The sendNotification property + @send_notification + ## # The type property @type ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new createLinkPostRequestBody and sets the default values. + ## Instantiates a new CreateLinkPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -91,8 +98,10 @@ def get_field_deserializers() "expirationDateTime" => lambda {|n| @expiration_date_time = n.get_date_time_value() }, "message" => lambda {|n| @message = n.get_string_value() }, "password" => lambda {|n| @password = n.get_string_value() }, + "recipients" => lambda {|n| @recipients = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DriveRecipient.create_from_discriminator_value(pn) }) }, "retainInheritedPermissions" => lambda {|n| @retain_inherited_permissions = n.get_boolean_value() }, "scope" => lambda {|n| @scope = n.get_string_value() }, + "sendNotification" => lambda {|n| @send_notification = n.get_boolean_value() }, "type" => lambda {|n| @type = n.get_string_value() }, } end @@ -127,6 +136,21 @@ def password=(value) @password = value end ## + ## Gets the recipients property value. The recipients property + ## @return a drive_recipient + ## + def recipients + return @recipients + end + ## + ## Sets the recipients property value. The recipients property + ## @param value Value to set for the recipients property. + ## @return a void + ## + def recipients=(value) + @recipients = value + end + ## ## Gets the retainInheritedPermissions property value. The retainInheritedPermissions property ## @return a boolean ## @@ -157,6 +181,21 @@ def scope=(value) @scope = value end ## + ## Gets the sendNotification property value. The sendNotification property + ## @return a boolean + ## + def send_notification + return @send_notification + end + ## + ## Sets the sendNotification property value. The sendNotification property + ## @param value Value to set for the sendNotification property. + ## @return a void + ## + def send_notification=(value) + @send_notification = value + end + ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void @@ -166,8 +205,10 @@ def serialize(writer) writer.write_date_time_value("expirationDateTime", @expiration_date_time) writer.write_string_value("message", @message) writer.write_string_value("password", @password) + writer.write_collection_of_object_values("recipients", @recipients) writer.write_boolean_value("retainInheritedPermissions", @retain_inherited_permissions) writer.write_string_value("scope", @scope) + writer.write_boolean_value("sendNotification", @send_notification) writer.write_string_value("type", @type) writer.write_additional_data(@additional_data) end diff --git a/lib/drives/item/items/item/create_link/create_link_request_builder.rb b/lib/drives/item/items/item/create_link/create_link_request_builder.rb index 424fd989b6..c8930124b0 100644 --- a/lib/drives/item/items/item/create_link/create_link_request_builder.rb +++ b/lib/drives/item/items/item/create_link/create_link_request_builder.rb @@ -28,7 +28,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/createLink") end ## - ## You can use createLink action to share a DriveItem via a sharing link. The createLink action will create a new sharing link if the specified link type doesn't already exist for the calling application.If a sharing link of the specified type already exists for the app, the existing sharing link will be returned. DriveItem resources inherit sharing permissions from their ancestors. + ## Create a link to share a driveItem driveItem. The createLink action creates a new sharing link if the specified link type doesn't already exist for the calling application.If a sharing link of the specified type already exists for the app, the existing sharing link is returned. DriveItem resources inherit sharing permissions from their ancestors. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of permission @@ -39,12 +39,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Permission.create_from_discriminator_value(pn) }, error_mapping) end ## - ## You can use createLink action to share a DriveItem via a sharing link. The createLink action will create a new sharing link if the specified link type doesn't already exist for the calling application.If a sharing link of the specified type already exists for the app, the existing sharing link will be returned. DriveItem resources inherit sharing permissions from their ancestors. + ## Create a link to share a driveItem driveItem. The createLink action creates a new sharing link if the specified link type doesn't already exist for the calling application.If a sharing link of the specified type already exists for the app, the existing sharing link is returned. DriveItem resources inherit sharing permissions from their ancestors. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -52,17 +51,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a create_link_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CreateLinkRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/create_upload_session/create_upload_session_post_request_body.rb b/lib/drives/item/items/item/create_upload_session/create_upload_session_post_request_body.rb index c8c5ab8f9a..d82eb773a3 100644 --- a/lib/drives/item/items/item/create_upload_session/create_upload_session_post_request_body.rb +++ b/lib/drives/item/items/item/create_upload_session/create_upload_session_post_request_body.rb @@ -22,22 +22,22 @@ class CreateUploadSessionPostRequestBody # The item property @item ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new createUploadSessionPostRequestBody and sets the default values. + ## Instantiates a new CreateUploadSessionPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/drives/item/items/item/create_upload_session/create_upload_session_request_builder.rb b/lib/drives/item/items/item/create_upload_session/create_upload_session_request_builder.rb index 6d9fe15967..f8fc166ef3 100644 --- a/lib/drives/item/items/item/create_upload_session/create_upload_session_request_builder.rb +++ b/lib/drives/item/items/item/create_upload_session/create_upload_session_request_builder.rb @@ -39,8 +39,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::UploadSession.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a create_upload_session_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CreateUploadSessionRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/created_by_user/created_by_user_request_builder.rb b/lib/drives/item/items/item/created_by_user/created_by_user_request_builder.rb index 705ab9a95f..bfe9b898e5 100644 --- a/lib/drives/item/items/item/created_by_user/created_by_user_request_builder.rb +++ b/lib/drives/item/items/item/created_by_user/created_by_user_request_builder.rb @@ -8,6 +8,7 @@ require_relative '../item' require_relative './created_by_user' require_relative './mailbox_settings/mailbox_settings_request_builder' +require_relative './service_provisioning_errors/service_provisioning_errors_request_builder' module MicrosoftGraph module Drives @@ -25,13 +26,18 @@ def mailbox_settings() return MicrosoftGraph::Drives::Item::Items::Item::CreatedByUser::MailboxSettings::MailboxSettingsRequestBuilder.new(@path_parameters, @request_adapter) end ## + # The serviceProvisioningErrors property + def service_provisioning_errors() + return MicrosoftGraph::Drives::Item::Items::Item::CreatedByUser::ServiceProvisioningErrors::ServiceProvisioningErrorsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## ## Instantiates a new CreatedByUserRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request ## @param request_adapter The request adapter to use to execute the requests. ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/createdByUser{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/createdByUser{?%24expand,%24select}") end ## ## Identity of the user who created the item. Read-only. @@ -43,8 +49,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::User.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -54,17 +59,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a created_by_user_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CreatedByUserRequestBuilder.new(raw_url, @request_adapter) + end ## # Identity of the user who created the item. Read-only. diff --git a/lib/drives/item/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.rb b/lib/drives/item/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.rb index 7cf3f31308..2d8f5073e3 100644 --- a/lib/drives/item/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.rb +++ b/lib/drives/item/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.rb @@ -27,10 +27,10 @@ class MailboxSettingsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBui ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/createdByUser/mailboxSettings{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/createdByUser/mailboxSettings{?%24expand,%24select}") end ## - ## Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + ## Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of mailbox_settings ## @@ -39,8 +39,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MailboxSettings.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -55,26 +54,25 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MailboxSettings.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + ## Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -86,20 +84,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mailbox_settings_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MailboxSettingsRequestBuilder.new(raw_url, @request_adapter) + end ## - # Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + # Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. class MailboxSettingsRequestBuilderGetQueryParameters ## diff --git a/lib/me/employee_experience/learning_course_activities/count/count.rb b/lib/drives/item/items/item/created_by_user/service_provisioning_errors/count/count.rb similarity index 100% rename from lib/me/employee_experience/learning_course_activities/count/count.rb rename to lib/drives/item/items/item/created_by_user/service_provisioning_errors/count/count.rb diff --git a/lib/drives/item/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.rb b/lib/drives/item/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.rb new file mode 100644 index 0000000000..bc8eaba9ad --- /dev/null +++ b/lib/drives/item/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.rb @@ -0,0 +1,109 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../drives' +require_relative '../../../../../item' +require_relative '../../../../items' +require_relative '../../../item' +require_relative '../../created_by_user' +require_relative '../service_provisioning_errors' +require_relative './count' + +module MicrosoftGraph + module Drives + module Item + module Items + module Item + module CreatedByUser + module ServiceProvisioningErrors + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/messages/item/replies/replies.rb b/lib/drives/item/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors.rb similarity index 100% rename from lib/me/chats/item/messages/item/replies/replies.rb rename to lib/drives/item/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors.rb diff --git a/lib/drives/item/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.rb b/lib/drives/item/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.rb new file mode 100644 index 0000000000..7a1a9bbe68 --- /dev/null +++ b/lib/drives/item/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.rb @@ -0,0 +1,143 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../models/service_provisioning_error_collection_response' +require_relative '../../../../../drives' +require_relative '../../../../item' +require_relative '../../../items' +require_relative '../../item' +require_relative '../created_by_user' +require_relative './count/count_request_builder' +require_relative './service_provisioning_errors' + +module MicrosoftGraph + module Drives + module Item + module Items + module Item + module CreatedByUser + module ServiceProvisioningErrors + ## + # Builds and executes requests for operations under \drives\{drive-id}\items\{driveItem-id}\createdByUser\serviceProvisioningErrors + class ServiceProvisioningErrorsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::Drives::Item::Items::Item::CreatedByUser::ServiceProvisioningErrors::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/createdByUser/serviceProvisioningErrors{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of service_provisioning_error_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceProvisioningErrorCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a service_provisioning_errors_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ServiceProvisioningErrorsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/drives/item/items/item/delta/delta.rb b/lib/drives/item/items/item/delta/delta.rb index 0c348d20cb..8a3dc08b72 100644 --- a/lib/drives/item/items/item/delta/delta.rb +++ b/lib/drives/item/items/item/delta/delta.rb @@ -1 +1 @@ -require_relative 'delta_response' +require_relative 'delta_get_response' diff --git a/lib/drives/item/items/item/delta/delta_get_response.rb b/lib/drives/item/items/item/delta/delta_get_response.rb new file mode 100644 index 0000000000..87eb530284 --- /dev/null +++ b/lib/drives/item/items/item/delta/delta_get_response.rb @@ -0,0 +1,78 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/base_delta_function_response' +require_relative '../../../../../models/drive_item' +require_relative '../../../../drives' +require_relative '../../../item' +require_relative '../../items' +require_relative '../item' +require_relative './delta' + +module MicrosoftGraph + module Drives + module Item + module Items + module Item + module Delta + class DeltaGetResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new DeltaGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a delta_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return DeltaGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a drive_item + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end + end +end diff --git a/lib/drives/item/items/item/delta/delta_request_builder.rb b/lib/drives/item/items/item/delta/delta_request_builder.rb index c988fa086a..7ab4f63e07 100644 --- a/lib/drives/item/items/item/delta/delta_request_builder.rb +++ b/lib/drives/item/items/item/delta/delta_request_builder.rb @@ -24,49 +24,60 @@ class DeltaRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/delta(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/delta(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Invoke function delta + ## Track changes in a driveItem and its children over time. Your app begins by calling delta without any parameters.The service starts enumerating the drive's hierarchy, returning pages of items and either an @odata.nextLink or an @odata.deltaLink, as described below.Your app should continue calling with the @odata.nextLink until you no longer see an @odata.nextLink returned, or you see a response with an empty set of changes. After you have finished receiving all the changes, you may apply them to your local state.To check for changes in the future, call delta again with the @odata.deltaLink from the previous response. Deleted items are returned with the deleted facet.Items with this property set should be removed from your local state. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of delta_response + ## @return a Fiber of delta_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Drives::Item::Items::Item::Delta::DeltaResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Drives::Item::Items::Item::Delta::DeltaGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Invoke function delta + ## Track changes in a driveItem and its children over time. Your app begins by calling delta without any parameters.The service starts enumerating the drive's hierarchy, returning pages of items and either an @odata.nextLink or an @odata.deltaLink, as described below.Your app should continue calling with the @odata.nextLink until you no longer see an @odata.nextLink returned, or you see a response with an empty set of changes. After you have finished receiving all the changes, you may apply them to your local state.To check for changes in the future, call delta again with the @odata.deltaLink from the previous response. Deleted items are returned with the deleted facet.Items with this property set should be removed from your local state. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a delta_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeltaRequestBuilder.new(raw_url, @request_adapter) + end ## - # Invoke function delta + # Track changes in a driveItem and its children over time. Your app begins by calling delta without any parameters.The service starts enumerating the drive's hierarchy, returning pages of items and either an @odata.nextLink or an @odata.deltaLink, as described below.Your app should continue calling with the @odata.nextLink until you no longer see an @odata.nextLink returned, or you see a response with an empty set of changes. After you have finished receiving all the changes, you may apply them to your local state.To check for changes in the future, call delta again with the @odata.deltaLink from the previous response. Deleted items are returned with the deleted facet.Items with this property set should be removed from your local state. class DeltaRequestBuilderGetQueryParameters ## # Include count of items attr_accessor :count ## + # Expand related entities + attr_accessor :expand + ## # Filter items by property values attr_accessor :filter ## @@ -94,6 +105,8 @@ def get_query_parameter(original_name) case original_name when "count" return "%24count" + when "expand" + return "%24expand" when "filter" return "%24filter" when "orderby" diff --git a/lib/drives/item/items/item/delta/delta_response.rb b/lib/drives/item/items/item/delta/delta_response.rb deleted file mode 100644 index 3a4b2f72b8..0000000000 --- a/lib/drives/item/items/item/delta/delta_response.rb +++ /dev/null @@ -1,78 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../microsoft_graph' -require_relative '../../../../../models/base_delta_function_response' -require_relative '../../../../../models/drive_item' -require_relative '../../../../drives' -require_relative '../../../item' -require_relative '../../items' -require_relative '../item' -require_relative './delta' - -module MicrosoftGraph - module Drives - module Item - module Items - module Item - module Delta - class DeltaResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new deltaResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a delta_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return DeltaResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a drive_item - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end - end -end diff --git a/lib/drives/item/items/item/delta_with_token/delta_with_token.rb b/lib/drives/item/items/item/delta_with_token/delta_with_token.rb index 5e0264d883..c470085280 100644 --- a/lib/drives/item/items/item/delta_with_token/delta_with_token.rb +++ b/lib/drives/item/items/item/delta_with_token/delta_with_token.rb @@ -1 +1 @@ -require_relative 'delta_with_token_response' +require_relative 'delta_with_token_get_response' diff --git a/lib/drives/item/items/item/delta_with_token/delta_with_token_get_response.rb b/lib/drives/item/items/item/delta_with_token/delta_with_token_get_response.rb new file mode 100644 index 0000000000..2a27b21af3 --- /dev/null +++ b/lib/drives/item/items/item/delta_with_token/delta_with_token_get_response.rb @@ -0,0 +1,78 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/base_delta_function_response' +require_relative '../../../../../models/drive_item' +require_relative '../../../../drives' +require_relative '../../../item' +require_relative '../../items' +require_relative '../item' +require_relative './delta_with_token' + +module MicrosoftGraph + module Drives + module Item + module Items + module Item + module DeltaWithToken + class DeltaWithTokenGetResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new DeltaWithTokenGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a delta_with_token_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return DeltaWithTokenGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a drive_item + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end + end +end diff --git a/lib/drives/item/items/item/delta_with_token/delta_with_token_request_builder.rb b/lib/drives/item/items/item/delta_with_token/delta_with_token_request_builder.rb index 8b67bd7db1..d33cf956e8 100644 --- a/lib/drives/item/items/item/delta_with_token/delta_with_token_request_builder.rb +++ b/lib/drives/item/items/item/delta_with_token/delta_with_token_request_builder.rb @@ -25,21 +25,20 @@ class DeltaWithTokenRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuil ## @return a void ## def initialize(path_parameters, request_adapter, token=nil) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/delta(token='{token}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/delta(token='{token}'){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Invoke function delta ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of delta_with_token_response + ## @return a Fiber of delta_with_token_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Drives::Item::Items::Item::DeltaWithToken::DeltaWithTokenResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Drives::Item::Items::Item::DeltaWithToken::DeltaWithTokenGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Invoke function delta @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a delta_with_token_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeltaWithTokenRequestBuilder.new(raw_url, @request_adapter) + end ## # Invoke function delta @@ -68,6 +76,9 @@ class DeltaWithTokenRequestBuilderGetQueryParameters # Include count of items attr_accessor :count ## + # Expand related entities + attr_accessor :expand + ## # Filter items by property values attr_accessor :filter ## @@ -95,6 +106,8 @@ def get_query_parameter(original_name) case original_name when "count" return "%24count" + when "expand" + return "%24expand" when "filter" return "%24filter" when "orderby" diff --git a/lib/drives/item/items/item/delta_with_token/delta_with_token_response.rb b/lib/drives/item/items/item/delta_with_token/delta_with_token_response.rb deleted file mode 100644 index 0c32286f9a..0000000000 --- a/lib/drives/item/items/item/delta_with_token/delta_with_token_response.rb +++ /dev/null @@ -1,78 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../microsoft_graph' -require_relative '../../../../../models/base_delta_function_response' -require_relative '../../../../../models/drive_item' -require_relative '../../../../drives' -require_relative '../../../item' -require_relative '../../items' -require_relative '../item' -require_relative './delta_with_token' - -module MicrosoftGraph - module Drives - module Item - module Items - module Item - module DeltaWithToken - class DeltaWithTokenResponse < MicrosoftGraph::Models::BaseDeltaFunctionResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new deltaWithTokenResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a delta_with_token_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return DeltaWithTokenResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a drive_item - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end - end -end diff --git a/lib/me/chats/item/messages/item/soft_delete/soft_delete.rb b/lib/drives/item/items/item/discard_checkout/discard_checkout.rb similarity index 100% rename from lib/me/chats/item/messages/item/soft_delete/soft_delete.rb rename to lib/drives/item/items/item/discard_checkout/discard_checkout.rb diff --git a/lib/drives/item/items/item/discard_checkout/discard_checkout_request_builder.rb b/lib/drives/item/items/item/discard_checkout/discard_checkout_request_builder.rb new file mode 100644 index 0000000000..06f7ee8639 --- /dev/null +++ b/lib/drives/item/items/item/discard_checkout/discard_checkout_request_builder.rb @@ -0,0 +1,74 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../drives' +require_relative '../../../item' +require_relative '../../items' +require_relative '../item' +require_relative './discard_checkout' + +module MicrosoftGraph + module Drives + module Item + module Items + module Item + module DiscardCheckout + ## + # Provides operations to call the discardCheckout method. + class DiscardCheckoutRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new DiscardCheckoutRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/discardCheckout") + end + ## + ## Discard the check out of a driveItem. This action releases a driveItem resource that was previously checked out. Any changes made to the item while it was checked out are discarded. The same user that performed the checkout must discard it. Another alternative is to use application permissions. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def post(request_configuration=nil) + request_info = self.to_post_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Discard the check out of a driveItem. This action releases a driveItem resource that was previously checked out. Any changes made to the item while it was checked out are discarded. The same user that performed the checkout must discard it. Another alternative is to use application permissions. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_post_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a discard_checkout_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DiscardCheckoutRequestBuilder.new(raw_url, @request_adapter) + end + end + end + end + end + end + end +end diff --git a/lib/drives/item/items/item/drive_item_item_request_builder.rb b/lib/drives/item/items/item/drive_item_item_request_builder.rb index b9a8d1443a..e5fcbd5e7e 100644 --- a/lib/drives/item/items/item/drive_item_item_request_builder.rb +++ b/lib/drives/item/items/item/drive_item_item_request_builder.rb @@ -17,6 +17,7 @@ require_relative './create_upload_session/create_upload_session_request_builder' require_relative './delta/delta_request_builder' require_relative './delta_with_token/delta_with_token_request_builder' +require_relative './discard_checkout/discard_checkout_request_builder' require_relative './extract_sensitivity_labels/extract_sensitivity_labels_request_builder' require_relative './follow/follow_request_builder' require_relative './get_activities_by_interval/get_activities_by_interval_request_builder' @@ -29,6 +30,7 @@ require_relative './permissions/permissions_request_builder' require_relative './preview/preview_request_builder' require_relative './restore/restore_request_builder' +require_relative './retention_label/retention_label_request_builder' require_relative './search_with_q/search_with_q_request_builder' require_relative './subscriptions/subscriptions_request_builder' require_relative './thumbnails/thumbnails_request_builder' @@ -102,6 +104,11 @@ def delta() return MicrosoftGraph::Drives::Item::Items::Item::Delta::DeltaRequestBuilder.new(@path_parameters, @request_adapter) end ## + # Provides operations to call the discardCheckout method. + def discard_checkout() + return MicrosoftGraph::Drives::Item::Items::Item::DiscardCheckout::DiscardCheckoutRequestBuilder.new(@path_parameters, @request_adapter) + end + ## # Provides operations to call the extractSensitivityLabels method. def extract_sensitivity_labels() return MicrosoftGraph::Drives::Item::Items::Item::ExtractSensitivityLabels::ExtractSensitivityLabelsRequestBuilder.new(@path_parameters, @request_adapter) @@ -152,6 +159,11 @@ def restore() return MicrosoftGraph::Drives::Item::Items::Item::Restore::RestoreRequestBuilder.new(@path_parameters, @request_adapter) end ## + # Provides operations to manage the retentionLabel property of the microsoft.graph.driveItem entity. + def retention_label() + return MicrosoftGraph::Drives::Item::Items::Item::RetentionLabel::RetentionLabelRequestBuilder.new(@path_parameters, @request_adapter) + end + ## # Provides operations to manage the subscriptions property of the microsoft.graph.driveItem entity. def subscriptions() return MicrosoftGraph::Drives::Item::Items::Item::Subscriptions::SubscriptionsRequestBuilder.new(@path_parameters, @request_adapter) @@ -188,10 +200,10 @@ def workbook() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}{?%24expand,%24select}") end ## - ## Delete a DriveItem by using its ID or path.Note that deleting items using this method will move the items to the recycle bin instead of permanently deleting the item. + ## Delete navigation property items for drives ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void ## @@ -200,8 +212,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -223,8 +234,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -241,7 +251,7 @@ def get_activities_by_interval_with_start_date_time_with_end_date_time_with_inte return GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder.new(@path_parameters, @request_adapter, endDateTime, interval, startDateTime) end ## - ## Update the metadata for a driveItem by ID or path. You can also use update to move an item to another parent by updating the item's parentReference property. + ## Update the navigation property items in drives ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of drive_item @@ -252,8 +262,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -266,19 +275,20 @@ def search_with_q(q) return SearchWithQRequestBuilder.new(@path_parameters, @request_adapter, q) end ## - ## Delete a DriveItem by using its ID or path.Note that deleting items using this method will move the items to the recycle bin instead of permanently deleting the item. + ## Delete navigation property items for drives ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -288,19 +298,19 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Update the metadata for a driveItem by ID or path. You can also use update to move an item to another parent by updating the item's parentReference property. + ## Update the navigation property items in drives ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -308,17 +318,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a drive_item_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DriveItemItemRequestBuilder.new(raw_url, @request_adapter) + end ## # All items contained in the drive. Read-only. Nullable. diff --git a/lib/drives/item/items/item/extract_sensitivity_labels/extract_sensitivity_labels_request_builder.rb b/lib/drives/item/items/item/extract_sensitivity_labels/extract_sensitivity_labels_request_builder.rb index 788f03b0b3..9ffe9dd5c0 100644 --- a/lib/drives/item/items/item/extract_sensitivity_labels/extract_sensitivity_labels_request_builder.rb +++ b/lib/drives/item/items/item/extract_sensitivity_labels/extract_sensitivity_labels_request_builder.rb @@ -37,8 +37,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ExtractSensitivityLabelsResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,16 +47,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a extract_sensitivity_labels_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ExtractSensitivityLabelsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/follow/follow_request_builder.rb b/lib/drives/item/items/item/follow/follow_request_builder.rb index 54fc8b6714..f4ccea9d97 100644 --- a/lib/drives/item/items/item/follow/follow_request_builder.rb +++ b/lib/drives/item/items/item/follow/follow_request_builder.rb @@ -37,8 +37,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,16 +47,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a follow_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return FollowRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/get_activities_by_interval/get_activities_by_interval.rb b/lib/drives/item/items/item/get_activities_by_interval/get_activities_by_interval.rb index 392eb95c99..ab461e5b20 100644 --- a/lib/drives/item/items/item/get_activities_by_interval/get_activities_by_interval.rb +++ b/lib/drives/item/items/item/get_activities_by_interval/get_activities_by_interval.rb @@ -1 +1 @@ -require_relative 'get_activities_by_interval_response' +require_relative 'get_activities_by_interval_get_response' diff --git a/lib/drives/item/items/item/get_activities_by_interval/get_activities_by_interval_get_response.rb b/lib/drives/item/items/item/get_activities_by_interval/get_activities_by_interval_get_response.rb new file mode 100644 index 0000000000..a1956bd4f2 --- /dev/null +++ b/lib/drives/item/items/item/get_activities_by_interval/get_activities_by_interval_get_response.rb @@ -0,0 +1,78 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/base_collection_pagination_count_response' +require_relative '../../../../../models/item_activity_stat' +require_relative '../../../../drives' +require_relative '../../../item' +require_relative '../../items' +require_relative '../item' +require_relative './get_activities_by_interval' + +module MicrosoftGraph + module Drives + module Item + module Items + module Item + module GetActivitiesByInterval + class GetActivitiesByIntervalGetResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetActivitiesByIntervalGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_activities_by_interval_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetActivitiesByIntervalGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ItemActivityStat.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a item_activity_stat + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end + end +end diff --git a/lib/drives/item/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.rb b/lib/drives/item/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.rb index 0b7703cf26..36eca69260 100644 --- a/lib/drives/item/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.rb +++ b/lib/drives/item/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.rb @@ -24,49 +24,60 @@ class GetActivitiesByIntervalRequestBuilder < MicrosoftKiotaAbstractions::BaseRe ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/getActivitiesByInterval(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/getActivitiesByInterval(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Invoke function getActivitiesByInterval + ## Get a collection of itemActivityStats resources for the activities that took place on this resource within the specified time interval. Analytics aggregates might not be available for all action types. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_activities_by_interval_response + ## @return a Fiber of get_activities_by_interval_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Drives::Item::Items::Item::GetActivitiesByInterval::GetActivitiesByIntervalResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Drives::Item::Items::Item::GetActivitiesByInterval::GetActivitiesByIntervalGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Invoke function getActivitiesByInterval + ## Get a collection of itemActivityStats resources for the activities that took place on this resource within the specified time interval. Analytics aggregates might not be available for all action types. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_activities_by_interval_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetActivitiesByIntervalRequestBuilder.new(raw_url, @request_adapter) + end ## - # Invoke function getActivitiesByInterval + # Get a collection of itemActivityStats resources for the activities that took place on this resource within the specified time interval. Analytics aggregates might not be available for all action types. class GetActivitiesByIntervalRequestBuilderGetQueryParameters ## # Include count of items attr_accessor :count ## + # Expand related entities + attr_accessor :expand + ## # Filter items by property values attr_accessor :filter ## @@ -94,6 +105,8 @@ def get_query_parameter(original_name) case original_name when "count" return "%24count" + when "expand" + return "%24expand" when "filter" return "%24filter" when "orderby" diff --git a/lib/drives/item/items/item/get_activities_by_interval/get_activities_by_interval_response.rb b/lib/drives/item/items/item/get_activities_by_interval/get_activities_by_interval_response.rb deleted file mode 100644 index d11582aa25..0000000000 --- a/lib/drives/item/items/item/get_activities_by_interval/get_activities_by_interval_response.rb +++ /dev/null @@ -1,78 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../microsoft_graph' -require_relative '../../../../../models/base_collection_pagination_count_response' -require_relative '../../../../../models/item_activity_stat' -require_relative '../../../../drives' -require_relative '../../../item' -require_relative '../../items' -require_relative '../item' -require_relative './get_activities_by_interval' - -module MicrosoftGraph - module Drives - module Item - module Items - module Item - module GetActivitiesByInterval - class GetActivitiesByIntervalResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getActivitiesByIntervalResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_activities_by_interval_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetActivitiesByIntervalResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ItemActivityStat.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a item_activity_stat - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end - end -end diff --git a/lib/drives/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/dab1c2feb9ecf2d349721478e4ff8fe9c46b97a0c44110851b2b17a08d22383e.rb b/lib/drives/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/dab1c2feb9ecf2d349721478e4ff8fe9c46b97a0c44110851b2b17a08d22383e.rb index d75de3a279..1e598f8378 100644 --- a/lib/drives/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/dab1c2feb9ecf2d349721478e4ff8fe9c46b97a0c44110851b2b17a08d22383e.rb +++ b/lib/drives/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/dab1c2feb9ecf2d349721478e4ff8fe9c46b97a0c44110851b2b17a08d22383e.rb @@ -27,21 +27,20 @@ class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequest ## @return a void ## def initialize(path_parameters, request_adapter, end_date_time=nil, interval=nil, start_date_time=nil) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/getActivitiesByInterval(startDateTime='{startDateTime}',endDateTime='{endDateTime}',interval='{interval}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/getActivitiesByInterval(startDateTime='{startDateTime}',endDateTime='{endDateTime}',interval='{interval}'){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Invoke function getActivitiesByInterval ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response + ## @return a Fiber of get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Drives::Item::Items::Item::GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval::GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Drives::Item::Items::Item::GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval::GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## ## Invoke function getActivitiesByInterval @@ -50,17 +49,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder.new(raw_url, @request_adapter) + end ## # Invoke function getActivitiesByInterval @@ -70,6 +78,9 @@ class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequest # Include count of items attr_accessor :count ## + # Expand related entities + attr_accessor :expand + ## # Filter items by property values attr_accessor :filter ## @@ -97,6 +108,8 @@ def get_query_parameter(original_name) case original_name when "count" return "%24count" + when "expand" + return "%24expand" when "filter" return "%24filter" when "orderby" diff --git a/lib/drives/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval.rb b/lib/drives/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval.rb index a8604aeec9..d4ef65f826 100644 --- a/lib/drives/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval.rb +++ b/lib/drives/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval.rb @@ -1 +1 @@ -require_relative 'get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response' +require_relative 'get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response' diff --git a/lib/drives/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.rb b/lib/drives/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.rb new file mode 100644 index 0000000000..f6051b97ab --- /dev/null +++ b/lib/drives/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.rb @@ -0,0 +1,78 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/base_collection_pagination_count_response' +require_relative '../../../../../models/item_activity_stat' +require_relative '../../../../drives' +require_relative '../../../item' +require_relative '../../items' +require_relative '../item' +require_relative './get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval' + +module MicrosoftGraph + module Drives + module Item + module Items + module Item + module GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval + class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ItemActivityStat.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a item_activity_stat + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end + end +end diff --git a/lib/drives/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.rb b/lib/drives/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.rb deleted file mode 100644 index 92cd817441..0000000000 --- a/lib/drives/item/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response.rb +++ /dev/null @@ -1,78 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../microsoft_graph' -require_relative '../../../../../models/base_collection_pagination_count_response' -require_relative '../../../../../models/item_activity_stat' -require_relative '../../../../drives' -require_relative '../../../item' -require_relative '../../items' -require_relative '../item' -require_relative './get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval' - -module MicrosoftGraph - module Drives - module Item - module Items - module Item - module GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval - class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new getActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ItemActivityStat.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a item_activity_stat - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end - end -end diff --git a/lib/drives/item/items/item/invite/invite.rb b/lib/drives/item/items/item/invite/invite.rb index 3611ac926a..9048e8907a 100644 --- a/lib/drives/item/items/item/invite/invite.rb +++ b/lib/drives/item/items/item/invite/invite.rb @@ -1,2 +1,2 @@ require_relative 'invite_post_request_body' -require_relative 'invite_response' +require_relative 'invite_post_response' diff --git a/lib/drives/item/items/item/invite/invite_post_request_body.rb b/lib/drives/item/items/item/invite/invite_post_request_body.rb index 10aae71a78..54b4ef5ca1 100644 --- a/lib/drives/item/items/item/invite/invite_post_request_body.rb +++ b/lib/drives/item/items/item/invite/invite_post_request_body.rb @@ -43,22 +43,22 @@ class InvitePostRequestBody # The sendInvitation property @send_invitation ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new invitePostRequestBody and sets the default values. + ## Instantiates a new InvitePostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/drives/item/items/item/invite/invite_post_response.rb b/lib/drives/item/items/item/invite/invite_post_response.rb new file mode 100644 index 0000000000..283c1c1c80 --- /dev/null +++ b/lib/drives/item/items/item/invite/invite_post_response.rb @@ -0,0 +1,78 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/base_collection_pagination_count_response' +require_relative '../../../../../models/permission' +require_relative '../../../../drives' +require_relative '../../../item' +require_relative '../../items' +require_relative '../item' +require_relative './invite' + +module MicrosoftGraph + module Drives + module Item + module Items + module Item + module Invite + class InvitePostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new InvitePostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a invite_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return InvitePostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Permission.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a permission + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end + end +end diff --git a/lib/drives/item/items/item/invite/invite_request_builder.rb b/lib/drives/item/items/item/invite/invite_request_builder.rb index e64ccf30dc..22cdd0dd8c 100644 --- a/lib/drives/item/items/item/invite/invite_request_builder.rb +++ b/lib/drives/item/items/item/invite/invite_request_builder.rb @@ -27,10 +27,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/invite") end ## - ## Sends a sharing invitation for a driveItem.A sharing invitation provides permissions to the recipients and optionally sends them an email with a [sharing link][]. + ## Sends a sharing invitation for a driveItem.A sharing invitation provides permissions to the recipients and optionally sends them an email with a sharing link. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of invite_response + ## @return a Fiber of invite_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -38,12 +38,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Drives::Item::Items::Item::Invite::InviteResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Drives::Item::Items::Item::Invite::InvitePostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Sends a sharing invitation for a driveItem.A sharing invitation provides permissions to the recipients and optionally sends them an email with a [sharing link][]. + ## Sends a sharing invitation for a driveItem.A sharing invitation provides permissions to the recipients and optionally sends them an email with a sharing link. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -51,17 +50,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a invite_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return InviteRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/invite/invite_response.rb b/lib/drives/item/items/item/invite/invite_response.rb deleted file mode 100644 index a0c2b6fa2f..0000000000 --- a/lib/drives/item/items/item/invite/invite_response.rb +++ /dev/null @@ -1,78 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../microsoft_graph' -require_relative '../../../../../models/base_collection_pagination_count_response' -require_relative '../../../../../models/permission' -require_relative '../../../../drives' -require_relative '../../../item' -require_relative '../../items' -require_relative '../item' -require_relative './invite' - -module MicrosoftGraph - module Drives - module Item - module Items - module Item - module Invite - class InviteResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new inviteResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a invite_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return InviteResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Permission.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a permission - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end - end -end diff --git a/lib/drives/item/items/item/last_modified_by_user/last_modified_by_user_request_builder.rb b/lib/drives/item/items/item/last_modified_by_user/last_modified_by_user_request_builder.rb index 1add1c4e74..95d966b41e 100644 --- a/lib/drives/item/items/item/last_modified_by_user/last_modified_by_user_request_builder.rb +++ b/lib/drives/item/items/item/last_modified_by_user/last_modified_by_user_request_builder.rb @@ -8,6 +8,7 @@ require_relative '../item' require_relative './last_modified_by_user' require_relative './mailbox_settings/mailbox_settings_request_builder' +require_relative './service_provisioning_errors/service_provisioning_errors_request_builder' module MicrosoftGraph module Drives @@ -25,13 +26,18 @@ def mailbox_settings() return MicrosoftGraph::Drives::Item::Items::Item::LastModifiedByUser::MailboxSettings::MailboxSettingsRequestBuilder.new(@path_parameters, @request_adapter) end ## + # The serviceProvisioningErrors property + def service_provisioning_errors() + return MicrosoftGraph::Drives::Item::Items::Item::LastModifiedByUser::ServiceProvisioningErrors::ServiceProvisioningErrorsRequestBuilder.new(@path_parameters, @request_adapter) + end + ## ## Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request ## @param request_adapter The request adapter to use to execute the requests. ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/lastModifiedByUser{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/lastModifiedByUser{?%24expand,%24select}") end ## ## Identity of the user who last modified the item. Read-only. @@ -43,8 +49,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::User.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -54,17 +59,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a last_modified_by_user_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return LastModifiedByUserRequestBuilder.new(raw_url, @request_adapter) + end ## # Identity of the user who last modified the item. Read-only. diff --git a/lib/drives/item/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.rb b/lib/drives/item/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.rb index 3e9d8d6262..b25ea07bd2 100644 --- a/lib/drives/item/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.rb +++ b/lib/drives/item/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.rb @@ -27,10 +27,10 @@ class MailboxSettingsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBui ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/lastModifiedByUser/mailboxSettings{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/lastModifiedByUser/mailboxSettings{?%24expand,%24select}") end ## - ## Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + ## Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of mailbox_settings ## @@ -39,8 +39,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MailboxSettings.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -55,26 +54,25 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::MailboxSettings.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + ## Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -86,20 +84,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a mailbox_settings_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return MailboxSettingsRequestBuilder.new(raw_url, @request_adapter) + end ## - # Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + # Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. class MailboxSettingsRequestBuilderGetQueryParameters ## diff --git a/lib/me/events/count/count.rb b/lib/drives/item/items/item/last_modified_by_user/service_provisioning_errors/count/count.rb similarity index 100% rename from lib/me/events/count/count.rb rename to lib/drives/item/items/item/last_modified_by_user/service_provisioning_errors/count/count.rb diff --git a/lib/drives/item/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.rb b/lib/drives/item/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.rb new file mode 100644 index 0000000000..45baa8d5e6 --- /dev/null +++ b/lib/drives/item/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.rb @@ -0,0 +1,109 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../drives' +require_relative '../../../../../item' +require_relative '../../../../items' +require_relative '../../../item' +require_relative '../../last_modified_by_user' +require_relative '../service_provisioning_errors' +require_relative './count' + +module MicrosoftGraph + module Drives + module Item + module Items + module Item + module LastModifiedByUser + module ServiceProvisioningErrors + module Count + ## + # Provides operations to count the resources in the collection. + class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new CountRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24filter,%24search}") + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of integer + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, number, error_mapping) + end + ## + ## Get the number of the resource + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Get the number of the resource + class CountRequestBuilderGetQueryParameters + + ## + # Filter items by property values + attr_accessor :filter + ## + # Search items by search phrases + attr_accessor :search + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "filter" + return "%24filter" + when "search" + return "%24search" + else + return original_name + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/me/chats/item/messages/item/undo_soft_delete/undo_soft_delete.rb b/lib/drives/item/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors.rb similarity index 100% rename from lib/me/chats/item/messages/item/undo_soft_delete/undo_soft_delete.rb rename to lib/drives/item/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors.rb diff --git a/lib/drives/item/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.rb b/lib/drives/item/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.rb new file mode 100644 index 0000000000..1c9c8b0aed --- /dev/null +++ b/lib/drives/item/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.rb @@ -0,0 +1,143 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../microsoft_graph' +require_relative '../../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../../../models/service_provisioning_error_collection_response' +require_relative '../../../../../drives' +require_relative '../../../../item' +require_relative '../../../items' +require_relative '../../item' +require_relative '../last_modified_by_user' +require_relative './count/count_request_builder' +require_relative './service_provisioning_errors' + +module MicrosoftGraph + module Drives + module Item + module Items + module Item + module LastModifiedByUser + module ServiceProvisioningErrors + ## + # Builds and executes requests for operations under \drives\{drive-id}\items\{driveItem-id}\lastModifiedByUser\serviceProvisioningErrors + class ServiceProvisioningErrorsRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + # Provides operations to count the resources in the collection. + def count() + return MicrosoftGraph::Drives::Item::Items::Item::LastModifiedByUser::ServiceProvisioningErrors::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) + end + ## + ## Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") + end + ## + ## Errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of service_provisioning_error_collection_response + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ServiceProvisioningErrorCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a service_provisioning_errors_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ServiceProvisioningErrorsRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters + + ## + # Include count of items + attr_accessor :count + ## + # Expand related entities + attr_accessor :expand + ## + # Filter items by property values + attr_accessor :filter + ## + # Order items by property values + attr_accessor :orderby + ## + # Search items by search phrases + attr_accessor :search + ## + # Select properties to be returned + attr_accessor :select + ## + # Skip the first n items + attr_accessor :skip + ## + # Show only the first n items + attr_accessor :top + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "count" + return "%24count" + when "expand" + return "%24expand" + when "filter" + return "%24filter" + when "orderby" + return "%24orderby" + when "search" + return "%24search" + when "select" + return "%24select" + when "skip" + return "%24skip" + when "top" + return "%24top" + else + return original_name + end + end + end + end + end + end + end + end + end + end +end diff --git a/lib/drives/item/items/item/list_item/list_item_request_builder.rb b/lib/drives/item/items/item/list_item/list_item_request_builder.rb index 29b6b67b31..b0027c4529 100644 --- a/lib/drives/item/items/item/list_item/list_item_request_builder.rb +++ b/lib/drives/item/items/item/list_item/list_item_request_builder.rb @@ -25,7 +25,7 @@ class ListItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/listItem{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/listItem{?%24expand,%24select}") end ## ## For drives in SharePoint, the associated document library list item. Read-only. Nullable. @@ -37,8 +37,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ListItem.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -48,17 +47,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a list_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ListItemRequestBuilder.new(raw_url, @request_adapter) + end ## # For drives in SharePoint, the associated document library list item. Read-only. Nullable. diff --git a/lib/drives/item/items/item/permanent_delete/permanent_delete_request_builder.rb b/lib/drives/item/items/item/permanent_delete/permanent_delete_request_builder.rb index 8cd50d4a84..9c5bf7e34e 100644 --- a/lib/drives/item/items/item/permanent_delete/permanent_delete_request_builder.rb +++ b/lib/drives/item/items/item/permanent_delete/permanent_delete_request_builder.rb @@ -36,8 +36,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,15 +46,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a permanent_delete_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return PermanentDeleteRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/permissions/count/count_request_builder.rb b/lib/drives/item/items/item/permissions/count/count_request_builder.rb index 712bffd510..973a0aea63 100644 --- a/lib/drives/item/items/item/permissions/count/count_request_builder.rb +++ b/lib/drives/item/items/item/permissions/count/count_request_builder.rb @@ -26,7 +26,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/permissions/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/permissions/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -38,8 +38,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -49,17 +48,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/drives/item/items/item/permissions/item/grant/grant.rb b/lib/drives/item/items/item/permissions/item/grant/grant.rb index d6a3412e2b..5e12ada249 100644 --- a/lib/drives/item/items/item/permissions/item/grant/grant.rb +++ b/lib/drives/item/items/item/permissions/item/grant/grant.rb @@ -1,2 +1,2 @@ require_relative 'grant_post_request_body' -require_relative 'grant_response' +require_relative 'grant_post_response' diff --git a/lib/drives/item/items/item/permissions/item/grant/grant_post_request_body.rb b/lib/drives/item/items/item/permissions/item/grant/grant_post_request_body.rb index 859b7b551e..3ff133565a 100644 --- a/lib/drives/item/items/item/permissions/item/grant/grant_post_request_body.rb +++ b/lib/drives/item/items/item/permissions/item/grant/grant_post_request_body.rb @@ -29,22 +29,22 @@ class GrantPostRequestBody # The roles property @roles ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new grantPostRequestBody and sets the default values. + ## Instantiates a new GrantPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/drives/item/items/item/permissions/item/grant/grant_post_response.rb b/lib/drives/item/items/item/permissions/item/grant/grant_post_response.rb new file mode 100644 index 0000000000..986835e14f --- /dev/null +++ b/lib/drives/item/items/item/permissions/item/grant/grant_post_response.rb @@ -0,0 +1,84 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../../../microsoft_graph' +require_relative '../../../../../../../models/base_collection_pagination_count_response' +require_relative '../../../../../../../models/permission' +require_relative '../../../../../../drives' +require_relative '../../../../../item' +require_relative '../../../../items' +require_relative '../../../item' +require_relative '../../permissions' +require_relative '../item' +require_relative './grant' + +module MicrosoftGraph + module Drives + module Item + module Items + module Item + module Permissions + module Item + module Grant + class GrantPostResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new GrantPostResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a grant_post_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return GrantPostResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Permission.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a permission + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end + end + end + end +end diff --git a/lib/drives/item/items/item/permissions/item/grant/grant_request_builder.rb b/lib/drives/item/items/item/permissions/item/grant/grant_request_builder.rb index 55b97c2029..f49e7bf346 100644 --- a/lib/drives/item/items/item/permissions/item/grant/grant_request_builder.rb +++ b/lib/drives/item/items/item/permissions/item/grant/grant_request_builder.rb @@ -31,10 +31,10 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/permissions/{permission%2Did}/grant") end ## - ## Grant users access to a link represented by a [permission][]. + ## Grant users access to a link represented by a permission. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of grant_response + ## @return a Fiber of grant_post_response ## def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? @@ -42,12 +42,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Drives::Item::Items::Item::Permissions::Item::Grant::GrantResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Drives::Item::Items::Item::Permissions::Item::Grant::GrantPostResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Grant users access to a link represented by a [permission][]. + ## Grant users access to a link represented by a permission. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -55,17 +54,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a grant_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return GrantRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/permissions/item/grant/grant_response.rb b/lib/drives/item/items/item/permissions/item/grant/grant_response.rb deleted file mode 100644 index 3d9072574c..0000000000 --- a/lib/drives/item/items/item/permissions/item/grant/grant_response.rb +++ /dev/null @@ -1,84 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/base_collection_pagination_count_response' -require_relative '../../../../../../../models/permission' -require_relative '../../../../../../drives' -require_relative '../../../../../item' -require_relative '../../../../items' -require_relative '../../../item' -require_relative '../../permissions' -require_relative '../item' -require_relative './grant' - -module MicrosoftGraph - module Drives - module Item - module Items - module Item - module Permissions - module Item - module Grant - class GrantResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new grantResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a grant_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return GrantResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Permission.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a permission - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end - end - end - end -end diff --git a/lib/drives/item/items/item/permissions/item/permission_item_request_builder.rb b/lib/drives/item/items/item/permissions/item/permission_item_request_builder.rb index 11b122bf43..a28f3d2be1 100644 --- a/lib/drives/item/items/item/permissions/item/permission_item_request_builder.rb +++ b/lib/drives/item/items/item/permissions/item/permission_item_request_builder.rb @@ -33,10 +33,10 @@ def grant() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/permissions/{permission%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/permissions/{permission%2Did}{?%24expand,%24select}") end ## - ## Remove access to a DriveItem. Only sharing permissions that are not inherited can be deleted.The inheritedFrom property must be null. + ## Delete navigation property permissions for drives ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of void ## @@ -45,12 +45,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Return the effective sharing permission for a particular permission resource. Effective permissions of an item can come from two sources: permissions set directly on the item itself or permissions that are inherited from the item's ancestors. Callers can differentiate if the permission is inherited or not by checking the inheritedFrom property.This property is an ItemReference resource referencing the ancestor that the permission is inherited from. + ## The set of permissions for the item. Read-only. Nullable. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of permission ## @@ -59,12 +58,11 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Permission.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Update the properties of a sharing permission by patching the permission resource. Only the roles property can be modified this way. + ## Update the navigation property permissions in drives ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of permission @@ -75,46 +73,46 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Permission.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Remove access to a DriveItem. Only sharing permissions that are not inherited can be deleted.The inheritedFrom property must be null. + ## Delete navigation property permissions for drives ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Return the effective sharing permission for a particular permission resource. Effective permissions of an item can come from two sources: permissions set directly on the item itself or permissions that are inherited from the item's ancestors. Callers can differentiate if the permission is inherited or not by checking the inheritedFrom property.This property is an ItemReference resource referencing the ancestor that the permission is inherited from. + ## The set of permissions for the item. Read-only. Nullable. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Update the properties of a sharing permission by patching the permission resource. Only the roles property can be modified this way. + ## Update the navigation property permissions in drives ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -122,20 +120,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a permission_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return PermissionItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Return the effective sharing permission for a particular permission resource. Effective permissions of an item can come from two sources: permissions set directly on the item itself or permissions that are inherited from the item's ancestors. Callers can differentiate if the permission is inherited or not by checking the inheritedFrom property.This property is an ItemReference resource referencing the ancestor that the permission is inherited from. + # The set of permissions for the item. Read-only. Nullable. class PermissionItemRequestBuilderGetQueryParameters ## diff --git a/lib/drives/item/items/item/permissions/permissions_request_builder.rb b/lib/drives/item/items/item/permissions/permissions_request_builder.rb index 0f272bc77f..b980560b25 100644 --- a/lib/drives/item/items/item/permissions/permissions_request_builder.rb +++ b/lib/drives/item/items/item/permissions/permissions_request_builder.rb @@ -44,10 +44,10 @@ def by_permission_id(permission_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/permissions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/permissions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## List the effective sharing permissions on a driveItem. + ## The set of permissions for the item. Read-only. Nullable. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of permission_collection_response ## @@ -56,8 +56,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::PermissionCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -72,26 +71,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Permission.create_from_discriminator_value(pn) }, error_mapping) end ## - ## List the effective sharing permissions on a driveItem. + ## The set of permissions for the item. Read-only. Nullable. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -103,20 +101,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a permissions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return PermissionsRequestBuilder.new(raw_url, @request_adapter) + end ## - # List the effective sharing permissions on a driveItem. + # The set of permissions for the item. Read-only. Nullable. class PermissionsRequestBuilderGetQueryParameters ## diff --git a/lib/drives/item/items/item/preview/preview_post_request_body.rb b/lib/drives/item/items/item/preview/preview_post_request_body.rb index f47c83b654..183c56761f 100644 --- a/lib/drives/item/items/item/preview/preview_post_request_body.rb +++ b/lib/drives/item/items/item/preview/preview_post_request_body.rb @@ -24,22 +24,22 @@ class PreviewPostRequestBody # The zoom property @zoom ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new previewPostRequestBody and sets the default values. + ## Instantiates a new PreviewPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/drives/item/items/item/preview/preview_request_builder.rb b/lib/drives/item/items/item/preview/preview_request_builder.rb index c03ca5af6c..e39fdd929c 100644 --- a/lib/drives/item/items/item/preview/preview_request_builder.rb +++ b/lib/drives/item/items/item/preview/preview_request_builder.rb @@ -39,8 +39,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ItemPreviewInfo.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -52,17 +51,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a preview_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return PreviewRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/restore/restore_post_request_body.rb b/lib/drives/item/items/item/restore/restore_post_request_body.rb index 1dfb6b4568..cc591d9626 100644 --- a/lib/drives/item/items/item/restore/restore_post_request_body.rb +++ b/lib/drives/item/items/item/restore/restore_post_request_body.rb @@ -25,22 +25,22 @@ class RestorePostRequestBody # The parentReference property @parent_reference ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new restorePostRequestBody and sets the default values. + ## Instantiates a new RestorePostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/drives/item/items/item/restore/restore_request_builder.rb b/lib/drives/item/items/item/restore/restore_request_builder.rb index 5c96ccbf8b..e0fea533df 100644 --- a/lib/drives/item/items/item/restore/restore_request_builder.rb +++ b/lib/drives/item/items/item/restore/restore_request_builder.rb @@ -28,7 +28,7 @@ def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/restore") end ## - ## Restore a driveItem that has been deleted and is currently in the recycle bin. NOTE: This functionality is currently only available for OneDrive Personal. + ## Restore a driveItem that has been deleted and is currently in the recycle bin. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of drive_item @@ -39,12 +39,11 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Restore a driveItem that has been deleted and is currently in the recycle bin. NOTE: This functionality is currently only available for OneDrive Personal. + ## Restore a driveItem that has been deleted and is currently in the recycle bin. ## @param body The request body ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information @@ -52,17 +51,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a restore_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RestoreRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/me/chats/item/messages/messages.rb b/lib/drives/item/items/item/retention_label/retention_label.rb similarity index 100% rename from lib/me/chats/item/messages/messages.rb rename to lib/drives/item/items/item/retention_label/retention_label.rb diff --git a/lib/drives/item/items/item/retention_label/retention_label_request_builder.rb b/lib/drives/item/items/item/retention_label/retention_label_request_builder.rb new file mode 100644 index 0000000000..8375367aab --- /dev/null +++ b/lib/drives/item/items/item/retention_label/retention_label_request_builder.rb @@ -0,0 +1,169 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/item_retention_label' +require_relative '../../../../../models/o_data_errors_o_data_error' +require_relative '../../../../drives' +require_relative '../../../item' +require_relative '../../items' +require_relative '../item' +require_relative './retention_label' + +module MicrosoftGraph + module Drives + module Item + module Items + module Item + module RetentionLabel + ## + # Provides operations to manage the retentionLabel property of the microsoft.graph.driveItem entity. + class RetentionLabelRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder + + ## + ## Instantiates a new RetentionLabelRequestBuilder and sets the default values. + ## @param path_parameters Path parameters for the request + ## @param request_adapter The request adapter to use to execute the requests. + ## @return a void + ## + def initialize(path_parameters, request_adapter) + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/retentionLabel{?%24expand,%24select}") + end + ## + ## Remove a retention label from a driveItem. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## Information about retention label and settings enforced on the driveItem. Read-write. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of item_retention_label + ## + def get(request_configuration=nil) + request_info = self.to_get_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ItemRetentionLabel.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Lock or unlock a retention label on a driveItem that classifies content as records. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint. For more information about how you can lock and unlock retention labels, see Use record versioning to update records stored in SharePoint or OneDrive. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of item_retention_label + ## + def patch(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = self.to_patch_request_information( + body, request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ItemRetentionLabel.create_from_discriminator_value(pn) }, error_mapping) + end + ## + ## Remove a retention label from a driveItem. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_delete_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Information about retention label and settings enforced on the driveItem. Read-write. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Lock or unlock a retention label on a driveItem that classifies content as records. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint. For more information about how you can lock and unlock retention labels, see Use record versioning to update records stored in SharePoint or OneDrive. + ## @param body The request body + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_patch_request_information(body, request_configuration=nil) + raise StandardError, 'body cannot be null' if body.nil? + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a retention_label_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RetentionLabelRequestBuilder.new(raw_url, @request_adapter) + end + + ## + # Information about retention label and settings enforced on the driveItem. Read-write. + class RetentionLabelRequestBuilderGetQueryParameters + + ## + # Expand related entities + attr_accessor :expand + ## + # Select properties to be returned + attr_accessor :select + ## + ## Maps the query parameters names to their encoded names for the URI template parsing. + ## @param original_name The original query parameter name in the class. + ## @return a string + ## + def get_query_parameter(original_name) + raise StandardError, 'original_name cannot be null' if original_name.nil? + case original_name + when "expand" + return "%24expand" + when "select" + return "%24select" + else + return original_name + end + end + end + end + end + end + end + end + end +end diff --git a/lib/drives/item/items/item/search_with_q/search_with_q.rb b/lib/drives/item/items/item/search_with_q/search_with_q.rb index e49209c0c2..4f6b6adf7d 100644 --- a/lib/drives/item/items/item/search_with_q/search_with_q.rb +++ b/lib/drives/item/items/item/search_with_q/search_with_q.rb @@ -1 +1 @@ -require_relative 'search_with_q_response' +require_relative 'search_with_q_get_response' diff --git a/lib/drives/item/items/item/search_with_q/search_with_q_get_response.rb b/lib/drives/item/items/item/search_with_q/search_with_q_get_response.rb new file mode 100644 index 0000000000..f2b4e17a82 --- /dev/null +++ b/lib/drives/item/items/item/search_with_q/search_with_q_get_response.rb @@ -0,0 +1,78 @@ +require 'microsoft_kiota_abstractions' +require_relative '../../../../../microsoft_graph' +require_relative '../../../../../models/base_collection_pagination_count_response' +require_relative '../../../../../models/drive_item' +require_relative '../../../../drives' +require_relative '../../../item' +require_relative '../../items' +require_relative '../item' +require_relative './search_with_q' + +module MicrosoftGraph + module Drives + module Item + module Items + module Item + module SearchWithQ + class SearchWithQGetResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse + include MicrosoftKiotaAbstractions::Parsable + ## + # The value property + @value + ## + ## Instantiates a new SearchWithQGetResponse and sets the default values. + ## @return a void + ## + def initialize() + super + end + ## + ## Creates a new instance of the appropriate class based on discriminator value + ## @param parse_node The parse node to use to read the discriminator value and create the object + ## @return a search_with_q_get_response + ## + def self.create_from_discriminator_value(parse_node) + raise StandardError, 'parse_node cannot be null' if parse_node.nil? + return SearchWithQGetResponse.new + end + ## + ## The deserialization information for the current model + ## @return a i_dictionary + ## + def get_field_deserializers() + return super.merge({ + "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }) }, + }) + end + ## + ## Serializes information the current object + ## @param writer Serialization writer to use to serialize this model + ## @return a void + ## + def serialize(writer) + raise StandardError, 'writer cannot be null' if writer.nil? + super + writer.write_collection_of_object_values("value", @value) + end + ## + ## Gets the value property value. The value property + ## @return a drive_item + ## + def value + return @value + end + ## + ## Sets the value property value. The value property + ## @param value Value to set for the value property. + ## @return a void + ## + def value=(value) + @value = value + end + end + end + end + end + end + end +end diff --git a/lib/drives/item/items/item/search_with_q/search_with_q_request_builder.rb b/lib/drives/item/items/item/search_with_q/search_with_q_request_builder.rb index 105e203af2..b1f7f9e79a 100644 --- a/lib/drives/item/items/item/search_with_q/search_with_q_request_builder.rb +++ b/lib/drives/item/items/item/search_with_q/search_with_q_request_builder.rb @@ -25,49 +25,60 @@ class SearchWithQRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter, q=nil) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/search(q='{q}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/search(q='{q}'){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Invoke function search + ## Search the hierarchy of items for items matching a query.You can search within a folder hierarchy, a whole drive, or files shared with the current user. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. - ## @return a Fiber of search_with_q_response + ## @return a Fiber of search_with_q_get_response ## def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Drives::Item::Items::Item::SearchWithQ::SearchWithQResponse.create_from_discriminator_value(pn) }, error_mapping) + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Drives::Item::Items::Item::SearchWithQ::SearchWithQGetResponse.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Invoke function search + ## Search the hierarchy of items for items matching a query.You can search within a folder hierarchy, a whole drive, or files shared with the current user. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a search_with_q_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SearchWithQRequestBuilder.new(raw_url, @request_adapter) + end ## - # Invoke function search + # Search the hierarchy of items for items matching a query.You can search within a folder hierarchy, a whole drive, or files shared with the current user. class SearchWithQRequestBuilderGetQueryParameters ## # Include count of items attr_accessor :count ## + # Expand related entities + attr_accessor :expand + ## # Filter items by property values attr_accessor :filter ## @@ -95,6 +106,8 @@ def get_query_parameter(original_name) case original_name when "count" return "%24count" + when "expand" + return "%24expand" when "filter" return "%24filter" when "orderby" diff --git a/lib/drives/item/items/item/search_with_q/search_with_q_response.rb b/lib/drives/item/items/item/search_with_q/search_with_q_response.rb deleted file mode 100644 index 88e35cd6ed..0000000000 --- a/lib/drives/item/items/item/search_with_q/search_with_q_response.rb +++ /dev/null @@ -1,78 +0,0 @@ -require 'microsoft_kiota_abstractions' -require_relative '../../../../../microsoft_graph' -require_relative '../../../../../models/base_collection_pagination_count_response' -require_relative '../../../../../models/drive_item' -require_relative '../../../../drives' -require_relative '../../../item' -require_relative '../../items' -require_relative '../item' -require_relative './search_with_q' - -module MicrosoftGraph - module Drives - module Item - module Items - module Item - module SearchWithQ - class SearchWithQResponse < MicrosoftGraph::Models::BaseCollectionPaginationCountResponse - include MicrosoftKiotaAbstractions::Parsable - ## - # The value property - @value - ## - ## Instantiates a new searchWithQResponse and sets the default values. - ## @return a void - ## - def initialize() - super - end - ## - ## Creates a new instance of the appropriate class based on discriminator value - ## @param parse_node The parse node to use to read the discriminator value and create the object - ## @return a search_with_q_response - ## - def self.create_from_discriminator_value(parse_node) - raise StandardError, 'parse_node cannot be null' if parse_node.nil? - return SearchWithQResponse.new - end - ## - ## The deserialization information for the current model - ## @return a i_dictionary - ## - def get_field_deserializers() - return super.merge({ - "value" => lambda {|n| @value = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DriveItem.create_from_discriminator_value(pn) }) }, - }) - end - ## - ## Serializes information the current object - ## @param writer Serialization writer to use to serialize this model - ## @return a void - ## - def serialize(writer) - raise StandardError, 'writer cannot be null' if writer.nil? - super - writer.write_collection_of_object_values("value", @value) - end - ## - ## Gets the value property value. The value property - ## @return a drive_item - ## - def value - return @value - end - ## - ## Sets the value property value. The value property - ## @param value Value to set for the value property. - ## @return a void - ## - def value=(value) - @value = value - end - end - end - end - end - end - end -end diff --git a/lib/drives/item/items/item/subscriptions/count/count_request_builder.rb b/lib/drives/item/items/item/subscriptions/count/count_request_builder.rb index ad3db10555..81d7097181 100644 --- a/lib/drives/item/items/item/subscriptions/count/count_request_builder.rb +++ b/lib/drives/item/items/item/subscriptions/count/count_request_builder.rb @@ -26,7 +26,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/subscriptions/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/subscriptions/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -38,8 +38,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -49,17 +48,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/drives/item/items/item/subscriptions/item/reauthorize/reauthorize_request_builder.rb b/lib/drives/item/items/item/subscriptions/item/reauthorize/reauthorize_request_builder.rb index 5fd7884b03..b0fa6d69c7 100644 --- a/lib/drives/item/items/item/subscriptions/item/reauthorize/reauthorize_request_builder.rb +++ b/lib/drives/item/items/item/subscriptions/item/reauthorize/reauthorize_request_builder.rb @@ -40,8 +40,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,15 +50,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a reauthorize_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ReauthorizeRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/subscriptions/item/subscription_item_request_builder.rb b/lib/drives/item/items/item/subscriptions/item/subscription_item_request_builder.rb index 892d6682f6..ff7236e397 100644 --- a/lib/drives/item/items/item/subscriptions/item/subscription_item_request_builder.rb +++ b/lib/drives/item/items/item/subscriptions/item/subscription_item_request_builder.rb @@ -33,7 +33,7 @@ def reauthorize() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/subscriptions/{subscription%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/subscriptions/{subscription%2Did}{?%24expand,%24select}") end ## ## Delete navigation property subscriptions for drives @@ -45,8 +45,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -59,8 +58,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Subscription.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -75,8 +73,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Subscription.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -86,13 +83,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -102,15 +100,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -122,17 +120,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a subscription_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SubscriptionItemRequestBuilder.new(raw_url, @request_adapter) + end ## # The set of subscriptions on the item. Only supported on the root of a drive. diff --git a/lib/drives/item/items/item/subscriptions/subscriptions_request_builder.rb b/lib/drives/item/items/item/subscriptions/subscriptions_request_builder.rb index 8c11c965aa..6dea35c353 100644 --- a/lib/drives/item/items/item/subscriptions/subscriptions_request_builder.rb +++ b/lib/drives/item/items/item/subscriptions/subscriptions_request_builder.rb @@ -44,7 +44,7 @@ def by_subscription_id(subscription_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/subscriptions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/subscriptions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## The set of subscriptions on the item. Only supported on the root of a drive. @@ -56,8 +56,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::SubscriptionCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -72,8 +71,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Subscription.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -83,15 +81,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -103,17 +101,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a subscriptions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return SubscriptionsRequestBuilder.new(raw_url, @request_adapter) + end ## # The set of subscriptions on the item. Only supported on the root of a drive. diff --git a/lib/drives/item/items/item/thumbnails/count/count_request_builder.rb b/lib/drives/item/items/item/thumbnails/count/count_request_builder.rb index 6b71fe866d..34ee4dfa70 100644 --- a/lib/drives/item/items/item/thumbnails/count/count_request_builder.rb +++ b/lib/drives/item/items/item/thumbnails/count/count_request_builder.rb @@ -26,7 +26,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/thumbnails/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/thumbnails/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -38,8 +38,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -49,17 +48,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/drives/item/items/item/thumbnails/item/thumbnail_set_item_request_builder.rb b/lib/drives/item/items/item/thumbnails/item/thumbnail_set_item_request_builder.rb index 854d6a1a8d..29197fc91c 100644 --- a/lib/drives/item/items/item/thumbnails/item/thumbnail_set_item_request_builder.rb +++ b/lib/drives/item/items/item/thumbnails/item/thumbnail_set_item_request_builder.rb @@ -27,7 +27,7 @@ class ThumbnailSetItemRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBu ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/thumbnails/{thumbnailSet%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/thumbnails/{thumbnailSet%2Did}{?%24expand,%24select}") end ## ## Delete navigation property thumbnails for drives @@ -39,12 +39,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Collection containing [ThumbnailSet][] objects associated with the item. For more info, see [getting thumbnails][]. Read-only. Nullable. + ## Collection of thumbnailSet objects associated with the item. For more information, see getting thumbnails. Read-only. Nullable. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of thumbnail_set ## @@ -53,8 +52,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ThumbnailSet.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -69,8 +67,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ThumbnailSet.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -80,31 +77,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Collection containing [ThumbnailSet][] objects associated with the item. For more info, see [getting thumbnails][]. Read-only. Nullable. + ## Collection of thumbnailSet objects associated with the item. For more information, see getting thumbnails. Read-only. Nullable. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -116,20 +114,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a thumbnail_set_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ThumbnailSetItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Collection containing [ThumbnailSet][] objects associated with the item. For more info, see [getting thumbnails][]. Read-only. Nullable. + # Collection of thumbnailSet objects associated with the item. For more information, see getting thumbnails. Read-only. Nullable. class ThumbnailSetItemRequestBuilderGetQueryParameters ## diff --git a/lib/drives/item/items/item/thumbnails/thumbnails_request_builder.rb b/lib/drives/item/items/item/thumbnails/thumbnails_request_builder.rb index 1068f84627..a98bf262f4 100644 --- a/lib/drives/item/items/item/thumbnails/thumbnails_request_builder.rb +++ b/lib/drives/item/items/item/thumbnails/thumbnails_request_builder.rb @@ -44,10 +44,10 @@ def by_thumbnail_set_id(thumbnail_set_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/thumbnails{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/thumbnails{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Retrieve a collection of ThumbnailSet resources for a DriveItem resource. A DriveItem can be represented by zero or more ThumbnailSet resources.Each thumbnailSet can have one or more thumbnail objects, which are images that represent the item.For example, a thumbnailSet may include thumbnail objects, such as common ones including small, medium, or large. There are many ways to work with thumbnails on OneDrive.Here are the most common ones: + ## Collection of thumbnailSet objects associated with the item. For more information, see getting thumbnails. Read-only. Nullable. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of thumbnail_set_collection_response ## @@ -56,8 +56,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ThumbnailSetCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -72,26 +71,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::ThumbnailSet.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Retrieve a collection of ThumbnailSet resources for a DriveItem resource. A DriveItem can be represented by zero or more ThumbnailSet resources.Each thumbnailSet can have one or more thumbnail objects, which are images that represent the item.For example, a thumbnailSet may include thumbnail objects, such as common ones including small, medium, or large. There are many ways to work with thumbnails on OneDrive.Here are the most common ones: + ## Collection of thumbnailSet objects associated with the item. For more information, see getting thumbnails. Read-only. Nullable. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -103,20 +101,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a thumbnails_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ThumbnailsRequestBuilder.new(raw_url, @request_adapter) + end ## - # Retrieve a collection of ThumbnailSet resources for a DriveItem resource. A DriveItem can be represented by zero or more ThumbnailSet resources.Each thumbnailSet can have one or more thumbnail objects, which are images that represent the item.For example, a thumbnailSet may include thumbnail objects, such as common ones including small, medium, or large. There are many ways to work with thumbnails on OneDrive.Here are the most common ones: + # Collection of thumbnailSet objects associated with the item. For more information, see getting thumbnails. Read-only. Nullable. class ThumbnailsRequestBuilderGetQueryParameters ## diff --git a/lib/drives/item/items/item/unfollow/unfollow_request_builder.rb b/lib/drives/item/items/item/unfollow/unfollow_request_builder.rb index 53358bfa1d..3a126dd5a2 100644 --- a/lib/drives/item/items/item/unfollow/unfollow_request_builder.rb +++ b/lib/drives/item/items/item/unfollow/unfollow_request_builder.rb @@ -36,8 +36,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -47,15 +46,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a unfollow_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return UnfollowRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/validate_permission/validate_permission_post_request_body.rb b/lib/drives/item/items/item/validate_permission/validate_permission_post_request_body.rb index f539dda60f..9a73d5c1c8 100644 --- a/lib/drives/item/items/item/validate_permission/validate_permission_post_request_body.rb +++ b/lib/drives/item/items/item/validate_permission/validate_permission_post_request_body.rb @@ -24,15 +24,15 @@ class ValidatePermissionPostRequestBody # The password property @password ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -54,7 +54,7 @@ def challenge_token=(value) @challenge_token = value end ## - ## Instantiates a new validatePermissionPostRequestBody and sets the default values. + ## Instantiates a new ValidatePermissionPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/drives/item/items/item/validate_permission/validate_permission_request_builder.rb b/lib/drives/item/items/item/validate_permission/validate_permission_request_builder.rb index f98af781b5..4d33c479be 100644 --- a/lib/drives/item/items/item/validate_permission/validate_permission_request_builder.rb +++ b/lib/drives/item/items/item/validate_permission/validate_permission_request_builder.rb @@ -38,8 +38,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,16 +50,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a validate_permission_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ValidatePermissionRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/versions/count/count_request_builder.rb b/lib/drives/item/items/item/versions/count/count_request_builder.rb index a0170b0fb6..c130fb8191 100644 --- a/lib/drives/item/items/item/versions/count/count_request_builder.rb +++ b/lib/drives/item/items/item/versions/count/count_request_builder.rb @@ -26,7 +26,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/versions/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/versions/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -38,8 +38,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -49,17 +48,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/drives/item/items/item/versions/item/content/content_request_builder.rb b/lib/drives/item/items/item/versions/item/content/content_request_builder.rb index 03df62db95..921bc08280 100644 --- a/lib/drives/item/items/item/versions/item/content/content_request_builder.rb +++ b/lib/drives/item/items/item/versions/item/content/content_request_builder.rb @@ -34,6 +34,19 @@ def initialize(path_parameters, request_adapter) ## ## The content stream for this version of the item. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a Fiber of void + ## + def delete(request_configuration=nil) + request_info = self.to_delete_request_information( + request_configuration + ) + error_mapping = Hash.new + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + return @request_adapter.send_async(request_info, nil, error_mapping) + end + ## + ## The content stream for this version of the item. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of binary ## def get(request_configuration=nil) @@ -41,8 +54,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, Binary, error_mapping) end ## @@ -57,8 +69,7 @@ def put(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DriveItemVersion.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -66,15 +77,33 @@ def put(body, request_configuration=nil) ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## - def to_get_request_information(request_configuration=nil) + def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() + unless request_configuration.nil? + request_info.add_headers_from_raw_object(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + end request_info.url_template = @url_template request_info.path_parameters = @path_parameters - request_info.http_method = :GET + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') + return request_info + end + ## + ## The content stream for this version of the item. + ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. + ## @return a request_information + ## + def to_get_request_information(request_configuration=nil) + request_info = MicrosoftKiotaAbstractions::RequestInformation.new() unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/octet-stream, application/json') return request_info end ## @@ -86,17 +115,26 @@ def to_get_request_information(request_configuration=nil) def to_put_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PUT - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "", body) + request_info.set_content_from_parsable(@request_adapter, 'application/octet-stream', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PUT + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a content_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ContentRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/versions/item/drive_item_version_item_request_builder.rb b/lib/drives/item/items/item/versions/item/drive_item_version_item_request_builder.rb index 24471c49b5..e3fc3701ff 100644 --- a/lib/drives/item/items/item/versions/item/drive_item_version_item_request_builder.rb +++ b/lib/drives/item/items/item/versions/item/drive_item_version_item_request_builder.rb @@ -39,7 +39,7 @@ def restore_version() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/versions/{driveItemVersion%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/versions/{driveItemVersion%2Did}{?%24expand,%24select}") end ## ## Delete navigation property versions for drives @@ -51,12 +51,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Retrieve the metadata for a specific version of a DriveItem. + ## The list of previous versions of the item. For more info, see getting previous versions. Read-only. Nullable. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of drive_item_version ## @@ -65,8 +64,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DriveItemVersion.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -81,8 +79,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DriveItemVersion.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -92,31 +89,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Retrieve the metadata for a specific version of a DriveItem. + ## The list of previous versions of the item. For more info, see getting previous versions. Read-only. Nullable. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -128,20 +126,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a drive_item_version_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DriveItemVersionItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Retrieve the metadata for a specific version of a DriveItem. + # The list of previous versions of the item. For more info, see getting previous versions. Read-only. Nullable. class DriveItemVersionItemRequestBuilderGetQueryParameters ## diff --git a/lib/drives/item/items/item/versions/item/restore_version/restore_version_request_builder.rb b/lib/drives/item/items/item/versions/item/restore_version/restore_version_request_builder.rb index f60931178b..1e651bb42b 100644 --- a/lib/drives/item/items/item/versions/item/restore_version/restore_version_request_builder.rb +++ b/lib/drives/item/items/item/versions/item/restore_version/restore_version_request_builder.rb @@ -40,8 +40,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -51,15 +50,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a restore_version_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RestoreVersionRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/versions/versions_request_builder.rb b/lib/drives/item/items/item/versions/versions_request_builder.rb index 86b73356c2..7c2ec9566a 100644 --- a/lib/drives/item/items/item/versions/versions_request_builder.rb +++ b/lib/drives/item/items/item/versions/versions_request_builder.rb @@ -44,10 +44,10 @@ def by_drive_item_version_id(drive_item_version_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/versions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/versions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## OneDrive and SharePoint can be configured to retain the history for files.Depending on the service and configuration, a new version can be created for each edit, each time the file is saved, manually, or never. Previous versions of a document may be retained for a finite period of time depending on admin settings which may be unique per user or location. + ## The list of previous versions of the item. For more info, see getting previous versions. Read-only. Nullable. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of drive_item_version_collection_response ## @@ -56,8 +56,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DriveItemVersionCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -72,26 +71,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::DriveItemVersion.create_from_discriminator_value(pn) }, error_mapping) end ## - ## OneDrive and SharePoint can be configured to retain the history for files.Depending on the service and configuration, a new version can be created for each edit, each time the file is saved, manually, or never. Previous versions of a document may be retained for a finite period of time depending on admin settings which may be unique per user or location. + ## The list of previous versions of the item. For more info, see getting previous versions. Read-only. Nullable. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -103,20 +101,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a versions_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return VersionsRequestBuilder.new(raw_url, @request_adapter) + end ## - # OneDrive and SharePoint can be configured to retain the history for files.Depending on the service and configuration, a new version can be created for each edit, each time the file is saved, manually, or never. Previous versions of a document may be retained for a finite period of time depending on admin settings which may be unique per user or location. + # The list of previous versions of the item. For more info, see getting previous versions. Read-only. Nullable. class VersionsRequestBuilderGetQueryParameters ## diff --git a/lib/drives/item/items/item/workbook/application/application_request_builder.rb b/lib/drives/item/items/item/workbook/application/application_request_builder.rb index 60b1ee6a6f..2d01694e69 100644 --- a/lib/drives/item/items/item/workbook/application/application_request_builder.rb +++ b/lib/drives/item/items/item/workbook/application/application_request_builder.rb @@ -33,7 +33,7 @@ def calculate() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/application{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/application{?%24expand,%24select}") end ## ## Delete navigation property application for drives @@ -45,12 +45,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Retrieve the properties and relationships of a workbookApplication object. + ## Get application from drives ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of workbook_application ## @@ -59,8 +58,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookApplication.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -75,8 +73,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookApplication.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -86,31 +83,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Retrieve the properties and relationships of a workbookApplication object. + ## Get application from drives ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -122,20 +120,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a application_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ApplicationRequestBuilder.new(raw_url, @request_adapter) + end ## - # Retrieve the properties and relationships of a workbookApplication object. + # Get application from drives class ApplicationRequestBuilderGetQueryParameters ## diff --git a/lib/drives/item/items/item/workbook/application/calculate/calculate_post_request_body.rb b/lib/drives/item/items/item/workbook/application/calculate/calculate_post_request_body.rb index 088c72e055..489f3e88d8 100644 --- a/lib/drives/item/items/item/workbook/application/calculate/calculate_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/application/calculate/calculate_post_request_body.rb @@ -25,15 +25,15 @@ class CalculatePostRequestBody # The calculationType property @calculation_type ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -55,7 +55,7 @@ def calculation_type=(value) @calculation_type = value end ## - ## Instantiates a new calculatePostRequestBody and sets the default values. + ## Instantiates a new CalculatePostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/drives/item/items/item/workbook/application/calculate/calculate_request_builder.rb b/lib/drives/item/items/item/workbook/application/calculate/calculate_request_builder.rb index f6ac4e36ac..6d4625775d 100644 --- a/lib/drives/item/items/item/workbook/application/calculate/calculate_request_builder.rb +++ b/lib/drives/item/items/item/workbook/application/calculate/calculate_request_builder.rb @@ -42,8 +42,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -55,16 +54,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a calculate_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CalculateRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/close_session/close_session_request_builder.rb b/lib/drives/item/items/item/workbook/close_session/close_session_request_builder.rb index 9ea459ca68..13141aa324 100644 --- a/lib/drives/item/items/item/workbook/close_session/close_session_request_builder.rb +++ b/lib/drives/item/items/item/workbook/close_session/close_session_request_builder.rb @@ -38,8 +38,7 @@ def post(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -49,15 +48,25 @@ def post(request_configuration=nil) ## def to_post_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a close_session_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CloseSessionRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/comments/comments_request_builder.rb b/lib/drives/item/items/item/workbook/comments/comments_request_builder.rb index c7bbffb8db..39d996fd5c 100644 --- a/lib/drives/item/items/item/workbook/comments/comments_request_builder.rb +++ b/lib/drives/item/items/item/workbook/comments/comments_request_builder.rb @@ -46,7 +46,7 @@ def by_workbook_comment_id(workbook_comment_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/comments{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/comments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## ## Represents a collection of comments in a workbook. @@ -58,8 +58,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookCommentCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -74,8 +73,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookComment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -85,15 +83,15 @@ def post(body, request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -105,17 +103,26 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a comments_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CommentsRequestBuilder.new(raw_url, @request_adapter) + end ## # Represents a collection of comments in a workbook. diff --git a/lib/drives/item/items/item/workbook/comments/count/count_request_builder.rb b/lib/drives/item/items/item/workbook/comments/count/count_request_builder.rb index da415ab066..d5d2e9f5d2 100644 --- a/lib/drives/item/items/item/workbook/comments/count/count_request_builder.rb +++ b/lib/drives/item/items/item/workbook/comments/count/count_request_builder.rb @@ -28,7 +28,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/comments/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/comments/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -40,8 +40,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -51,17 +50,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/drives/item/items/item/workbook/comments/item/replies/count/count_request_builder.rb b/lib/drives/item/items/item/workbook/comments/item/replies/count/count_request_builder.rb index c476a302da..371ba6a2ca 100644 --- a/lib/drives/item/items/item/workbook/comments/item/replies/count/count_request_builder.rb +++ b/lib/drives/item/items/item/workbook/comments/item/replies/count/count_request_builder.rb @@ -32,7 +32,7 @@ class CountRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/comments/{workbookComment%2Did}/replies/$count{?%24search,%24filter}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/comments/{workbookComment%2Did}/replies/$count{?%24filter,%24search}") end ## ## Get the number of the resource @@ -44,8 +44,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, number, error_mapping) end ## @@ -55,17 +54,26 @@ def get(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'text/plain') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'text/plain;q=0.9') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end ## # Get the number of the resource diff --git a/lib/drives/item/items/item/workbook/comments/item/replies/item/workbook_comment_reply_item_request_builder.rb b/lib/drives/item/items/item/workbook/comments/item/replies/item/workbook_comment_reply_item_request_builder.rb index dec61a2cc8..93da321069 100644 --- a/lib/drives/item/items/item/workbook/comments/item/replies/item/workbook_comment_reply_item_request_builder.rb +++ b/lib/drives/item/items/item/workbook/comments/item/replies/item/workbook_comment_reply_item_request_builder.rb @@ -33,7 +33,7 @@ class WorkbookCommentReplyItemRequestBuilder < MicrosoftKiotaAbstractions::BaseR ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/comments/{workbookComment%2Did}/replies/{workbookCommentReply%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/comments/{workbookComment%2Did}/replies/{workbookCommentReply%2Did}{?%24expand,%24select}") end ## ## Delete navigation property replies for drives @@ -45,12 +45,11 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## - ## Retrieve the properties and relationships of workbookCommentReply object. + ## The list of replies to the comment. Read-only. Nullable. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of workbook_comment_reply ## @@ -59,8 +58,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookCommentReply.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -75,8 +73,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookCommentReply.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -86,31 +83,32 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## - ## Retrieve the properties and relationships of workbookCommentReply object. + ## The list of replies to the comment. Read-only. Nullable. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -122,20 +120,29 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a workbook_comment_reply_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return WorkbookCommentReplyItemRequestBuilder.new(raw_url, @request_adapter) + end ## - # Retrieve the properties and relationships of workbookCommentReply object. + # The list of replies to the comment. Read-only. Nullable. class WorkbookCommentReplyItemRequestBuilderGetQueryParameters ## diff --git a/lib/drives/item/items/item/workbook/comments/item/replies/replies_request_builder.rb b/lib/drives/item/items/item/workbook/comments/item/replies/replies_request_builder.rb index a35c1ff8a9..b357f83012 100644 --- a/lib/drives/item/items/item/workbook/comments/item/replies/replies_request_builder.rb +++ b/lib/drives/item/items/item/workbook/comments/item/replies/replies_request_builder.rb @@ -50,10 +50,10 @@ def by_workbook_comment_reply_id(workbook_comment_reply_id) ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/comments/{workbookComment%2Did}/replies{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/comments/{workbookComment%2Did}/replies{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}") end ## - ## Retrieve the properties and relationships of workbookCommentReply object. + ## The list of replies to the comment. Read-only. Nullable. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a Fiber of workbook_comment_reply_collection_response ## @@ -62,8 +62,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookCommentReplyCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -78,26 +77,25 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookCommentReply.create_from_discriminator_value(pn) }, error_mapping) end ## - ## Retrieve the properties and relationships of workbookCommentReply object. + ## The list of replies to the comment. Read-only. Nullable. ## @param request_configuration Configuration for the request such as headers, query parameters, and middleware options. ## @return a request_information ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -109,20 +107,29 @@ def to_get_request_information(request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a replies_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return RepliesRequestBuilder.new(raw_url, @request_adapter) + end ## - # Retrieve the properties and relationships of workbookCommentReply object. + # The list of replies to the comment. Read-only. Nullable. class RepliesRequestBuilderGetQueryParameters ## diff --git a/lib/drives/item/items/item/workbook/comments/item/workbook_comment_item_request_builder.rb b/lib/drives/item/items/item/workbook/comments/item/workbook_comment_item_request_builder.rb index 5d3b962d36..648f319eb5 100644 --- a/lib/drives/item/items/item/workbook/comments/item/workbook_comment_item_request_builder.rb +++ b/lib/drives/item/items/item/workbook/comments/item/workbook_comment_item_request_builder.rb @@ -35,7 +35,7 @@ def replies() ## @return a void ## def initialize(path_parameters, request_adapter) - super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/comments/{workbookComment%2Did}{?%24select,%24expand}") + super(path_parameters, request_adapter, "{+baseurl}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/comments/{workbookComment%2Did}{?%24expand,%24select}") end ## ## Delete navigation property comments for drives @@ -47,8 +47,7 @@ def delete(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end ## @@ -61,8 +60,7 @@ def get(request_configuration=nil) request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookComment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -77,8 +75,7 @@ def patch(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookComment.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -88,13 +85,14 @@ def patch(body, request_configuration=nil) ## def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :DELETE + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -104,15 +102,15 @@ def to_delete_request_information(request_configuration=nil) ## def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :GET - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.add_request_options(request_configuration.options) end + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :GET + request_info.headers.try_add('Accept', 'application/json') return request_info end ## @@ -124,17 +122,26 @@ def to_get_request_information(request_configuration=nil) def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :PATCH - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :PATCH + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a workbook_comment_item_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return WorkbookCommentItemRequestBuilder.new(raw_url, @request_adapter) + end ## # Represents a collection of comments in a workbook. diff --git a/lib/drives/item/items/item/workbook/create_session/create_session_post_request_body.rb b/lib/drives/item/items/item/workbook/create_session/create_session_post_request_body.rb index fa30ce6a4c..8689bbd5fe 100644 --- a/lib/drives/item/items/item/workbook/create_session/create_session_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/create_session/create_session_post_request_body.rb @@ -23,22 +23,22 @@ class CreateSessionPostRequestBody # The persistChanges property @persist_changes ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new createSessionPostRequestBody and sets the default values. + ## Instantiates a new CreateSessionPostRequestBody and sets the default values. ## @return a void ## def initialize() diff --git a/lib/drives/item/items/item/workbook/create_session/create_session_request_builder.rb b/lib/drives/item/items/item/workbook/create_session/create_session_request_builder.rb index a5b9f1b1c9..5edcbde046 100644 --- a/lib/drives/item/items/item/workbook/create_session/create_session_request_builder.rb +++ b/lib/drives/item/items/item/workbook/create_session/create_session_request_builder.rb @@ -41,8 +41,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookSessionInfo.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -54,17 +53,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a create_session_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CreateSessionRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/abs/abs_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/abs/abs_post_request_body.rb index 54c6125d7b..20da383954 100644 --- a/lib/drives/item/items/item/workbook/functions/abs/abs_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/abs/abs_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class AbsPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new absPostRequestBody and sets the default values. + ## Instantiates a new AbsPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,32 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/abs/abs_request_builder.rb b/lib/drives/item/items/item/workbook/functions/abs/abs_request_builder.rb index 1798e8429e..a98dce8c45 100644 --- a/lib/drives/item/items/item/workbook/functions/abs/abs_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/abs/abs_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a abs_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AbsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/accr_int/accr_int_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/accr_int/accr_int_post_request_body.rb index d4f31764e6..5b73762daa 100644 --- a/lib/drives/item/items/item/workbook/functions/accr_int/accr_int_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/accr_int/accr_int_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,76 +22,22 @@ class AccrIntPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The basis property - @basis - ## - # The calcMethod property - @calc_method - ## - # The firstInterest property - @first_interest - ## - # The frequency property - @frequency - ## - # The issue property - @issue - ## - # The par property - @par - ## - # The rate property - @rate - ## - # The settlement property - @settlement - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Gets the basis property value. The basis property - ## @return a json - ## - def basis - return @basis - end - ## - ## Sets the basis property value. The basis property - ## @param value Value to set for the basis property. - ## @return a void - ## - def basis=(value) - @basis = value - end - ## - ## Gets the calcMethod property value. The calcMethod property - ## @return a json - ## - def calc_method - return @calc_method - end - ## - ## Sets the calcMethod property value. The calcMethod property - ## @param value Value to set for the calcMethod property. - ## @return a void - ## - def calc_method=(value) - @calc_method = value - end - ## - ## Instantiates a new accrIntPostRequestBody and sets the default values. + ## Instantiates a new AccrIntPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -108,128 +53,22 @@ def self.create_from_discriminator_value(parse_node) return AccrIntPostRequestBody.new end ## - ## Gets the firstInterest property value. The firstInterest property - ## @return a json - ## - def first_interest - return @first_interest - end - ## - ## Sets the firstInterest property value. The firstInterest property - ## @param value Value to set for the firstInterest property. - ## @return a void - ## - def first_interest=(value) - @first_interest = value - end - ## - ## Gets the frequency property value. The frequency property - ## @return a json - ## - def frequency - return @frequency - end - ## - ## Sets the frequency property value. The frequency property - ## @param value Value to set for the frequency property. - ## @return a void - ## - def frequency=(value) - @frequency = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "basis" => lambda {|n| @basis = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "calcMethod" => lambda {|n| @calc_method = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "firstInterest" => lambda {|n| @first_interest = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "frequency" => lambda {|n| @frequency = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "issue" => lambda {|n| @issue = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "par" => lambda {|n| @par = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "rate" => lambda {|n| @rate = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "settlement" => lambda {|n| @settlement = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the issue property value. The issue property - ## @return a json - ## - def issue - return @issue - end - ## - ## Sets the issue property value. The issue property - ## @param value Value to set for the issue property. - ## @return a void - ## - def issue=(value) - @issue = value - end - ## - ## Gets the par property value. The par property - ## @return a json - ## - def par - return @par - end - ## - ## Sets the par property value. The par property - ## @param value Value to set for the par property. - ## @return a void - ## - def par=(value) - @par = value - end - ## - ## Gets the rate property value. The rate property - ## @return a json - ## - def rate - return @rate - end - ## - ## Sets the rate property value. The rate property - ## @param value Value to set for the rate property. - ## @return a void - ## - def rate=(value) - @rate = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("basis", @basis) - writer.write_object_value("calcMethod", @calc_method) - writer.write_object_value("firstInterest", @first_interest) - writer.write_object_value("frequency", @frequency) - writer.write_object_value("issue", @issue) - writer.write_object_value("par", @par) - writer.write_object_value("rate", @rate) - writer.write_object_value("settlement", @settlement) writer.write_additional_data(@additional_data) end - ## - ## Gets the settlement property value. The settlement property - ## @return a json - ## - def settlement - return @settlement - end - ## - ## Sets the settlement property value. The settlement property - ## @param value Value to set for the settlement property. - ## @return a void - ## - def settlement=(value) - @settlement = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/accr_int/accr_int_request_builder.rb b/lib/drives/item/items/item/workbook/functions/accr_int/accr_int_request_builder.rb index fd402027f3..9b24227dd7 100644 --- a/lib/drives/item/items/item/workbook/functions/accr_int/accr_int_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/accr_int/accr_int_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a accr_int_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AccrIntRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/accr_int_m/accr_int_m_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/accr_int_m/accr_int_m_post_request_body.rb index 6143b4048d..c8f9a05711 100644 --- a/lib/drives/item/items/item/workbook/functions/accr_int_m/accr_int_m_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/accr_int_m/accr_int_m_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,52 +22,22 @@ class AccrIntMPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The basis property - @basis - ## - # The issue property - @issue - ## - # The par property - @par - ## - # The rate property - @rate - ## - # The settlement property - @settlement - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Gets the basis property value. The basis property - ## @return a json - ## - def basis - return @basis - end - ## - ## Sets the basis property value. The basis property - ## @param value Value to set for the basis property. - ## @return a void - ## - def basis=(value) - @basis = value - end - ## - ## Instantiates a new accrIntMPostRequestBody and sets the default values. + ## Instantiates a new AccrIntMPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -89,87 +58,17 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "basis" => lambda {|n| @basis = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "issue" => lambda {|n| @issue = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "par" => lambda {|n| @par = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "rate" => lambda {|n| @rate = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "settlement" => lambda {|n| @settlement = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the issue property value. The issue property - ## @return a json - ## - def issue - return @issue - end - ## - ## Sets the issue property value. The issue property - ## @param value Value to set for the issue property. - ## @return a void - ## - def issue=(value) - @issue = value - end - ## - ## Gets the par property value. The par property - ## @return a json - ## - def par - return @par - end - ## - ## Sets the par property value. The par property - ## @param value Value to set for the par property. - ## @return a void - ## - def par=(value) - @par = value - end - ## - ## Gets the rate property value. The rate property - ## @return a json - ## - def rate - return @rate - end - ## - ## Sets the rate property value. The rate property - ## @param value Value to set for the rate property. - ## @return a void - ## - def rate=(value) - @rate = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("basis", @basis) - writer.write_object_value("issue", @issue) - writer.write_object_value("par", @par) - writer.write_object_value("rate", @rate) - writer.write_object_value("settlement", @settlement) writer.write_additional_data(@additional_data) end - ## - ## Gets the settlement property value. The settlement property - ## @return a json - ## - def settlement - return @settlement - end - ## - ## Sets the settlement property value. The settlement property - ## @param value Value to set for the settlement property. - ## @return a void - ## - def settlement=(value) - @settlement = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/accr_int_m/accr_int_m_request_builder.rb b/lib/drives/item/items/item/workbook/functions/accr_int_m/accr_int_m_request_builder.rb index 6006cfe032..24a9304cfd 100644 --- a/lib/drives/item/items/item/workbook/functions/accr_int_m/accr_int_m_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/accr_int_m/accr_int_m_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a accr_int_m_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AccrIntMRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/acos/acos_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/acos/acos_post_request_body.rb index dc7ce1d61f..f28bb48b66 100644 --- a/lib/drives/item/items/item/workbook/functions/acos/acos_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/acos/acos_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class AcosPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new acosPostRequestBody and sets the default values. + ## Instantiates a new AcosPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,32 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/acos/acos_request_builder.rb b/lib/drives/item/items/item/workbook/functions/acos/acos_request_builder.rb index f35246b3a3..0ba0248679 100644 --- a/lib/drives/item/items/item/workbook/functions/acos/acos_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/acos/acos_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a acos_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AcosRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/acosh/acosh_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/acosh/acosh_post_request_body.rb index 859ceef0fb..4f58418f60 100644 --- a/lib/drives/item/items/item/workbook/functions/acosh/acosh_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/acosh/acosh_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class AcoshPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new acoshPostRequestBody and sets the default values. + ## Instantiates a new AcoshPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,32 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/acosh/acosh_request_builder.rb b/lib/drives/item/items/item/workbook/functions/acosh/acosh_request_builder.rb index 9a76039267..04dee35029 100644 --- a/lib/drives/item/items/item/workbook/functions/acosh/acosh_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/acosh/acosh_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a acosh_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AcoshRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/acot/acot_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/acot/acot_post_request_body.rb index d949dcaf9e..cf4263b92f 100644 --- a/lib/drives/item/items/item/workbook/functions/acot/acot_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/acot/acot_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class AcotPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new acotPostRequestBody and sets the default values. + ## Instantiates a new AcotPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,32 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/acot/acot_request_builder.rb b/lib/drives/item/items/item/workbook/functions/acot/acot_request_builder.rb index dd07961c71..eaca5e925c 100644 --- a/lib/drives/item/items/item/workbook/functions/acot/acot_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/acot/acot_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a acot_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AcotRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/acoth/acoth_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/acoth/acoth_post_request_body.rb index 3f1eef487e..5e1aeb5277 100644 --- a/lib/drives/item/items/item/workbook/functions/acoth/acoth_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/acoth/acoth_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class AcothPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new acothPostRequestBody and sets the default values. + ## Instantiates a new AcothPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,32 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/acoth/acoth_request_builder.rb b/lib/drives/item/items/item/workbook/functions/acoth/acoth_request_builder.rb index f86a275dfe..56009a4cbc 100644 --- a/lib/drives/item/items/item/workbook/functions/acoth/acoth_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/acoth/acoth_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a acoth_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AcothRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/amor_degrc/amor_degrc_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/amor_degrc/amor_degrc_post_request_body.rb index ab518ba158..7034ac2786 100644 --- a/lib/drives/item/items/item/workbook/functions/amor_degrc/amor_degrc_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/amor_degrc/amor_degrc_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,79 +22,28 @@ class AmorDegrcPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The basis property - @basis - ## - # The cost property - @cost - ## - # The datePurchased property - @date_purchased - ## - # The firstPeriod property - @first_period - ## - # The period property - @period - ## - # The rate property - @rate - ## - # The salvage property - @salvage - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Gets the basis property value. The basis property - ## @return a json - ## - def basis - return @basis - end - ## - ## Sets the basis property value. The basis property - ## @param value Value to set for the basis property. - ## @return a void - ## - def basis=(value) - @basis = value - end - ## - ## Instantiates a new amorDegrcPostRequestBody and sets the default values. + ## Instantiates a new AmorDegrcPostRequestBody and sets the default values. ## @return a void ## def initialize() @additional_data = Hash.new end ## - ## Gets the cost property value. The cost property - ## @return a json - ## - def cost - return @cost - end - ## - ## Sets the cost property value. The cost property - ## @param value Value to set for the cost property. - ## @return a void - ## - def cost=(value) - @cost = value - end - ## ## Creates a new instance of the appropriate class based on discriminator value ## @param parse_node The parse node to use to read the discriminator value and create the object ## @return a amor_degrc_post_request_body @@ -105,109 +53,20 @@ def self.create_from_discriminator_value(parse_node) return AmorDegrcPostRequestBody.new end ## - ## Gets the datePurchased property value. The datePurchased property - ## @return a json - ## - def date_purchased - return @date_purchased - end - ## - ## Sets the datePurchased property value. The datePurchased property - ## @param value Value to set for the datePurchased property. - ## @return a void - ## - def date_purchased=(value) - @date_purchased = value - end - ## - ## Gets the firstPeriod property value. The firstPeriod property - ## @return a json - ## - def first_period - return @first_period - end - ## - ## Sets the firstPeriod property value. The firstPeriod property - ## @param value Value to set for the firstPeriod property. - ## @return a void - ## - def first_period=(value) - @first_period = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "basis" => lambda {|n| @basis = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "cost" => lambda {|n| @cost = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "datePurchased" => lambda {|n| @date_purchased = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "firstPeriod" => lambda {|n| @first_period = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "period" => lambda {|n| @period = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "rate" => lambda {|n| @rate = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "salvage" => lambda {|n| @salvage = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the period property value. The period property - ## @return a json - ## - def period - return @period - end - ## - ## Sets the period property value. The period property - ## @param value Value to set for the period property. - ## @return a void - ## - def period=(value) - @period = value - end - ## - ## Gets the rate property value. The rate property - ## @return a json - ## - def rate - return @rate - end - ## - ## Sets the rate property value. The rate property - ## @param value Value to set for the rate property. - ## @return a void - ## - def rate=(value) - @rate = value - end - ## - ## Gets the salvage property value. The salvage property - ## @return a json - ## - def salvage - return @salvage - end - ## - ## Sets the salvage property value. The salvage property - ## @param value Value to set for the salvage property. - ## @return a void - ## - def salvage=(value) - @salvage = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("basis", @basis) - writer.write_object_value("cost", @cost) - writer.write_object_value("datePurchased", @date_purchased) - writer.write_object_value("firstPeriod", @first_period) - writer.write_object_value("period", @period) - writer.write_object_value("rate", @rate) - writer.write_object_value("salvage", @salvage) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/amor_degrc/amor_degrc_request_builder.rb b/lib/drives/item/items/item/workbook/functions/amor_degrc/amor_degrc_request_builder.rb index efb5567f9f..1eee377647 100644 --- a/lib/drives/item/items/item/workbook/functions/amor_degrc/amor_degrc_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/amor_degrc/amor_degrc_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a amor_degrc_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AmorDegrcRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/amor_linc/amor_linc_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/amor_linc/amor_linc_post_request_body.rb index 3fcf79858c..cdb9709874 100644 --- a/lib/drives/item/items/item/workbook/functions/amor_linc/amor_linc_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/amor_linc/amor_linc_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,79 +22,28 @@ class AmorLincPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The basis property - @basis - ## - # The cost property - @cost - ## - # The datePurchased property - @date_purchased - ## - # The firstPeriod property - @first_period - ## - # The period property - @period - ## - # The rate property - @rate - ## - # The salvage property - @salvage - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Gets the basis property value. The basis property - ## @return a json - ## - def basis - return @basis - end - ## - ## Sets the basis property value. The basis property - ## @param value Value to set for the basis property. - ## @return a void - ## - def basis=(value) - @basis = value - end - ## - ## Instantiates a new amorLincPostRequestBody and sets the default values. + ## Instantiates a new AmorLincPostRequestBody and sets the default values. ## @return a void ## def initialize() @additional_data = Hash.new end ## - ## Gets the cost property value. The cost property - ## @return a json - ## - def cost - return @cost - end - ## - ## Sets the cost property value. The cost property - ## @param value Value to set for the cost property. - ## @return a void - ## - def cost=(value) - @cost = value - end - ## ## Creates a new instance of the appropriate class based on discriminator value ## @param parse_node The parse node to use to read the discriminator value and create the object ## @return a amor_linc_post_request_body @@ -105,109 +53,20 @@ def self.create_from_discriminator_value(parse_node) return AmorLincPostRequestBody.new end ## - ## Gets the datePurchased property value. The datePurchased property - ## @return a json - ## - def date_purchased - return @date_purchased - end - ## - ## Sets the datePurchased property value. The datePurchased property - ## @param value Value to set for the datePurchased property. - ## @return a void - ## - def date_purchased=(value) - @date_purchased = value - end - ## - ## Gets the firstPeriod property value. The firstPeriod property - ## @return a json - ## - def first_period - return @first_period - end - ## - ## Sets the firstPeriod property value. The firstPeriod property - ## @param value Value to set for the firstPeriod property. - ## @return a void - ## - def first_period=(value) - @first_period = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "basis" => lambda {|n| @basis = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "cost" => lambda {|n| @cost = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "datePurchased" => lambda {|n| @date_purchased = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "firstPeriod" => lambda {|n| @first_period = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "period" => lambda {|n| @period = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "rate" => lambda {|n| @rate = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "salvage" => lambda {|n| @salvage = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the period property value. The period property - ## @return a json - ## - def period - return @period - end - ## - ## Sets the period property value. The period property - ## @param value Value to set for the period property. - ## @return a void - ## - def period=(value) - @period = value - end - ## - ## Gets the rate property value. The rate property - ## @return a json - ## - def rate - return @rate - end - ## - ## Sets the rate property value. The rate property - ## @param value Value to set for the rate property. - ## @return a void - ## - def rate=(value) - @rate = value - end - ## - ## Gets the salvage property value. The salvage property - ## @return a json - ## - def salvage - return @salvage - end - ## - ## Sets the salvage property value. The salvage property - ## @param value Value to set for the salvage property. - ## @return a void - ## - def salvage=(value) - @salvage = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("basis", @basis) - writer.write_object_value("cost", @cost) - writer.write_object_value("datePurchased", @date_purchased) - writer.write_object_value("firstPeriod", @first_period) - writer.write_object_value("period", @period) - writer.write_object_value("rate", @rate) - writer.write_object_value("salvage", @salvage) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/amor_linc/amor_linc_request_builder.rb b/lib/drives/item/items/item/workbook/functions/amor_linc/amor_linc_request_builder.rb index 7311b2e9ce..07eea2029b 100644 --- a/lib/drives/item/items/item/workbook/functions/amor_linc/amor_linc_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/amor_linc/amor_linc_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a amor_linc_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AmorLincRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/and_escaped/and_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/and_escaped/and_post_request_body.rb index c39603962d..4b6efa8400 100644 --- a/lib/drives/item/items/item/workbook/functions/and_escaped/and_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/and_escaped/and_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class AndPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The values property - @values - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new andPostRequestBody and sets the default values. + ## Instantiates a new AndPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,7 +58,6 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "values" => lambda {|n| @values = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -72,24 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("values", @values) writer.write_additional_data(@additional_data) end - ## - ## Gets the values property value. The values property - ## @return a json - ## - def values - return @values - end - ## - ## Sets the values property value. The values property - ## @param value Value to set for the values property. - ## @return a void - ## - def values=(value) - @values = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/and_escaped/and_request_builder.rb b/lib/drives/item/items/item/workbook/functions/and_escaped/and_request_builder.rb index 9749a12656..296ce221bf 100644 --- a/lib/drives/item/items/item/workbook/functions/and_escaped/and_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/and_escaped/and_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a and_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AndRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/arabic/arabic_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/arabic/arabic_post_request_body.rb index 16e6ee6dd9..4a69bc9956 100644 --- a/lib/drives/item/items/item/workbook/functions/arabic/arabic_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/arabic/arabic_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class ArabicPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The text property - @text - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new arabicPostRequestBody and sets the default values. + ## Instantiates a new ArabicPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,7 +58,6 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "text" => lambda {|n| @text = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -72,24 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("text", @text) writer.write_additional_data(@additional_data) end - ## - ## Gets the text property value. The text property - ## @return a json - ## - def text - return @text - end - ## - ## Sets the text property value. The text property - ## @param value Value to set for the text property. - ## @return a void - ## - def text=(value) - @text = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/arabic/arabic_request_builder.rb b/lib/drives/item/items/item/workbook/functions/arabic/arabic_request_builder.rb index 0047714393..180a8939cf 100644 --- a/lib/drives/item/items/item/workbook/functions/arabic/arabic_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/arabic/arabic_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a arabic_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ArabicRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/areas/areas_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/areas/areas_post_request_body.rb index 04ae9edf0e..01f81d2408 100644 --- a/lib/drives/item/items/item/workbook/functions/areas/areas_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/areas/areas_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class AreasPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The reference property - @reference - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new areasPostRequestBody and sets the default values. + ## Instantiates a new AreasPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,32 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "reference" => lambda {|n| @reference = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the reference property value. The reference property - ## @return a json - ## - def reference - return @reference - end - ## - ## Sets the reference property value. The reference property - ## @param value Value to set for the reference property. - ## @return a void - ## - def reference=(value) - @reference = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("reference", @reference) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/areas/areas_request_builder.rb b/lib/drives/item/items/item/workbook/functions/areas/areas_request_builder.rb index cc091e072e..865d832a58 100644 --- a/lib/drives/item/items/item/workbook/functions/areas/areas_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/areas/areas_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a areas_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AreasRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/asc/asc_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/asc/asc_post_request_body.rb index 2bd17dac68..1b6e7dc88e 100644 --- a/lib/drives/item/items/item/workbook/functions/asc/asc_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/asc/asc_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class AscPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The text property - @text - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new ascPostRequestBody and sets the default values. + ## Instantiates a new AscPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,7 +58,6 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "text" => lambda {|n| @text = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -72,24 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("text", @text) writer.write_additional_data(@additional_data) end - ## - ## Gets the text property value. The text property - ## @return a json - ## - def text - return @text - end - ## - ## Sets the text property value. The text property - ## @param value Value to set for the text property. - ## @return a void - ## - def text=(value) - @text = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/asc/asc_request_builder.rb b/lib/drives/item/items/item/workbook/functions/asc/asc_request_builder.rb index 997d10d9f4..24078c9ea3 100644 --- a/lib/drives/item/items/item/workbook/functions/asc/asc_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/asc/asc_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a asc_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AscRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/asin/asin_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/asin/asin_post_request_body.rb index 83c8c4f236..1428e7e99d 100644 --- a/lib/drives/item/items/item/workbook/functions/asin/asin_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/asin/asin_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class AsinPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new asinPostRequestBody and sets the default values. + ## Instantiates a new AsinPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,32 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/asin/asin_request_builder.rb b/lib/drives/item/items/item/workbook/functions/asin/asin_request_builder.rb index 53471a87fa..20eedcb3b5 100644 --- a/lib/drives/item/items/item/workbook/functions/asin/asin_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/asin/asin_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a asin_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AsinRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/asinh/asinh_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/asinh/asinh_post_request_body.rb index eac9e8c83f..e5be68be09 100644 --- a/lib/drives/item/items/item/workbook/functions/asinh/asinh_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/asinh/asinh_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class AsinhPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new asinhPostRequestBody and sets the default values. + ## Instantiates a new AsinhPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,32 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/asinh/asinh_request_builder.rb b/lib/drives/item/items/item/workbook/functions/asinh/asinh_request_builder.rb index 449fdb14a0..57e3c26eb8 100644 --- a/lib/drives/item/items/item/workbook/functions/asinh/asinh_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/asinh/asinh_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a asinh_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AsinhRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/atan/atan_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/atan/atan_post_request_body.rb index c7213ddf47..71241839a7 100644 --- a/lib/drives/item/items/item/workbook/functions/atan/atan_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/atan/atan_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class AtanPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new atanPostRequestBody and sets the default values. + ## Instantiates a new AtanPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,32 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/atan/atan_request_builder.rb b/lib/drives/item/items/item/workbook/functions/atan/atan_request_builder.rb index 71fb532352..db34e78002 100644 --- a/lib/drives/item/items/item/workbook/functions/atan/atan_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/atan/atan_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a atan_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AtanRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/atan2/atan2_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/atan2/atan2_post_request_body.rb index 3bb3776fa9..61c4e47f13 100644 --- a/lib/drives/item/items/item/workbook/functions/atan2/atan2_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/atan2/atan2_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class Atan2PostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The xNum property - @x_num - ## - # The yNum property - @y_num - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new atan2PostRequestBody and sets the default values. + ## Instantiates a new Atan2PostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -65,8 +58,6 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "xNum" => lambda {|n| @x_num = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "yNum" => lambda {|n| @y_num = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -76,40 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("xNum", @x_num) - writer.write_object_value("yNum", @y_num) writer.write_additional_data(@additional_data) end - ## - ## Gets the xNum property value. The xNum property - ## @return a json - ## - def x_num - return @x_num - end - ## - ## Sets the xNum property value. The xNum property - ## @param value Value to set for the xNum property. - ## @return a void - ## - def x_num=(value) - @x_num = value - end - ## - ## Gets the yNum property value. The yNum property - ## @return a json - ## - def y_num - return @y_num - end - ## - ## Sets the yNum property value. The yNum property - ## @param value Value to set for the yNum property. - ## @return a void - ## - def y_num=(value) - @y_num = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/atan2/atan2_request_builder.rb b/lib/drives/item/items/item/workbook/functions/atan2/atan2_request_builder.rb index bb88974ca2..9709561a1d 100644 --- a/lib/drives/item/items/item/workbook/functions/atan2/atan2_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/atan2/atan2_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a atan2_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return Atan2RequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/atanh/atanh_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/atanh/atanh_post_request_body.rb index 1fb1588c18..7ce59b5d7b 100644 --- a/lib/drives/item/items/item/workbook/functions/atanh/atanh_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/atanh/atanh_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class AtanhPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new atanhPostRequestBody and sets the default values. + ## Instantiates a new AtanhPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,32 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/atanh/atanh_request_builder.rb b/lib/drives/item/items/item/workbook/functions/atanh/atanh_request_builder.rb index f6c3862a4c..baf0e550d0 100644 --- a/lib/drives/item/items/item/workbook/functions/atanh/atanh_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/atanh/atanh_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a atanh_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AtanhRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/ave_dev/ave_dev_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/ave_dev/ave_dev_post_request_body.rb index 5b5144f1a6..dc1698c8ac 100644 --- a/lib/drives/item/items/item/workbook/functions/ave_dev/ave_dev_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/ave_dev/ave_dev_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class AveDevPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The values property - @values - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new aveDevPostRequestBody and sets the default values. + ## Instantiates a new AveDevPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,7 +58,6 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "values" => lambda {|n| @values = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -72,24 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("values", @values) writer.write_additional_data(@additional_data) end - ## - ## Gets the values property value. The values property - ## @return a json - ## - def values - return @values - end - ## - ## Sets the values property value. The values property - ## @param value Value to set for the values property. - ## @return a void - ## - def values=(value) - @values = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/ave_dev/ave_dev_request_builder.rb b/lib/drives/item/items/item/workbook/functions/ave_dev/ave_dev_request_builder.rb index f67a68d67b..f81e9b374e 100644 --- a/lib/drives/item/items/item/workbook/functions/ave_dev/ave_dev_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/ave_dev/ave_dev_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ave_dev_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AveDevRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/average/average_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/average/average_post_request_body.rb index c37cde6dc1..906f6ff3a2 100644 --- a/lib/drives/item/items/item/workbook/functions/average/average_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/average/average_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class AveragePostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The values property - @values - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new averagePostRequestBody and sets the default values. + ## Instantiates a new AveragePostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,7 +58,6 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "values" => lambda {|n| @values = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -72,24 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("values", @values) writer.write_additional_data(@additional_data) end - ## - ## Gets the values property value. The values property - ## @return a json - ## - def values - return @values - end - ## - ## Sets the values property value. The values property - ## @param value Value to set for the values property. - ## @return a void - ## - def values=(value) - @values = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/average/average_request_builder.rb b/lib/drives/item/items/item/workbook/functions/average/average_request_builder.rb index 839166a5f3..0a98fc755a 100644 --- a/lib/drives/item/items/item/workbook/functions/average/average_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/average/average_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a average_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AverageRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/average_a/average_a_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/average_a/average_a_post_request_body.rb index 0000d9c054..35f1c45021 100644 --- a/lib/drives/item/items/item/workbook/functions/average_a/average_a_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/average_a/average_a_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class AverageAPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The values property - @values - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new averageAPostRequestBody and sets the default values. + ## Instantiates a new AverageAPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,7 +58,6 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "values" => lambda {|n| @values = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -72,24 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("values", @values) writer.write_additional_data(@additional_data) end - ## - ## Gets the values property value. The values property - ## @return a json - ## - def values - return @values - end - ## - ## Sets the values property value. The values property - ## @param value Value to set for the values property. - ## @return a void - ## - def values=(value) - @values = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/average_a/average_a_request_builder.rb b/lib/drives/item/items/item/workbook/functions/average_a/average_a_request_builder.rb index 5b46ee8949..08f87aef24 100644 --- a/lib/drives/item/items/item/workbook/functions/average_a/average_a_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/average_a/average_a_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a average_a_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AverageARequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/average_if/average_if_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/average_if/average_if_post_request_body.rb index 42e777f8d8..d144e7aa8d 100644 --- a/lib/drives/item/items/item/workbook/functions/average_if/average_if_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/average_if/average_if_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,46 +22,22 @@ class AverageIfPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The averageRange property - @average_range - ## - # The criteria property - @criteria - ## - # The range property - @range - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Gets the averageRange property value. The averageRange property - ## @return a json - ## - def average_range - return @average_range - end - ## - ## Sets the averageRange property value. The averageRange property - ## @param value Value to set for the averageRange property. - ## @return a void - ## - def average_range=(value) - @average_range = value - end - ## - ## Instantiates a new averageIfPostRequestBody and sets the default values. + ## Instantiates a new AverageIfPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -78,56 +53,20 @@ def self.create_from_discriminator_value(parse_node) return AverageIfPostRequestBody.new end ## - ## Gets the criteria property value. The criteria property - ## @return a json - ## - def criteria - return @criteria - end - ## - ## Sets the criteria property value. The criteria property - ## @param value Value to set for the criteria property. - ## @return a void - ## - def criteria=(value) - @criteria = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "averageRange" => lambda {|n| @average_range = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "criteria" => lambda {|n| @criteria = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "range" => lambda {|n| @range = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the range property value. The range property - ## @return a json - ## - def range - return @range - end - ## - ## Sets the range property value. The range property - ## @param value Value to set for the range property. - ## @return a void - ## - def range=(value) - @range = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("averageRange", @average_range) - writer.write_object_value("criteria", @criteria) - writer.write_object_value("range", @range) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/average_if/average_if_request_builder.rb b/lib/drives/item/items/item/workbook/functions/average_if/average_if_request_builder.rb index 35c1e9b2b3..c244ee0095 100644 --- a/lib/drives/item/items/item/workbook/functions/average_if/average_if_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/average_if/average_if_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a average_if_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AverageIfRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/average_ifs/average_ifs_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/average_ifs/average_ifs_post_request_body.rb index 1c6fea17b6..ab7d1eb83c 100644 --- a/lib/drives/item/items/item/workbook/functions/average_ifs/average_ifs_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/average_ifs/average_ifs_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,43 +22,22 @@ class AverageIfsPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The averageRange property - @average_range - ## - # The values property - @values - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Gets the averageRange property value. The averageRange property - ## @return a json - ## - def average_range - return @average_range - end - ## - ## Sets the averageRange property value. The averageRange property - ## @param value Value to set for the averageRange property. - ## @return a void - ## - def average_range=(value) - @average_range = value - end - ## - ## Instantiates a new averageIfsPostRequestBody and sets the default values. + ## Instantiates a new AverageIfsPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -80,8 +58,6 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "averageRange" => lambda {|n| @average_range = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "values" => lambda {|n| @values = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -91,25 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("averageRange", @average_range) - writer.write_object_value("values", @values) writer.write_additional_data(@additional_data) end - ## - ## Gets the values property value. The values property - ## @return a json - ## - def values - return @values - end - ## - ## Sets the values property value. The values property - ## @param value Value to set for the values property. - ## @return a void - ## - def values=(value) - @values = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/average_ifs/average_ifs_request_builder.rb b/lib/drives/item/items/item/workbook/functions/average_ifs/average_ifs_request_builder.rb index 32bcbb178d..5aa3390e90 100644 --- a/lib/drives/item/items/item/workbook/functions/average_ifs/average_ifs_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/average_ifs/average_ifs_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a average_ifs_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return AverageIfsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/baht_text/baht_text_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/baht_text/baht_text_post_request_body.rb index 0f3dffd922..91907e7fc5 100644 --- a/lib/drives/item/items/item/workbook/functions/baht_text/baht_text_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/baht_text/baht_text_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class BahtTextPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new bahtTextPostRequestBody and sets the default values. + ## Instantiates a new BahtTextPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,32 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/baht_text/baht_text_request_builder.rb b/lib/drives/item/items/item/workbook/functions/baht_text/baht_text_request_builder.rb index 8f28166b38..434f5784bd 100644 --- a/lib/drives/item/items/item/workbook/functions/baht_text/baht_text_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/baht_text/baht_text_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a baht_text_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BahtTextRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/base/base_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/base/base_post_request_body.rb index 22c85977ad..e5b3d2c084 100644 --- a/lib/drives/item/items/item/workbook/functions/base/base_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/base/base_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,31 +22,22 @@ class BasePostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The minLength property - @min_length - ## - # The number property - @number - ## - # The radix property - @radix - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new basePostRequestBody and sets the default values. + ## Instantiates a new BasePostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -68,66 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "minLength" => lambda {|n| @min_length = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "radix" => lambda {|n| @radix = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the minLength property value. The minLength property - ## @return a json - ## - def min_length - return @min_length - end - ## - ## Sets the minLength property value. The minLength property - ## @param value Value to set for the minLength property. - ## @return a void - ## - def min_length=(value) - @min_length = value - end - ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## - ## Gets the radix property value. The radix property - ## @return a json - ## - def radix - return @radix - end - ## - ## Sets the radix property value. The radix property - ## @param value Value to set for the radix property. - ## @return a void - ## - def radix=(value) - @radix = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("minLength", @min_length) - writer.write_object_value("number", @number) - writer.write_object_value("radix", @radix) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/base/base_request_builder_escaped.rb b/lib/drives/item/items/item/workbook/functions/base/base_request_builder_escaped.rb index 619f66e6ed..1d629844b8 100644 --- a/lib/drives/item/items/item/workbook/functions/base/base_request_builder_escaped.rb +++ b/lib/drives/item/items/item/workbook/functions/base/base_request_builder_escaped.rb @@ -23,7 +23,7 @@ module Base class BaseRequestBuilder_escaped < MicrosoftKiotaAbstractions::BaseRequestBuilder ## - ## Instantiates a new BaseRequestBuilder and sets the default values. + ## Instantiates a new BaseRequestBuilder_escaped and sets the default values. ## @param path_parameters Path parameters for the request ## @param request_adapter The request adapter to use to execute the requests. ## @return a void @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a base_request_builder_escaped + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BaseRequestBuilder_escaped.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/bessel_i/bessel_i_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/bessel_i/bessel_i_post_request_body.rb index 6a4925a565..31a4ae0592 100644 --- a/lib/drives/item/items/item/workbook/functions/bessel_i/bessel_i_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/bessel_i/bessel_i_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class BesselIPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The n property - @n - ## - # The x property - @x - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new besselIPostRequestBody and sets the default values. + ## Instantiates a new BesselIPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -65,51 +58,17 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "n" => lambda {|n| @n = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "x" => lambda {|n| @x = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the n property value. The n property - ## @return a json - ## - def n - return @n - end - ## - ## Sets the n property value. The n property - ## @param value Value to set for the n property. - ## @return a void - ## - def n=(value) - @n = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("n", @n) - writer.write_object_value("x", @x) writer.write_additional_data(@additional_data) end - ## - ## Gets the x property value. The x property - ## @return a json - ## - def x - return @x - end - ## - ## Sets the x property value. The x property - ## @param value Value to set for the x property. - ## @return a void - ## - def x=(value) - @x = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/bessel_i/bessel_i_request_builder.rb b/lib/drives/item/items/item/workbook/functions/bessel_i/bessel_i_request_builder.rb index 61c122cf1a..c491555a17 100644 --- a/lib/drives/item/items/item/workbook/functions/bessel_i/bessel_i_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/bessel_i/bessel_i_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a bessel_i_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BesselIRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/bessel_j/bessel_j_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/bessel_j/bessel_j_post_request_body.rb index 0921a0d1b7..d45a335b8c 100644 --- a/lib/drives/item/items/item/workbook/functions/bessel_j/bessel_j_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/bessel_j/bessel_j_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class BesselJPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The n property - @n - ## - # The x property - @x - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new besselJPostRequestBody and sets the default values. + ## Instantiates a new BesselJPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -65,51 +58,17 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "n" => lambda {|n| @n = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "x" => lambda {|n| @x = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the n property value. The n property - ## @return a json - ## - def n - return @n - end - ## - ## Sets the n property value. The n property - ## @param value Value to set for the n property. - ## @return a void - ## - def n=(value) - @n = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("n", @n) - writer.write_object_value("x", @x) writer.write_additional_data(@additional_data) end - ## - ## Gets the x property value. The x property - ## @return a json - ## - def x - return @x - end - ## - ## Sets the x property value. The x property - ## @param value Value to set for the x property. - ## @return a void - ## - def x=(value) - @x = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/bessel_j/bessel_j_request_builder.rb b/lib/drives/item/items/item/workbook/functions/bessel_j/bessel_j_request_builder.rb index 2e79232746..0841b20a08 100644 --- a/lib/drives/item/items/item/workbook/functions/bessel_j/bessel_j_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/bessel_j/bessel_j_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a bessel_j_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BesselJRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/bessel_k/bessel_k_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/bessel_k/bessel_k_post_request_body.rb index 2e28336649..74dc7055e7 100644 --- a/lib/drives/item/items/item/workbook/functions/bessel_k/bessel_k_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/bessel_k/bessel_k_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class BesselKPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The n property - @n - ## - # The x property - @x - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new besselKPostRequestBody and sets the default values. + ## Instantiates a new BesselKPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -65,51 +58,17 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "n" => lambda {|n| @n = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "x" => lambda {|n| @x = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the n property value. The n property - ## @return a json - ## - def n - return @n - end - ## - ## Sets the n property value. The n property - ## @param value Value to set for the n property. - ## @return a void - ## - def n=(value) - @n = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("n", @n) - writer.write_object_value("x", @x) writer.write_additional_data(@additional_data) end - ## - ## Gets the x property value. The x property - ## @return a json - ## - def x - return @x - end - ## - ## Sets the x property value. The x property - ## @param value Value to set for the x property. - ## @return a void - ## - def x=(value) - @x = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/bessel_k/bessel_k_request_builder.rb b/lib/drives/item/items/item/workbook/functions/bessel_k/bessel_k_request_builder.rb index c156a41aab..3a8ff55688 100644 --- a/lib/drives/item/items/item/workbook/functions/bessel_k/bessel_k_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/bessel_k/bessel_k_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a bessel_k_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BesselKRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/bessel_y/bessel_y_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/bessel_y/bessel_y_post_request_body.rb index b877f44be5..fec4d6fbd7 100644 --- a/lib/drives/item/items/item/workbook/functions/bessel_y/bessel_y_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/bessel_y/bessel_y_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class BesselYPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The n property - @n - ## - # The x property - @x - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new besselYPostRequestBody and sets the default values. + ## Instantiates a new BesselYPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -65,51 +58,17 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "n" => lambda {|n| @n = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "x" => lambda {|n| @x = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the n property value. The n property - ## @return a json - ## - def n - return @n - end - ## - ## Sets the n property value. The n property - ## @param value Value to set for the n property. - ## @return a void - ## - def n=(value) - @n = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("n", @n) - writer.write_object_value("x", @x) writer.write_additional_data(@additional_data) end - ## - ## Gets the x property value. The x property - ## @return a json - ## - def x - return @x - end - ## - ## Sets the x property value. The x property - ## @param value Value to set for the x property. - ## @return a void - ## - def x=(value) - @x = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/bessel_y/bessel_y_request_builder.rb b/lib/drives/item/items/item/workbook/functions/bessel_y/bessel_y_request_builder.rb index c47875fa26..ffa3a36547 100644 --- a/lib/drives/item/items/item/workbook/functions/bessel_y/bessel_y_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/bessel_y/bessel_y_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a bessel_y_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BesselYRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/beta_dist/beta_dist_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/beta_dist/beta_dist_post_request_body.rb index a2c9f2e4ea..0be2b50d28 100644 --- a/lib/drives/item/items/item/workbook/functions/beta_dist/beta_dist_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/beta_dist/beta_dist_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -20,102 +19,24 @@ module Beta_Dist class BetaDistPostRequestBody include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable ## - # The A property - @a - ## # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The alpha property - @alpha - ## - # The B property - @b - ## - # The beta property - @beta - ## - # The cumulative property - @cumulative - ## - # The x property - @x - ## - ## Gets the A property value. The A property - ## @return a json - ## - def a - return @a - end - ## - ## Sets the A property value. The A property - ## @param value Value to set for the A property. - ## @return a void - ## - def a=(value) - @a = value - end - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Gets the alpha property value. The alpha property - ## @return a json - ## - def alpha - return @alpha - end - ## - ## Sets the alpha property value. The alpha property - ## @param value Value to set for the alpha property. - ## @return a void - ## - def alpha=(value) - @alpha = value - end - ## - ## Gets the B property value. The B property - ## @return a json - ## - def b - return @b - end - ## - ## Sets the B property value. The B property - ## @param value Value to set for the B property. - ## @return a void - ## - def b=(value) - @b = value - end - ## - ## Gets the beta property value. The beta property - ## @return a json - ## - def beta - return @beta - end - ## - ## Sets the beta property value. The beta property - ## @param value Value to set for the beta property. - ## @return a void - ## - def beta=(value) - @beta = value - end - ## ## Instantiates a new BetaDistPostRequestBody and sets the default values. ## @return a void ## @@ -132,32 +53,11 @@ def self.create_from_discriminator_value(parse_node) return BetaDistPostRequestBody.new end ## - ## Gets the cumulative property value. The cumulative property - ## @return a json - ## - def cumulative - return @cumulative - end - ## - ## Sets the cumulative property value. The cumulative property - ## @param value Value to set for the cumulative property. - ## @return a void - ## - def cumulative=(value) - @cumulative = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "A" => lambda {|n| @a = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "alpha" => lambda {|n| @alpha = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "B" => lambda {|n| @b = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "beta" => lambda {|n| @beta = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "cumulative" => lambda {|n| @cumulative = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "x" => lambda {|n| @x = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -167,29 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("A", @a) - writer.write_object_value("alpha", @alpha) - writer.write_object_value("B", @b) - writer.write_object_value("beta", @beta) - writer.write_object_value("cumulative", @cumulative) - writer.write_object_value("x", @x) writer.write_additional_data(@additional_data) end - ## - ## Gets the x property value. The x property - ## @return a json - ## - def x - return @x - end - ## - ## Sets the x property value. The x property - ## @param value Value to set for the x property. - ## @return a void - ## - def x=(value) - @x = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/beta_dist/beta_dist_request_builder.rb b/lib/drives/item/items/item/workbook/functions/beta_dist/beta_dist_request_builder.rb index 452b5ae1a0..96b1ceab73 100644 --- a/lib/drives/item/items/item/workbook/functions/beta_dist/beta_dist_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/beta_dist/beta_dist_request_builder.rb @@ -23,7 +23,7 @@ module Beta_Dist class BetaDistRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## - ## Instantiates a new Beta_DistRequestBuilder and sets the default values. + ## Instantiates a new BetaDistRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request ## @param request_adapter The request adapter to use to execute the requests. ## @return a void @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a beta_dist_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BetaDistRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/beta_inv/beta_inv_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/beta_inv/beta_inv_post_request_body.rb index 480eda0876..1b8a1fb3dd 100644 --- a/lib/drives/item/items/item/workbook/functions/beta_inv/beta_inv_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/beta_inv/beta_inv_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -20,99 +19,24 @@ module Beta_Inv class BetaInvPostRequestBody include MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable ## - # The A property - @a - ## # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The alpha property - @alpha - ## - # The B property - @b - ## - # The beta property - @beta - ## - # The probability property - @probability - ## - ## Gets the A property value. The A property - ## @return a json - ## - def a - return @a - end - ## - ## Sets the A property value. The A property - ## @param value Value to set for the A property. - ## @return a void - ## - def a=(value) - @a = value - end - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Gets the alpha property value. The alpha property - ## @return a json - ## - def alpha - return @alpha - end - ## - ## Sets the alpha property value. The alpha property - ## @param value Value to set for the alpha property. - ## @return a void - ## - def alpha=(value) - @alpha = value - end - ## - ## Gets the B property value. The B property - ## @return a json - ## - def b - return @b - end - ## - ## Sets the B property value. The B property - ## @param value Value to set for the B property. - ## @return a void - ## - def b=(value) - @b = value - end - ## - ## Gets the beta property value. The beta property - ## @return a json - ## - def beta - return @beta - end - ## - ## Sets the beta property value. The beta property - ## @param value Value to set for the beta property. - ## @return a void - ## - def beta=(value) - @beta = value - end - ## ## Instantiates a new BetaInvPostRequestBody and sets the default values. ## @return a void ## @@ -134,40 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "A" => lambda {|n| @a = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "alpha" => lambda {|n| @alpha = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "B" => lambda {|n| @b = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "beta" => lambda {|n| @beta = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "probability" => lambda {|n| @probability = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the probability property value. The probability property - ## @return a json - ## - def probability - return @probability - end - ## - ## Sets the probability property value. The probability property - ## @param value Value to set for the probability property. - ## @return a void - ## - def probability=(value) - @probability = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("A", @a) - writer.write_object_value("alpha", @alpha) - writer.write_object_value("B", @b) - writer.write_object_value("beta", @beta) - writer.write_object_value("probability", @probability) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/beta_inv/beta_inv_request_builder.rb b/lib/drives/item/items/item/workbook/functions/beta_inv/beta_inv_request_builder.rb index c8014777d6..76bd42b8d1 100644 --- a/lib/drives/item/items/item/workbook/functions/beta_inv/beta_inv_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/beta_inv/beta_inv_request_builder.rb @@ -23,7 +23,7 @@ module Beta_Inv class BetaInvRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## - ## Instantiates a new Beta_InvRequestBuilder and sets the default values. + ## Instantiates a new BetaInvRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request ## @param request_adapter The request adapter to use to execute the requests. ## @return a void @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a beta_inv_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BetaInvRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/bin2_dec/bin2_dec_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/bin2_dec/bin2_dec_post_request_body.rb index b0773fea01..e17164dc33 100644 --- a/lib/drives/item/items/item/workbook/functions/bin2_dec/bin2_dec_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/bin2_dec/bin2_dec_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class Bin2DecPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new bin2DecPostRequestBody and sets the default values. + ## Instantiates a new Bin2DecPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,32 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/bin2_dec/bin2_dec_request_builder.rb b/lib/drives/item/items/item/workbook/functions/bin2_dec/bin2_dec_request_builder.rb index 2456ab5fa3..e603f19176 100644 --- a/lib/drives/item/items/item/workbook/functions/bin2_dec/bin2_dec_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/bin2_dec/bin2_dec_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a bin2_dec_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return Bin2DecRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/bin2_hex/bin2_hex_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/bin2_hex/bin2_hex_post_request_body.rb index df724e4b09..cd3498213a 100644 --- a/lib/drives/item/items/item/workbook/functions/bin2_hex/bin2_hex_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/bin2_hex/bin2_hex_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class Bin2HexPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - # The places property - @places - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new bin2HexPostRequestBody and sets the default values. + ## Instantiates a new Bin2HexPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -65,49 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "places" => lambda {|n| @places = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## - ## Gets the places property value. The places property - ## @return a json - ## - def places - return @places - end - ## - ## Sets the places property value. The places property - ## @param value Value to set for the places property. - ## @return a void - ## - def places=(value) - @places = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) - writer.write_object_value("places", @places) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/bin2_hex/bin2_hex_request_builder.rb b/lib/drives/item/items/item/workbook/functions/bin2_hex/bin2_hex_request_builder.rb index ae404a433b..0213f36b10 100644 --- a/lib/drives/item/items/item/workbook/functions/bin2_hex/bin2_hex_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/bin2_hex/bin2_hex_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a bin2_hex_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return Bin2HexRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/bin2_oct/bin2_oct_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/bin2_oct/bin2_oct_post_request_body.rb index 2f1e04ef17..06ccd794fc 100644 --- a/lib/drives/item/items/item/workbook/functions/bin2_oct/bin2_oct_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/bin2_oct/bin2_oct_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class Bin2OctPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - # The places property - @places - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new bin2OctPostRequestBody and sets the default values. + ## Instantiates a new Bin2OctPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -65,49 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "places" => lambda {|n| @places = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## - ## Gets the places property value. The places property - ## @return a json - ## - def places - return @places - end - ## - ## Sets the places property value. The places property - ## @param value Value to set for the places property. - ## @return a void - ## - def places=(value) - @places = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) - writer.write_object_value("places", @places) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/bin2_oct/bin2_oct_request_builder.rb b/lib/drives/item/items/item/workbook/functions/bin2_oct/bin2_oct_request_builder.rb index 4210c3eedf..8688955b0e 100644 --- a/lib/drives/item/items/item/workbook/functions/bin2_oct/bin2_oct_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/bin2_oct/bin2_oct_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a bin2_oct_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return Bin2OctRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/binom_dist/binom_dist_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/binom_dist/binom_dist_post_request_body.rb index 34cc364aed..3febcfce3d 100644 --- a/lib/drives/item/items/item/workbook/functions/binom_dist/binom_dist_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/binom_dist/binom_dist_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,27 +22,15 @@ class BinomDistPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The cumulative property - @cumulative - ## - # The numberS property - @number_s - ## - # The probabilityS property - @probability_s - ## - # The trials property - @trials - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -66,90 +53,22 @@ def self.create_from_discriminator_value(parse_node) return BinomDistPostRequestBody.new end ## - ## Gets the cumulative property value. The cumulative property - ## @return a json - ## - def cumulative - return @cumulative - end - ## - ## Sets the cumulative property value. The cumulative property - ## @param value Value to set for the cumulative property. - ## @return a void - ## - def cumulative=(value) - @cumulative = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "cumulative" => lambda {|n| @cumulative = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "numberS" => lambda {|n| @number_s = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "probabilityS" => lambda {|n| @probability_s = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "trials" => lambda {|n| @trials = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the numberS property value. The numberS property - ## @return a json - ## - def number_s - return @number_s - end - ## - ## Sets the numberS property value. The numberS property - ## @param value Value to set for the numberS property. - ## @return a void - ## - def number_s=(value) - @number_s = value - end - ## - ## Gets the probabilityS property value. The probabilityS property - ## @return a json - ## - def probability_s - return @probability_s - end - ## - ## Sets the probabilityS property value. The probabilityS property - ## @param value Value to set for the probabilityS property. - ## @return a void - ## - def probability_s=(value) - @probability_s = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("cumulative", @cumulative) - writer.write_object_value("numberS", @number_s) - writer.write_object_value("probabilityS", @probability_s) - writer.write_object_value("trials", @trials) writer.write_additional_data(@additional_data) end - ## - ## Gets the trials property value. The trials property - ## @return a json - ## - def trials - return @trials - end - ## - ## Sets the trials property value. The trials property - ## @param value Value to set for the trials property. - ## @return a void - ## - def trials=(value) - @trials = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/binom_dist/binom_dist_request_builder.rb b/lib/drives/item/items/item/workbook/functions/binom_dist/binom_dist_request_builder.rb index bcc43263e7..81bdb4fb86 100644 --- a/lib/drives/item/items/item/workbook/functions/binom_dist/binom_dist_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/binom_dist/binom_dist_request_builder.rb @@ -23,7 +23,7 @@ module Binom_Dist class BinomDistRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## - ## Instantiates a new Binom_DistRequestBuilder and sets the default values. + ## Instantiates a new BinomDistRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request ## @param request_adapter The request adapter to use to execute the requests. ## @return a void @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a binom_dist_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BinomDistRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/binom_dist_range/binom_dist_range_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/binom_dist_range/binom_dist_range_post_request_body.rb index cb08158166..b0956992f1 100644 --- a/lib/drives/item/items/item/workbook/functions/binom_dist_range/binom_dist_range_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/binom_dist_range/binom_dist_range_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,27 +22,15 @@ class BinomDistRangePostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The numberS property - @number_s - ## - # The numberS2 property - @number_s2 - ## - # The probabilityS property - @probability_s - ## - # The trials property - @trials - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -71,85 +58,17 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "numberS" => lambda {|n| @number_s = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "numberS2" => lambda {|n| @number_s2 = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "probabilityS" => lambda {|n| @probability_s = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "trials" => lambda {|n| @trials = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the numberS property value. The numberS property - ## @return a json - ## - def number_s - return @number_s - end - ## - ## Sets the numberS property value. The numberS property - ## @param value Value to set for the numberS property. - ## @return a void - ## - def number_s=(value) - @number_s = value - end - ## - ## Gets the numberS2 property value. The numberS2 property - ## @return a json - ## - def number_s2 - return @number_s2 - end - ## - ## Sets the numberS2 property value. The numberS2 property - ## @param value Value to set for the numberS2 property. - ## @return a void - ## - def number_s2=(value) - @number_s2 = value - end - ## - ## Gets the probabilityS property value. The probabilityS property - ## @return a json - ## - def probability_s - return @probability_s - end - ## - ## Sets the probabilityS property value. The probabilityS property - ## @param value Value to set for the probabilityS property. - ## @return a void - ## - def probability_s=(value) - @probability_s = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("numberS", @number_s) - writer.write_object_value("numberS2", @number_s2) - writer.write_object_value("probabilityS", @probability_s) - writer.write_object_value("trials", @trials) writer.write_additional_data(@additional_data) end - ## - ## Gets the trials property value. The trials property - ## @return a json - ## - def trials - return @trials - end - ## - ## Sets the trials property value. The trials property - ## @param value Value to set for the trials property. - ## @return a void - ## - def trials=(value) - @trials = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/binom_dist_range/binom_dist_range_request_builder.rb b/lib/drives/item/items/item/workbook/functions/binom_dist_range/binom_dist_range_request_builder.rb index 7e119cb788..6d0c2dd031 100644 --- a/lib/drives/item/items/item/workbook/functions/binom_dist_range/binom_dist_range_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/binom_dist_range/binom_dist_range_request_builder.rb @@ -23,7 +23,7 @@ module Binom_Dist_Range class BinomDistRangeRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## - ## Instantiates a new Binom_Dist_RangeRequestBuilder and sets the default values. + ## Instantiates a new BinomDistRangeRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request ## @param request_adapter The request adapter to use to execute the requests. ## @return a void @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a binom_dist_range_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BinomDistRangeRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/binom_inv/binom_inv_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/binom_inv/binom_inv_post_request_body.rb index ba2f52faa6..805f4fced9 100644 --- a/lib/drives/item/items/item/workbook/functions/binom_inv/binom_inv_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/binom_inv/binom_inv_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,45 +22,21 @@ class BinomInvPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The alpha property - @alpha - ## - # The probabilityS property - @probability_s - ## - # The trials property - @trials - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Gets the alpha property value. The alpha property - ## @return a json - ## - def alpha - return @alpha - end - ## - ## Sets the alpha property value. The alpha property - ## @param value Value to set for the alpha property. - ## @return a void - ## - def alpha=(value) - @alpha = value - end - ## ## Instantiates a new BinomInvPostRequestBody and sets the default values. ## @return a void ## @@ -83,53 +58,17 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "alpha" => lambda {|n| @alpha = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "probabilityS" => lambda {|n| @probability_s = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "trials" => lambda {|n| @trials = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the probabilityS property value. The probabilityS property - ## @return a json - ## - def probability_s - return @probability_s - end - ## - ## Sets the probabilityS property value. The probabilityS property - ## @param value Value to set for the probabilityS property. - ## @return a void - ## - def probability_s=(value) - @probability_s = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("alpha", @alpha) - writer.write_object_value("probabilityS", @probability_s) - writer.write_object_value("trials", @trials) writer.write_additional_data(@additional_data) end - ## - ## Gets the trials property value. The trials property - ## @return a json - ## - def trials - return @trials - end - ## - ## Sets the trials property value. The trials property - ## @param value Value to set for the trials property. - ## @return a void - ## - def trials=(value) - @trials = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/binom_inv/binom_inv_request_builder.rb b/lib/drives/item/items/item/workbook/functions/binom_inv/binom_inv_request_builder.rb index 78de4c334e..298eb71b2f 100644 --- a/lib/drives/item/items/item/workbook/functions/binom_inv/binom_inv_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/binom_inv/binom_inv_request_builder.rb @@ -23,7 +23,7 @@ module Binom_Inv class BinomInvRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## - ## Instantiates a new Binom_InvRequestBuilder and sets the default values. + ## Instantiates a new BinomInvRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request ## @param request_adapter The request adapter to use to execute the requests. ## @return a void @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a binom_inv_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BinomInvRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/bitand/bitand_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/bitand/bitand_post_request_body.rb index 1d7c37413e..8c93c73e6f 100644 --- a/lib/drives/item/items/item/workbook/functions/bitand/bitand_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/bitand/bitand_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class BitandPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number1 property - @number1 - ## - # The number2 property - @number2 - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new bitandPostRequestBody and sets the default values. + ## Instantiates a new BitandPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -65,49 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number1" => lambda {|n| @number1 = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "number2" => lambda {|n| @number2 = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number1 property value. The number1 property - ## @return a json - ## - def number1 - return @number1 - end - ## - ## Sets the number1 property value. The number1 property - ## @param value Value to set for the number1 property. - ## @return a void - ## - def number1=(value) - @number1 = value - end - ## - ## Gets the number2 property value. The number2 property - ## @return a json - ## - def number2 - return @number2 - end - ## - ## Sets the number2 property value. The number2 property - ## @param value Value to set for the number2 property. - ## @return a void - ## - def number2=(value) - @number2 = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number1", @number1) - writer.write_object_value("number2", @number2) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/bitand/bitand_request_builder.rb b/lib/drives/item/items/item/workbook/functions/bitand/bitand_request_builder.rb index a1a0d62b45..35ff1b5945 100644 --- a/lib/drives/item/items/item/workbook/functions/bitand/bitand_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/bitand/bitand_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a bitand_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BitandRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/bitlshift/bitlshift_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/bitlshift/bitlshift_post_request_body.rb index d27f5d7113..bbdde571b6 100644 --- a/lib/drives/item/items/item/workbook/functions/bitlshift/bitlshift_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/bitlshift/bitlshift_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class BitlshiftPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - # The shiftAmount property - @shift_amount - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new bitlshiftPostRequestBody and sets the default values. + ## Instantiates a new BitlshiftPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -65,51 +58,17 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "shiftAmount" => lambda {|n| @shift_amount = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) - writer.write_object_value("shiftAmount", @shift_amount) writer.write_additional_data(@additional_data) end - ## - ## Gets the shiftAmount property value. The shiftAmount property - ## @return a json - ## - def shift_amount - return @shift_amount - end - ## - ## Sets the shiftAmount property value. The shiftAmount property - ## @param value Value to set for the shiftAmount property. - ## @return a void - ## - def shift_amount=(value) - @shift_amount = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/bitlshift/bitlshift_request_builder.rb b/lib/drives/item/items/item/workbook/functions/bitlshift/bitlshift_request_builder.rb index 69efe409da..3eabfaeb10 100644 --- a/lib/drives/item/items/item/workbook/functions/bitlshift/bitlshift_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/bitlshift/bitlshift_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a bitlshift_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BitlshiftRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/bitor/bitor_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/bitor/bitor_post_request_body.rb index 1aa7eff388..357acb91af 100644 --- a/lib/drives/item/items/item/workbook/functions/bitor/bitor_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/bitor/bitor_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class BitorPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number1 property - @number1 - ## - # The number2 property - @number2 - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new bitorPostRequestBody and sets the default values. + ## Instantiates a new BitorPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -65,49 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number1" => lambda {|n| @number1 = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "number2" => lambda {|n| @number2 = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number1 property value. The number1 property - ## @return a json - ## - def number1 - return @number1 - end - ## - ## Sets the number1 property value. The number1 property - ## @param value Value to set for the number1 property. - ## @return a void - ## - def number1=(value) - @number1 = value - end - ## - ## Gets the number2 property value. The number2 property - ## @return a json - ## - def number2 - return @number2 - end - ## - ## Sets the number2 property value. The number2 property - ## @param value Value to set for the number2 property. - ## @return a void - ## - def number2=(value) - @number2 = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number1", @number1) - writer.write_object_value("number2", @number2) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/bitor/bitor_request_builder.rb b/lib/drives/item/items/item/workbook/functions/bitor/bitor_request_builder.rb index 0bc26e35b9..ff63e2449f 100644 --- a/lib/drives/item/items/item/workbook/functions/bitor/bitor_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/bitor/bitor_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a bitor_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BitorRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/bitrshift/bitrshift_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/bitrshift/bitrshift_post_request_body.rb index 830609b6cb..1b35ab2b37 100644 --- a/lib/drives/item/items/item/workbook/functions/bitrshift/bitrshift_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/bitrshift/bitrshift_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class BitrshiftPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - # The shiftAmount property - @shift_amount - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new bitrshiftPostRequestBody and sets the default values. + ## Instantiates a new BitrshiftPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -65,51 +58,17 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "shiftAmount" => lambda {|n| @shift_amount = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) - writer.write_object_value("shiftAmount", @shift_amount) writer.write_additional_data(@additional_data) end - ## - ## Gets the shiftAmount property value. The shiftAmount property - ## @return a json - ## - def shift_amount - return @shift_amount - end - ## - ## Sets the shiftAmount property value. The shiftAmount property - ## @param value Value to set for the shiftAmount property. - ## @return a void - ## - def shift_amount=(value) - @shift_amount = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/bitrshift/bitrshift_request_builder.rb b/lib/drives/item/items/item/workbook/functions/bitrshift/bitrshift_request_builder.rb index b56b0af656..d9acaeb605 100644 --- a/lib/drives/item/items/item/workbook/functions/bitrshift/bitrshift_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/bitrshift/bitrshift_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a bitrshift_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BitrshiftRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/bitxor/bitxor_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/bitxor/bitxor_post_request_body.rb index 8d549b951a..46c34bcbab 100644 --- a/lib/drives/item/items/item/workbook/functions/bitxor/bitxor_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/bitxor/bitxor_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class BitxorPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number1 property - @number1 - ## - # The number2 property - @number2 - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new bitxorPostRequestBody and sets the default values. + ## Instantiates a new BitxorPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -65,49 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number1" => lambda {|n| @number1 = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "number2" => lambda {|n| @number2 = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number1 property value. The number1 property - ## @return a json - ## - def number1 - return @number1 - end - ## - ## Sets the number1 property value. The number1 property - ## @param value Value to set for the number1 property. - ## @return a void - ## - def number1=(value) - @number1 = value - end - ## - ## Gets the number2 property value. The number2 property - ## @return a json - ## - def number2 - return @number2 - end - ## - ## Sets the number2 property value. The number2 property - ## @param value Value to set for the number2 property. - ## @return a void - ## - def number2=(value) - @number2 = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number1", @number1) - writer.write_object_value("number2", @number2) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/bitxor/bitxor_request_builder.rb b/lib/drives/item/items/item/workbook/functions/bitxor/bitxor_request_builder.rb index bcc8dd64cf..9250667434 100644 --- a/lib/drives/item/items/item/workbook/functions/bitxor/bitxor_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/bitxor/bitxor_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a bitxor_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return BitxorRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/ceiling_math/ceiling_math_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/ceiling_math/ceiling_math_post_request_body.rb index b75e6fbf5c..c6b0584b4d 100644 --- a/lib/drives/item/items/item/workbook/functions/ceiling_math/ceiling_math_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/ceiling_math/ceiling_math_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,24 +22,15 @@ class CeilingMathPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The mode property - @mode - ## - # The number property - @number - ## - # The significance property - @significance - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -68,68 +58,17 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "mode" => lambda {|n| @mode = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "significance" => lambda {|n| @significance = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the mode property value. The mode property - ## @return a json - ## - def mode - return @mode - end - ## - ## Sets the mode property value. The mode property - ## @param value Value to set for the mode property. - ## @return a void - ## - def mode=(value) - @mode = value - end - ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("mode", @mode) - writer.write_object_value("number", @number) - writer.write_object_value("significance", @significance) writer.write_additional_data(@additional_data) end - ## - ## Gets the significance property value. The significance property - ## @return a json - ## - def significance - return @significance - end - ## - ## Sets the significance property value. The significance property - ## @param value Value to set for the significance property. - ## @return a void - ## - def significance=(value) - @significance = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/ceiling_math/ceiling_math_request_builder.rb b/lib/drives/item/items/item/workbook/functions/ceiling_math/ceiling_math_request_builder.rb index eaae27cf46..62f50451d3 100644 --- a/lib/drives/item/items/item/workbook/functions/ceiling_math/ceiling_math_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/ceiling_math/ceiling_math_request_builder.rb @@ -23,7 +23,7 @@ module Ceiling_Math class CeilingMathRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## - ## Instantiates a new Ceiling_MathRequestBuilder and sets the default values. + ## Instantiates a new CeilingMathRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request ## @param request_adapter The request adapter to use to execute the requests. ## @return a void @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ceiling_math_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CeilingMathRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/ceiling_precise/ceiling_precise_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/ceiling_precise/ceiling_precise_post_request_body.rb index b6e22721e7..ee7b6ecff7 100644 --- a/lib/drives/item/items/item/workbook/functions/ceiling_precise/ceiling_precise_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/ceiling_precise/ceiling_precise_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,21 +22,15 @@ class CeilingPrecisePostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - # The significance property - @significance - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -65,51 +58,17 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "significance" => lambda {|n| @significance = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) - writer.write_object_value("significance", @significance) writer.write_additional_data(@additional_data) end - ## - ## Gets the significance property value. The significance property - ## @return a json - ## - def significance - return @significance - end - ## - ## Sets the significance property value. The significance property - ## @param value Value to set for the significance property. - ## @return a void - ## - def significance=(value) - @significance = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/ceiling_precise/ceiling_precise_request_builder.rb b/lib/drives/item/items/item/workbook/functions/ceiling_precise/ceiling_precise_request_builder.rb index 02a783f718..a2b11e0e62 100644 --- a/lib/drives/item/items/item/workbook/functions/ceiling_precise/ceiling_precise_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/ceiling_precise/ceiling_precise_request_builder.rb @@ -23,7 +23,7 @@ module Ceiling_Precise class CeilingPreciseRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## - ## Instantiates a new Ceiling_PreciseRequestBuilder and sets the default values. + ## Instantiates a new CeilingPreciseRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request ## @param request_adapter The request adapter to use to execute the requests. ## @return a void @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ceiling_precise_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CeilingPreciseRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/char/char_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/char/char_post_request_body.rb index 3a93326dd3..537e87ef7e 100644 --- a/lib/drives/item/items/item/workbook/functions/char/char_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/char/char_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class CharPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new charPostRequestBody and sets the default values. + ## Instantiates a new CharPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,32 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/char/char_request_builder.rb b/lib/drives/item/items/item/workbook/functions/char/char_request_builder.rb index de6d305f80..b082eb35b4 100644 --- a/lib/drives/item/items/item/workbook/functions/char/char_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/char/char_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a char_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CharRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/chi_sq_dist/chi_sq_dist_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/chi_sq_dist/chi_sq_dist_post_request_body.rb index ce18bc5b86..d0d70e1e19 100644 --- a/lib/drives/item/items/item/workbook/functions/chi_sq_dist/chi_sq_dist_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/chi_sq_dist/chi_sq_dist_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,24 +22,15 @@ class ChiSqDistPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The cumulative property - @cumulative - ## - # The degFreedom property - @deg_freedom - ## - # The x property - @x - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -63,44 +53,11 @@ def self.create_from_discriminator_value(parse_node) return ChiSqDistPostRequestBody.new end ## - ## Gets the cumulative property value. The cumulative property - ## @return a json - ## - def cumulative - return @cumulative - end - ## - ## Sets the cumulative property value. The cumulative property - ## @param value Value to set for the cumulative property. - ## @return a void - ## - def cumulative=(value) - @cumulative = value - end - ## - ## Gets the degFreedom property value. The degFreedom property - ## @return a json - ## - def deg_freedom - return @deg_freedom - end - ## - ## Sets the degFreedom property value. The degFreedom property - ## @param value Value to set for the degFreedom property. - ## @return a void - ## - def deg_freedom=(value) - @deg_freedom = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "cumulative" => lambda {|n| @cumulative = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "degFreedom" => lambda {|n| @deg_freedom = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "x" => lambda {|n| @x = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -110,26 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("cumulative", @cumulative) - writer.write_object_value("degFreedom", @deg_freedom) - writer.write_object_value("x", @x) writer.write_additional_data(@additional_data) end - ## - ## Gets the x property value. The x property - ## @return a json - ## - def x - return @x - end - ## - ## Sets the x property value. The x property - ## @param value Value to set for the x property. - ## @return a void - ## - def x=(value) - @x = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/chi_sq_dist/chi_sq_dist_request_builder.rb b/lib/drives/item/items/item/workbook/functions/chi_sq_dist/chi_sq_dist_request_builder.rb index 68bd61199d..5a9341ea62 100644 --- a/lib/drives/item/items/item/workbook/functions/chi_sq_dist/chi_sq_dist_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/chi_sq_dist/chi_sq_dist_request_builder.rb @@ -23,7 +23,7 @@ module ChiSq_Dist class ChiSqDistRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## - ## Instantiates a new ChiSq_DistRequestBuilder and sets the default values. + ## Instantiates a new ChiSqDistRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request ## @param request_adapter The request adapter to use to execute the requests. ## @return a void @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a chi_sq_dist_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ChiSqDistRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/chi_sq_dist_r_t/chi_sq_dist_r_t_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/chi_sq_dist_r_t/chi_sq_dist_r_t_post_request_body.rb index ddee5dcb2b..1fbb3a9f48 100644 --- a/lib/drives/item/items/item/workbook/functions/chi_sq_dist_r_t/chi_sq_dist_r_t_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/chi_sq_dist_r_t/chi_sq_dist_r_t_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,21 +22,15 @@ class ChiSqDistRTPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The degFreedom property - @deg_freedom - ## - # The x property - @x - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -60,28 +53,11 @@ def self.create_from_discriminator_value(parse_node) return ChiSqDistRTPostRequestBody.new end ## - ## Gets the degFreedom property value. The degFreedom property - ## @return a json - ## - def deg_freedom - return @deg_freedom - end - ## - ## Sets the degFreedom property value. The degFreedom property - ## @param value Value to set for the degFreedom property. - ## @return a void - ## - def deg_freedom=(value) - @deg_freedom = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "degFreedom" => lambda {|n| @deg_freedom = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "x" => lambda {|n| @x = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -91,25 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("degFreedom", @deg_freedom) - writer.write_object_value("x", @x) writer.write_additional_data(@additional_data) end - ## - ## Gets the x property value. The x property - ## @return a json - ## - def x - return @x - end - ## - ## Sets the x property value. The x property - ## @param value Value to set for the x property. - ## @return a void - ## - def x=(value) - @x = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/chi_sq_dist_r_t/chi_sq_dist_r_t_request_builder.rb b/lib/drives/item/items/item/workbook/functions/chi_sq_dist_r_t/chi_sq_dist_r_t_request_builder.rb index ad2f299857..8269189e8a 100644 --- a/lib/drives/item/items/item/workbook/functions/chi_sq_dist_r_t/chi_sq_dist_r_t_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/chi_sq_dist_r_t/chi_sq_dist_r_t_request_builder.rb @@ -23,7 +23,7 @@ module ChiSq_Dist_RT class ChiSqDistRTRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## - ## Instantiates a new ChiSq_Dist_RTRequestBuilder and sets the default values. + ## Instantiates a new ChiSqDistRTRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request ## @param request_adapter The request adapter to use to execute the requests. ## @return a void @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a chi_sq_dist_r_t_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ChiSqDistRTRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/chi_sq_inv/chi_sq_inv_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/chi_sq_inv/chi_sq_inv_post_request_body.rb index 825523baaa..e6d17ff6b5 100644 --- a/lib/drives/item/items/item/workbook/functions/chi_sq_inv/chi_sq_inv_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/chi_sq_inv/chi_sq_inv_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,21 +22,15 @@ class ChiSqInvPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The degFreedom property - @deg_freedom - ## - # The probability property - @probability - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -60,54 +53,20 @@ def self.create_from_discriminator_value(parse_node) return ChiSqInvPostRequestBody.new end ## - ## Gets the degFreedom property value. The degFreedom property - ## @return a json - ## - def deg_freedom - return @deg_freedom - end - ## - ## Sets the degFreedom property value. The degFreedom property - ## @param value Value to set for the degFreedom property. - ## @return a void - ## - def deg_freedom=(value) - @deg_freedom = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "degFreedom" => lambda {|n| @deg_freedom = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "probability" => lambda {|n| @probability = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the probability property value. The probability property - ## @return a json - ## - def probability - return @probability - end - ## - ## Sets the probability property value. The probability property - ## @param value Value to set for the probability property. - ## @return a void - ## - def probability=(value) - @probability = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("degFreedom", @deg_freedom) - writer.write_object_value("probability", @probability) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/chi_sq_inv/chi_sq_inv_request_builder.rb b/lib/drives/item/items/item/workbook/functions/chi_sq_inv/chi_sq_inv_request_builder.rb index cad55a745a..85b5839b4e 100644 --- a/lib/drives/item/items/item/workbook/functions/chi_sq_inv/chi_sq_inv_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/chi_sq_inv/chi_sq_inv_request_builder.rb @@ -23,7 +23,7 @@ module ChiSq_Inv class ChiSqInvRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## - ## Instantiates a new ChiSq_InvRequestBuilder and sets the default values. + ## Instantiates a new ChiSqInvRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request ## @param request_adapter The request adapter to use to execute the requests. ## @return a void @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a chi_sq_inv_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ChiSqInvRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/chi_sq_inv_r_t/chi_sq_inv_r_t_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/chi_sq_inv_r_t/chi_sq_inv_r_t_post_request_body.rb index eec3bc6f7e..b53e9b669a 100644 --- a/lib/drives/item/items/item/workbook/functions/chi_sq_inv_r_t/chi_sq_inv_r_t_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/chi_sq_inv_r_t/chi_sq_inv_r_t_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,21 +22,15 @@ class ChiSqInvRTPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The degFreedom property - @deg_freedom - ## - # The probability property - @probability - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -60,54 +53,20 @@ def self.create_from_discriminator_value(parse_node) return ChiSqInvRTPostRequestBody.new end ## - ## Gets the degFreedom property value. The degFreedom property - ## @return a json - ## - def deg_freedom - return @deg_freedom - end - ## - ## Sets the degFreedom property value. The degFreedom property - ## @param value Value to set for the degFreedom property. - ## @return a void - ## - def deg_freedom=(value) - @deg_freedom = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "degFreedom" => lambda {|n| @deg_freedom = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "probability" => lambda {|n| @probability = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the probability property value. The probability property - ## @return a json - ## - def probability - return @probability - end - ## - ## Sets the probability property value. The probability property - ## @param value Value to set for the probability property. - ## @return a void - ## - def probability=(value) - @probability = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("degFreedom", @deg_freedom) - writer.write_object_value("probability", @probability) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/chi_sq_inv_r_t/chi_sq_inv_r_t_request_builder.rb b/lib/drives/item/items/item/workbook/functions/chi_sq_inv_r_t/chi_sq_inv_r_t_request_builder.rb index 8c6063baa6..ad8744c47e 100644 --- a/lib/drives/item/items/item/workbook/functions/chi_sq_inv_r_t/chi_sq_inv_r_t_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/chi_sq_inv_r_t/chi_sq_inv_r_t_request_builder.rb @@ -23,7 +23,7 @@ module ChiSq_Inv_RT class ChiSqInvRTRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## - ## Instantiates a new ChiSq_Inv_RTRequestBuilder and sets the default values. + ## Instantiates a new ChiSqInvRTRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request ## @param request_adapter The request adapter to use to execute the requests. ## @return a void @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a chi_sq_inv_r_t_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ChiSqInvRTRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/choose/choose_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/choose/choose_post_request_body.rb index c851f29c74..d145d26ca4 100644 --- a/lib/drives/item/items/item/workbook/functions/choose/choose_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/choose/choose_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class ChoosePostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The indexNum property - @index_num - ## - # The values property - @values - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new choosePostRequestBody and sets the default values. + ## Instantiates a new ChoosePostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -65,51 +58,17 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "indexNum" => lambda {|n| @index_num = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "values" => lambda {|n| @values = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the indexNum property value. The indexNum property - ## @return a json - ## - def index_num - return @index_num - end - ## - ## Sets the indexNum property value. The indexNum property - ## @param value Value to set for the indexNum property. - ## @return a void - ## - def index_num=(value) - @index_num = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("indexNum", @index_num) - writer.write_object_value("values", @values) writer.write_additional_data(@additional_data) end - ## - ## Gets the values property value. The values property - ## @return a json - ## - def values - return @values - end - ## - ## Sets the values property value. The values property - ## @param value Value to set for the values property. - ## @return a void - ## - def values=(value) - @values = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/choose/choose_request_builder.rb b/lib/drives/item/items/item/workbook/functions/choose/choose_request_builder.rb index 74489fe3e6..7402347e83 100644 --- a/lib/drives/item/items/item/workbook/functions/choose/choose_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/choose/choose_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a choose_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ChooseRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/clean/clean_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/clean/clean_post_request_body.rb index bdfd8948d4..75673216f0 100644 --- a/lib/drives/item/items/item/workbook/functions/clean/clean_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/clean/clean_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class CleanPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The text property - @text - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new cleanPostRequestBody and sets the default values. + ## Instantiates a new CleanPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,7 +58,6 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "text" => lambda {|n| @text = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -72,24 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("text", @text) writer.write_additional_data(@additional_data) end - ## - ## Gets the text property value. The text property - ## @return a json - ## - def text - return @text - end - ## - ## Sets the text property value. The text property - ## @param value Value to set for the text property. - ## @return a void - ## - def text=(value) - @text = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/clean/clean_request_builder.rb b/lib/drives/item/items/item/workbook/functions/clean/clean_request_builder.rb index 853e02aa68..2417017513 100644 --- a/lib/drives/item/items/item/workbook/functions/clean/clean_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/clean/clean_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a clean_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CleanRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/code/code_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/code/code_post_request_body.rb index 0de22cf510..40587f17b8 100644 --- a/lib/drives/item/items/item/workbook/functions/code/code_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/code/code_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class CodePostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The text property - @text - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new codePostRequestBody and sets the default values. + ## Instantiates a new CodePostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,7 +58,6 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "text" => lambda {|n| @text = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -72,24 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("text", @text) writer.write_additional_data(@additional_data) end - ## - ## Gets the text property value. The text property - ## @return a json - ## - def text - return @text - end - ## - ## Sets the text property value. The text property - ## @param value Value to set for the text property. - ## @return a void - ## - def text=(value) - @text = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/code/code_request_builder.rb b/lib/drives/item/items/item/workbook/functions/code/code_request_builder.rb index cb75e388fe..29c4a13396 100644 --- a/lib/drives/item/items/item/workbook/functions/code/code_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/code/code_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a code_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CodeRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/columns/columns_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/columns/columns_post_request_body.rb index cdbec0019e..d9eca9c1e3 100644 --- a/lib/drives/item/items/item/workbook/functions/columns/columns_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/columns/columns_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,40 +22,22 @@ class ColumnsPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The array property - @array - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Gets the array property value. The array property - ## @return a json - ## - def array - return @array - end - ## - ## Sets the array property value. The array property - ## @param value Value to set for the array property. - ## @return a void - ## - def array=(value) - @array = value - end - ## - ## Instantiates a new columnsPostRequestBody and sets the default values. + ## Instantiates a new ColumnsPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -77,7 +58,6 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "array" => lambda {|n| @array = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -87,7 +67,6 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("array", @array) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/columns/columns_request_builder.rb b/lib/drives/item/items/item/workbook/functions/columns/columns_request_builder.rb index f6a741d236..56f215cf74 100644 --- a/lib/drives/item/items/item/workbook/functions/columns/columns_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/columns/columns_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a columns_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ColumnsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/combin/combin_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/combin/combin_post_request_body.rb index 8253fa69bd..57829ba955 100644 --- a/lib/drives/item/items/item/workbook/functions/combin/combin_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/combin/combin_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class CombinPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - # The numberChosen property - @number_chosen - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new combinPostRequestBody and sets the default values. + ## Instantiates a new CombinPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -65,49 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "numberChosen" => lambda {|n| @number_chosen = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## - ## Gets the numberChosen property value. The numberChosen property - ## @return a json - ## - def number_chosen - return @number_chosen - end - ## - ## Sets the numberChosen property value. The numberChosen property - ## @param value Value to set for the numberChosen property. - ## @return a void - ## - def number_chosen=(value) - @number_chosen = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) - writer.write_object_value("numberChosen", @number_chosen) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/combin/combin_request_builder.rb b/lib/drives/item/items/item/workbook/functions/combin/combin_request_builder.rb index afaae20bbc..2982a0a4fb 100644 --- a/lib/drives/item/items/item/workbook/functions/combin/combin_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/combin/combin_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a combin_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CombinRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/combina/combina_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/combina/combina_post_request_body.rb index c23d8e419a..cd643ada55 100644 --- a/lib/drives/item/items/item/workbook/functions/combina/combina_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/combina/combina_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class CombinaPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - # The numberChosen property - @number_chosen - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new combinaPostRequestBody and sets the default values. + ## Instantiates a new CombinaPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -65,49 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "numberChosen" => lambda {|n| @number_chosen = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## - ## Gets the numberChosen property value. The numberChosen property - ## @return a json - ## - def number_chosen - return @number_chosen - end - ## - ## Sets the numberChosen property value. The numberChosen property - ## @param value Value to set for the numberChosen property. - ## @return a void - ## - def number_chosen=(value) - @number_chosen = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) - writer.write_object_value("numberChosen", @number_chosen) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/combina/combina_request_builder.rb b/lib/drives/item/items/item/workbook/functions/combina/combina_request_builder.rb index eff10cb072..0977ce9678 100644 --- a/lib/drives/item/items/item/workbook/functions/combina/combina_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/combina/combina_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a combina_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CombinaRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/complex/complex_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/complex/complex_post_request_body.rb index a5bf946b38..8c30fc3c81 100644 --- a/lib/drives/item/items/item/workbook/functions/complex/complex_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/complex/complex_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,31 +22,22 @@ class ComplexPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The iNum property - @i_num - ## - # The realNum property - @real_num - ## - # The suffix property - @suffix - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new complexPostRequestBody and sets the default values. + ## Instantiates a new ComplexPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -68,68 +58,17 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "iNum" => lambda {|n| @i_num = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "realNum" => lambda {|n| @real_num = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "suffix" => lambda {|n| @suffix = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the iNum property value. The iNum property - ## @return a json - ## - def i_num - return @i_num - end - ## - ## Sets the iNum property value. The iNum property - ## @param value Value to set for the iNum property. - ## @return a void - ## - def i_num=(value) - @i_num = value - end - ## - ## Gets the realNum property value. The realNum property - ## @return a json - ## - def real_num - return @real_num - end - ## - ## Sets the realNum property value. The realNum property - ## @param value Value to set for the realNum property. - ## @return a void - ## - def real_num=(value) - @real_num = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("iNum", @i_num) - writer.write_object_value("realNum", @real_num) - writer.write_object_value("suffix", @suffix) writer.write_additional_data(@additional_data) end - ## - ## Gets the suffix property value. The suffix property - ## @return a json - ## - def suffix - return @suffix - end - ## - ## Sets the suffix property value. The suffix property - ## @param value Value to set for the suffix property. - ## @return a void - ## - def suffix=(value) - @suffix = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/complex/complex_request_builder.rb b/lib/drives/item/items/item/workbook/functions/complex/complex_request_builder.rb index 1d9608acc1..b0e58929a5 100644 --- a/lib/drives/item/items/item/workbook/functions/complex/complex_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/complex/complex_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a complex_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ComplexRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/concatenate/concatenate_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/concatenate/concatenate_post_request_body.rb index 4b56c6d266..1c24ada5af 100644 --- a/lib/drives/item/items/item/workbook/functions/concatenate/concatenate_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/concatenate/concatenate_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class ConcatenatePostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The values property - @values - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new concatenatePostRequestBody and sets the default values. + ## Instantiates a new ConcatenatePostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,7 +58,6 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "values" => lambda {|n| @values = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -72,24 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("values", @values) writer.write_additional_data(@additional_data) end - ## - ## Gets the values property value. The values property - ## @return a json - ## - def values - return @values - end - ## - ## Sets the values property value. The values property - ## @param value Value to set for the values property. - ## @return a void - ## - def values=(value) - @values = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/concatenate/concatenate_request_builder.rb b/lib/drives/item/items/item/workbook/functions/concatenate/concatenate_request_builder.rb index ffe4bdb600..912bcd0853 100644 --- a/lib/drives/item/items/item/workbook/functions/concatenate/concatenate_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/concatenate/concatenate_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a concatenate_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ConcatenateRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/confidence_norm/confidence_norm_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/confidence_norm/confidence_norm_post_request_body.rb index 8e6328ab65..9f496b024b 100644 --- a/lib/drives/item/items/item/workbook/functions/confidence_norm/confidence_norm_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/confidence_norm/confidence_norm_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,45 +22,21 @@ class ConfidenceNormPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The alpha property - @alpha - ## - # The size property - @size - ## - # The standardDev property - @standard_dev - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Gets the alpha property value. The alpha property - ## @return a json - ## - def alpha - return @alpha - end - ## - ## Sets the alpha property value. The alpha property - ## @param value Value to set for the alpha property. - ## @return a void - ## - def alpha=(value) - @alpha = value - end - ## ## Instantiates a new ConfidenceNormPostRequestBody and sets the default values. ## @return a void ## @@ -83,9 +58,6 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "alpha" => lambda {|n| @alpha = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "size" => lambda {|n| @size = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "standardDev" => lambda {|n| @standard_dev = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -95,41 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("alpha", @alpha) - writer.write_object_value("size", @size) - writer.write_object_value("standardDev", @standard_dev) writer.write_additional_data(@additional_data) end - ## - ## Gets the size property value. The size property - ## @return a json - ## - def size - return @size - end - ## - ## Sets the size property value. The size property - ## @param value Value to set for the size property. - ## @return a void - ## - def size=(value) - @size = value - end - ## - ## Gets the standardDev property value. The standardDev property - ## @return a json - ## - def standard_dev - return @standard_dev - end - ## - ## Sets the standardDev property value. The standardDev property - ## @param value Value to set for the standardDev property. - ## @return a void - ## - def standard_dev=(value) - @standard_dev = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/confidence_norm/confidence_norm_request_builder.rb b/lib/drives/item/items/item/workbook/functions/confidence_norm/confidence_norm_request_builder.rb index ce064d96b4..e93a8957ec 100644 --- a/lib/drives/item/items/item/workbook/functions/confidence_norm/confidence_norm_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/confidence_norm/confidence_norm_request_builder.rb @@ -23,7 +23,7 @@ module Confidence_Norm class ConfidenceNormRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## - ## Instantiates a new Confidence_NormRequestBuilder and sets the default values. + ## Instantiates a new ConfidenceNormRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request ## @param request_adapter The request adapter to use to execute the requests. ## @return a void @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a confidence_norm_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ConfidenceNormRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/confidence_t/confidence_t_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/confidence_t/confidence_t_post_request_body.rb index 4ca4d3ecf3..df12720df6 100644 --- a/lib/drives/item/items/item/workbook/functions/confidence_t/confidence_t_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/confidence_t/confidence_t_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,45 +22,21 @@ class ConfidenceTPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The alpha property - @alpha - ## - # The size property - @size - ## - # The standardDev property - @standard_dev - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Gets the alpha property value. The alpha property - ## @return a json - ## - def alpha - return @alpha - end - ## - ## Sets the alpha property value. The alpha property - ## @param value Value to set for the alpha property. - ## @return a void - ## - def alpha=(value) - @alpha = value - end - ## ## Instantiates a new ConfidenceTPostRequestBody and sets the default values. ## @return a void ## @@ -83,9 +58,6 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "alpha" => lambda {|n| @alpha = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "size" => lambda {|n| @size = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "standardDev" => lambda {|n| @standard_dev = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -95,41 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("alpha", @alpha) - writer.write_object_value("size", @size) - writer.write_object_value("standardDev", @standard_dev) writer.write_additional_data(@additional_data) end - ## - ## Gets the size property value. The size property - ## @return a json - ## - def size - return @size - end - ## - ## Sets the size property value. The size property - ## @param value Value to set for the size property. - ## @return a void - ## - def size=(value) - @size = value - end - ## - ## Gets the standardDev property value. The standardDev property - ## @return a json - ## - def standard_dev - return @standard_dev - end - ## - ## Sets the standardDev property value. The standardDev property - ## @param value Value to set for the standardDev property. - ## @return a void - ## - def standard_dev=(value) - @standard_dev = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/confidence_t/confidence_t_request_builder.rb b/lib/drives/item/items/item/workbook/functions/confidence_t/confidence_t_request_builder.rb index efb2b1dc33..51c9e3322f 100644 --- a/lib/drives/item/items/item/workbook/functions/confidence_t/confidence_t_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/confidence_t/confidence_t_request_builder.rb @@ -23,7 +23,7 @@ module Confidence_T class ConfidenceTRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## - ## Instantiates a new Confidence_TRequestBuilder and sets the default values. + ## Instantiates a new ConfidenceTRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request ## @param request_adapter The request adapter to use to execute the requests. ## @return a void @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a confidence_t_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ConfidenceTRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/convert/convert_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/convert/convert_post_request_body.rb index aac5d7ef46..7b6419077c 100644 --- a/lib/drives/item/items/item/workbook/functions/convert/convert_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/convert/convert_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,31 +22,22 @@ class ConvertPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The fromUnit property - @from_unit - ## - # The number property - @number - ## - # The toUnit property - @to_unit - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new convertPostRequestBody and sets the default values. + ## Instantiates a new ConvertPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -63,73 +53,22 @@ def self.create_from_discriminator_value(parse_node) return ConvertPostRequestBody.new end ## - ## Gets the fromUnit property value. The fromUnit property - ## @return a json - ## - def from_unit - return @from_unit - end - ## - ## Sets the fromUnit property value. The fromUnit property - ## @param value Value to set for the fromUnit property. - ## @return a void - ## - def from_unit=(value) - @from_unit = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "fromUnit" => lambda {|n| @from_unit = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "toUnit" => lambda {|n| @to_unit = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("fromUnit", @from_unit) - writer.write_object_value("number", @number) - writer.write_object_value("toUnit", @to_unit) writer.write_additional_data(@additional_data) end - ## - ## Gets the toUnit property value. The toUnit property - ## @return a json - ## - def to_unit - return @to_unit - end - ## - ## Sets the toUnit property value. The toUnit property - ## @param value Value to set for the toUnit property. - ## @return a void - ## - def to_unit=(value) - @to_unit = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/convert/convert_request_builder.rb b/lib/drives/item/items/item/workbook/functions/convert/convert_request_builder.rb index 5571a127f9..e6419e60bf 100644 --- a/lib/drives/item/items/item/workbook/functions/convert/convert_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/convert/convert_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a convert_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ConvertRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/cos/cos_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/cos/cos_post_request_body.rb index fafc0c9789..6f93da7518 100644 --- a/lib/drives/item/items/item/workbook/functions/cos/cos_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/cos/cos_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class CosPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new cosPostRequestBody and sets the default values. + ## Instantiates a new CosPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,32 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/cos/cos_request_builder.rb b/lib/drives/item/items/item/workbook/functions/cos/cos_request_builder.rb index 0a45150080..43e415ab23 100644 --- a/lib/drives/item/items/item/workbook/functions/cos/cos_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/cos/cos_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a cos_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CosRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/cosh/cosh_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/cosh/cosh_post_request_body.rb index 681bdd230d..7af1f544b2 100644 --- a/lib/drives/item/items/item/workbook/functions/cosh/cosh_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/cosh/cosh_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class CoshPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new coshPostRequestBody and sets the default values. + ## Instantiates a new CoshPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,32 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/cosh/cosh_request_builder.rb b/lib/drives/item/items/item/workbook/functions/cosh/cosh_request_builder.rb index 6259ad54ea..8aafd1aa13 100644 --- a/lib/drives/item/items/item/workbook/functions/cosh/cosh_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/cosh/cosh_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a cosh_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CoshRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/cot/cot_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/cot/cot_post_request_body.rb index 088e27fb89..c83ae58576 100644 --- a/lib/drives/item/items/item/workbook/functions/cot/cot_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/cot/cot_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class CotPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new cotPostRequestBody and sets the default values. + ## Instantiates a new CotPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,32 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/cot/cot_request_builder.rb b/lib/drives/item/items/item/workbook/functions/cot/cot_request_builder.rb index efdede22da..addda47857 100644 --- a/lib/drives/item/items/item/workbook/functions/cot/cot_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/cot/cot_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a cot_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CotRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/coth/coth_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/coth/coth_post_request_body.rb index a70acd2cb6..e8dee7de3e 100644 --- a/lib/drives/item/items/item/workbook/functions/coth/coth_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/coth/coth_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class CothPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new cothPostRequestBody and sets the default values. + ## Instantiates a new CothPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,32 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/coth/coth_request_builder.rb b/lib/drives/item/items/item/workbook/functions/coth/coth_request_builder.rb index 1c51c92d80..96e563d48c 100644 --- a/lib/drives/item/items/item/workbook/functions/coth/coth_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/coth/coth_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a coth_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CothRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/count/count_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/count/count_post_request_body.rb index 87de7fd5bf..77cbc95c7a 100644 --- a/lib/drives/item/items/item/workbook/functions/count/count_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/count/count_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class CountPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The values property - @values - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new countPostRequestBody and sets the default values. + ## Instantiates a new CountPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,7 +58,6 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "values" => lambda {|n| @values = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -72,24 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("values", @values) writer.write_additional_data(@additional_data) end - ## - ## Gets the values property value. The values property - ## @return a json - ## - def values - return @values - end - ## - ## Sets the values property value. The values property - ## @param value Value to set for the values property. - ## @return a void - ## - def values=(value) - @values = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/count/count_request_builder.rb b/lib/drives/item/items/item/workbook/functions/count/count_request_builder.rb index 35133f2879..ed20154359 100644 --- a/lib/drives/item/items/item/workbook/functions/count/count_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/count/count_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/count_a/count_a_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/count_a/count_a_post_request_body.rb index 314e11fc5c..d2d5f78436 100644 --- a/lib/drives/item/items/item/workbook/functions/count_a/count_a_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/count_a/count_a_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class CountAPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The values property - @values - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new countAPostRequestBody and sets the default values. + ## Instantiates a new CountAPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,7 +58,6 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "values" => lambda {|n| @values = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -72,24 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("values", @values) writer.write_additional_data(@additional_data) end - ## - ## Gets the values property value. The values property - ## @return a json - ## - def values - return @values - end - ## - ## Sets the values property value. The values property - ## @param value Value to set for the values property. - ## @return a void - ## - def values=(value) - @values = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/count_a/count_a_request_builder.rb b/lib/drives/item/items/item/workbook/functions/count_a/count_a_request_builder.rb index c9827b339f..fbfc566b7c 100644 --- a/lib/drives/item/items/item/workbook/functions/count_a/count_a_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/count_a/count_a_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_a_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountARequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/count_blank/count_blank_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/count_blank/count_blank_post_request_body.rb index 48c666d01d..4f54ae79ee 100644 --- a/lib/drives/item/items/item/workbook/functions/count_blank/count_blank_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/count_blank/count_blank_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class CountBlankPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The range property - @range - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new countBlankPostRequestBody and sets the default values. + ## Instantiates a new CountBlankPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,32 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "range" => lambda {|n| @range = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the range property value. The range property - ## @return a json - ## - def range - return @range - end - ## - ## Sets the range property value. The range property - ## @param value Value to set for the range property. - ## @return a void - ## - def range=(value) - @range = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("range", @range) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/count_blank/count_blank_request_builder.rb b/lib/drives/item/items/item/workbook/functions/count_blank/count_blank_request_builder.rb index 0d3fa84768..68b469c36b 100644 --- a/lib/drives/item/items/item/workbook/functions/count_blank/count_blank_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/count_blank/count_blank_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_blank_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountBlankRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/count_if/count_if_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/count_if/count_if_post_request_body.rb index 537d702aaa..7dfe8cbf92 100644 --- a/lib/drives/item/items/item/workbook/functions/count_if/count_if_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/count_if/count_if_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class CountIfPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The criteria property - @criteria - ## - # The range property - @range - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new countIfPostRequestBody and sets the default values. + ## Instantiates a new CountIfPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -60,54 +53,20 @@ def self.create_from_discriminator_value(parse_node) return CountIfPostRequestBody.new end ## - ## Gets the criteria property value. The criteria property - ## @return a json - ## - def criteria - return @criteria - end - ## - ## Sets the criteria property value. The criteria property - ## @param value Value to set for the criteria property. - ## @return a void - ## - def criteria=(value) - @criteria = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "criteria" => lambda {|n| @criteria = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "range" => lambda {|n| @range = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the range property value. The range property - ## @return a json - ## - def range - return @range - end - ## - ## Sets the range property value. The range property - ## @param value Value to set for the range property. - ## @return a void - ## - def range=(value) - @range = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("criteria", @criteria) - writer.write_object_value("range", @range) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/count_if/count_if_request_builder.rb b/lib/drives/item/items/item/workbook/functions/count_if/count_if_request_builder.rb index e26e22080a..2aacd8b215 100644 --- a/lib/drives/item/items/item/workbook/functions/count_if/count_if_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/count_if/count_if_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_if_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountIfRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/count_ifs/count_ifs_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/count_ifs/count_ifs_post_request_body.rb index 96cf7e44fa..d5997e9930 100644 --- a/lib/drives/item/items/item/workbook/functions/count_ifs/count_ifs_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/count_ifs/count_ifs_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class CountIfsPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The values property - @values - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new countIfsPostRequestBody and sets the default values. + ## Instantiates a new CountIfsPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,7 +58,6 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "values" => lambda {|n| @values = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -72,24 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("values", @values) writer.write_additional_data(@additional_data) end - ## - ## Gets the values property value. The values property - ## @return a json - ## - def values - return @values - end - ## - ## Sets the values property value. The values property - ## @param value Value to set for the values property. - ## @return a void - ## - def values=(value) - @values = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/count_ifs/count_ifs_request_builder.rb b/lib/drives/item/items/item/workbook/functions/count_ifs/count_ifs_request_builder.rb index 8f7d0ad1bd..5048014f0c 100644 --- a/lib/drives/item/items/item/workbook/functions/count_ifs/count_ifs_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/count_ifs/count_ifs_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a count_ifs_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CountIfsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/coup_day_bs/coup_day_bs_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/coup_day_bs/coup_day_bs_post_request_body.rb index f38d0b833f..c56eb19121 100644 --- a/lib/drives/item/items/item/workbook/functions/coup_day_bs/coup_day_bs_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/coup_day_bs/coup_day_bs_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,49 +22,22 @@ class CoupDayBsPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The basis property - @basis - ## - # The frequency property - @frequency - ## - # The maturity property - @maturity - ## - # The settlement property - @settlement - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Gets the basis property value. The basis property - ## @return a json - ## - def basis - return @basis - end - ## - ## Sets the basis property value. The basis property - ## @param value Value to set for the basis property. - ## @return a void - ## - def basis=(value) - @basis = value - end - ## - ## Instantiates a new coupDayBsPostRequestBody and sets the default values. + ## Instantiates a new CoupDayBsPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -81,75 +53,22 @@ def self.create_from_discriminator_value(parse_node) return CoupDayBsPostRequestBody.new end ## - ## Gets the frequency property value. The frequency property - ## @return a json - ## - def frequency - return @frequency - end - ## - ## Sets the frequency property value. The frequency property - ## @param value Value to set for the frequency property. - ## @return a void - ## - def frequency=(value) - @frequency = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "basis" => lambda {|n| @basis = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "frequency" => lambda {|n| @frequency = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "maturity" => lambda {|n| @maturity = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "settlement" => lambda {|n| @settlement = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the maturity property value. The maturity property - ## @return a json - ## - def maturity - return @maturity - end - ## - ## Sets the maturity property value. The maturity property - ## @param value Value to set for the maturity property. - ## @return a void - ## - def maturity=(value) - @maturity = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("basis", @basis) - writer.write_object_value("frequency", @frequency) - writer.write_object_value("maturity", @maturity) - writer.write_object_value("settlement", @settlement) writer.write_additional_data(@additional_data) end - ## - ## Gets the settlement property value. The settlement property - ## @return a json - ## - def settlement - return @settlement - end - ## - ## Sets the settlement property value. The settlement property - ## @param value Value to set for the settlement property. - ## @return a void - ## - def settlement=(value) - @settlement = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/coup_day_bs/coup_day_bs_request_builder.rb b/lib/drives/item/items/item/workbook/functions/coup_day_bs/coup_day_bs_request_builder.rb index b52fdf13c7..8b1db7b541 100644 --- a/lib/drives/item/items/item/workbook/functions/coup_day_bs/coup_day_bs_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/coup_day_bs/coup_day_bs_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a coup_day_bs_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CoupDayBsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/coup_days/coup_days_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/coup_days/coup_days_post_request_body.rb index bfe43b0272..3794ba6a1d 100644 --- a/lib/drives/item/items/item/workbook/functions/coup_days/coup_days_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/coup_days/coup_days_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,49 +22,22 @@ class CoupDaysPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The basis property - @basis - ## - # The frequency property - @frequency - ## - # The maturity property - @maturity - ## - # The settlement property - @settlement - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Gets the basis property value. The basis property - ## @return a json - ## - def basis - return @basis - end - ## - ## Sets the basis property value. The basis property - ## @param value Value to set for the basis property. - ## @return a void - ## - def basis=(value) - @basis = value - end - ## - ## Instantiates a new coupDaysPostRequestBody and sets the default values. + ## Instantiates a new CoupDaysPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -81,75 +53,22 @@ def self.create_from_discriminator_value(parse_node) return CoupDaysPostRequestBody.new end ## - ## Gets the frequency property value. The frequency property - ## @return a json - ## - def frequency - return @frequency - end - ## - ## Sets the frequency property value. The frequency property - ## @param value Value to set for the frequency property. - ## @return a void - ## - def frequency=(value) - @frequency = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "basis" => lambda {|n| @basis = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "frequency" => lambda {|n| @frequency = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "maturity" => lambda {|n| @maturity = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "settlement" => lambda {|n| @settlement = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the maturity property value. The maturity property - ## @return a json - ## - def maturity - return @maturity - end - ## - ## Sets the maturity property value. The maturity property - ## @param value Value to set for the maturity property. - ## @return a void - ## - def maturity=(value) - @maturity = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("basis", @basis) - writer.write_object_value("frequency", @frequency) - writer.write_object_value("maturity", @maturity) - writer.write_object_value("settlement", @settlement) writer.write_additional_data(@additional_data) end - ## - ## Gets the settlement property value. The settlement property - ## @return a json - ## - def settlement - return @settlement - end - ## - ## Sets the settlement property value. The settlement property - ## @param value Value to set for the settlement property. - ## @return a void - ## - def settlement=(value) - @settlement = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/coup_days/coup_days_request_builder.rb b/lib/drives/item/items/item/workbook/functions/coup_days/coup_days_request_builder.rb index c407ab2953..44f7235437 100644 --- a/lib/drives/item/items/item/workbook/functions/coup_days/coup_days_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/coup_days/coup_days_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a coup_days_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CoupDaysRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/coup_days_nc/coup_days_nc_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/coup_days_nc/coup_days_nc_post_request_body.rb index c9f8e5fc76..fa3e4375e9 100644 --- a/lib/drives/item/items/item/workbook/functions/coup_days_nc/coup_days_nc_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/coup_days_nc/coup_days_nc_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,49 +22,22 @@ class CoupDaysNcPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The basis property - @basis - ## - # The frequency property - @frequency - ## - # The maturity property - @maturity - ## - # The settlement property - @settlement - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Gets the basis property value. The basis property - ## @return a json - ## - def basis - return @basis - end - ## - ## Sets the basis property value. The basis property - ## @param value Value to set for the basis property. - ## @return a void - ## - def basis=(value) - @basis = value - end - ## - ## Instantiates a new coupDaysNcPostRequestBody and sets the default values. + ## Instantiates a new CoupDaysNcPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -81,75 +53,22 @@ def self.create_from_discriminator_value(parse_node) return CoupDaysNcPostRequestBody.new end ## - ## Gets the frequency property value. The frequency property - ## @return a json - ## - def frequency - return @frequency - end - ## - ## Sets the frequency property value. The frequency property - ## @param value Value to set for the frequency property. - ## @return a void - ## - def frequency=(value) - @frequency = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "basis" => lambda {|n| @basis = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "frequency" => lambda {|n| @frequency = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "maturity" => lambda {|n| @maturity = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "settlement" => lambda {|n| @settlement = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the maturity property value. The maturity property - ## @return a json - ## - def maturity - return @maturity - end - ## - ## Sets the maturity property value. The maturity property - ## @param value Value to set for the maturity property. - ## @return a void - ## - def maturity=(value) - @maturity = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("basis", @basis) - writer.write_object_value("frequency", @frequency) - writer.write_object_value("maturity", @maturity) - writer.write_object_value("settlement", @settlement) writer.write_additional_data(@additional_data) end - ## - ## Gets the settlement property value. The settlement property - ## @return a json - ## - def settlement - return @settlement - end - ## - ## Sets the settlement property value. The settlement property - ## @param value Value to set for the settlement property. - ## @return a void - ## - def settlement=(value) - @settlement = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/coup_days_nc/coup_days_nc_request_builder.rb b/lib/drives/item/items/item/workbook/functions/coup_days_nc/coup_days_nc_request_builder.rb index 66ce95872a..7dfda24f8d 100644 --- a/lib/drives/item/items/item/workbook/functions/coup_days_nc/coup_days_nc_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/coup_days_nc/coup_days_nc_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a coup_days_nc_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CoupDaysNcRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/coup_ncd/coup_ncd_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/coup_ncd/coup_ncd_post_request_body.rb index fb6c3fa1df..bc93c063c5 100644 --- a/lib/drives/item/items/item/workbook/functions/coup_ncd/coup_ncd_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/coup_ncd/coup_ncd_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,49 +22,22 @@ class CoupNcdPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The basis property - @basis - ## - # The frequency property - @frequency - ## - # The maturity property - @maturity - ## - # The settlement property - @settlement - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Gets the basis property value. The basis property - ## @return a json - ## - def basis - return @basis - end - ## - ## Sets the basis property value. The basis property - ## @param value Value to set for the basis property. - ## @return a void - ## - def basis=(value) - @basis = value - end - ## - ## Instantiates a new coupNcdPostRequestBody and sets the default values. + ## Instantiates a new CoupNcdPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -81,75 +53,22 @@ def self.create_from_discriminator_value(parse_node) return CoupNcdPostRequestBody.new end ## - ## Gets the frequency property value. The frequency property - ## @return a json - ## - def frequency - return @frequency - end - ## - ## Sets the frequency property value. The frequency property - ## @param value Value to set for the frequency property. - ## @return a void - ## - def frequency=(value) - @frequency = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "basis" => lambda {|n| @basis = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "frequency" => lambda {|n| @frequency = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "maturity" => lambda {|n| @maturity = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "settlement" => lambda {|n| @settlement = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the maturity property value. The maturity property - ## @return a json - ## - def maturity - return @maturity - end - ## - ## Sets the maturity property value. The maturity property - ## @param value Value to set for the maturity property. - ## @return a void - ## - def maturity=(value) - @maturity = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("basis", @basis) - writer.write_object_value("frequency", @frequency) - writer.write_object_value("maturity", @maturity) - writer.write_object_value("settlement", @settlement) writer.write_additional_data(@additional_data) end - ## - ## Gets the settlement property value. The settlement property - ## @return a json - ## - def settlement - return @settlement - end - ## - ## Sets the settlement property value. The settlement property - ## @param value Value to set for the settlement property. - ## @return a void - ## - def settlement=(value) - @settlement = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/coup_ncd/coup_ncd_request_builder.rb b/lib/drives/item/items/item/workbook/functions/coup_ncd/coup_ncd_request_builder.rb index 4bb33c95a7..7839bdd5c7 100644 --- a/lib/drives/item/items/item/workbook/functions/coup_ncd/coup_ncd_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/coup_ncd/coup_ncd_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a coup_ncd_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CoupNcdRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/coup_num/coup_num_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/coup_num/coup_num_post_request_body.rb index 61f9745d25..8ad5f6ac70 100644 --- a/lib/drives/item/items/item/workbook/functions/coup_num/coup_num_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/coup_num/coup_num_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,49 +22,22 @@ class CoupNumPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The basis property - @basis - ## - # The frequency property - @frequency - ## - # The maturity property - @maturity - ## - # The settlement property - @settlement - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Gets the basis property value. The basis property - ## @return a json - ## - def basis - return @basis - end - ## - ## Sets the basis property value. The basis property - ## @param value Value to set for the basis property. - ## @return a void - ## - def basis=(value) - @basis = value - end - ## - ## Instantiates a new coupNumPostRequestBody and sets the default values. + ## Instantiates a new CoupNumPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -81,75 +53,22 @@ def self.create_from_discriminator_value(parse_node) return CoupNumPostRequestBody.new end ## - ## Gets the frequency property value. The frequency property - ## @return a json - ## - def frequency - return @frequency - end - ## - ## Sets the frequency property value. The frequency property - ## @param value Value to set for the frequency property. - ## @return a void - ## - def frequency=(value) - @frequency = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "basis" => lambda {|n| @basis = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "frequency" => lambda {|n| @frequency = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "maturity" => lambda {|n| @maturity = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "settlement" => lambda {|n| @settlement = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the maturity property value. The maturity property - ## @return a json - ## - def maturity - return @maturity - end - ## - ## Sets the maturity property value. The maturity property - ## @param value Value to set for the maturity property. - ## @return a void - ## - def maturity=(value) - @maturity = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("basis", @basis) - writer.write_object_value("frequency", @frequency) - writer.write_object_value("maturity", @maturity) - writer.write_object_value("settlement", @settlement) writer.write_additional_data(@additional_data) end - ## - ## Gets the settlement property value. The settlement property - ## @return a json - ## - def settlement - return @settlement - end - ## - ## Sets the settlement property value. The settlement property - ## @param value Value to set for the settlement property. - ## @return a void - ## - def settlement=(value) - @settlement = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/coup_num/coup_num_request_builder.rb b/lib/drives/item/items/item/workbook/functions/coup_num/coup_num_request_builder.rb index 80b6740dac..24a6237159 100644 --- a/lib/drives/item/items/item/workbook/functions/coup_num/coup_num_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/coup_num/coup_num_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a coup_num_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CoupNumRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/coup_pcd/coup_pcd_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/coup_pcd/coup_pcd_post_request_body.rb index f91355569f..a780ac8d8c 100644 --- a/lib/drives/item/items/item/workbook/functions/coup_pcd/coup_pcd_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/coup_pcd/coup_pcd_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,49 +22,22 @@ class CoupPcdPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The basis property - @basis - ## - # The frequency property - @frequency - ## - # The maturity property - @maturity - ## - # The settlement property - @settlement - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Gets the basis property value. The basis property - ## @return a json - ## - def basis - return @basis - end - ## - ## Sets the basis property value. The basis property - ## @param value Value to set for the basis property. - ## @return a void - ## - def basis=(value) - @basis = value - end - ## - ## Instantiates a new coupPcdPostRequestBody and sets the default values. + ## Instantiates a new CoupPcdPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -81,75 +53,22 @@ def self.create_from_discriminator_value(parse_node) return CoupPcdPostRequestBody.new end ## - ## Gets the frequency property value. The frequency property - ## @return a json - ## - def frequency - return @frequency - end - ## - ## Sets the frequency property value. The frequency property - ## @param value Value to set for the frequency property. - ## @return a void - ## - def frequency=(value) - @frequency = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "basis" => lambda {|n| @basis = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "frequency" => lambda {|n| @frequency = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "maturity" => lambda {|n| @maturity = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "settlement" => lambda {|n| @settlement = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the maturity property value. The maturity property - ## @return a json - ## - def maturity - return @maturity - end - ## - ## Sets the maturity property value. The maturity property - ## @param value Value to set for the maturity property. - ## @return a void - ## - def maturity=(value) - @maturity = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("basis", @basis) - writer.write_object_value("frequency", @frequency) - writer.write_object_value("maturity", @maturity) - writer.write_object_value("settlement", @settlement) writer.write_additional_data(@additional_data) end - ## - ## Gets the settlement property value. The settlement property - ## @return a json - ## - def settlement - return @settlement - end - ## - ## Sets the settlement property value. The settlement property - ## @param value Value to set for the settlement property. - ## @return a void - ## - def settlement=(value) - @settlement = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/coup_pcd/coup_pcd_request_builder.rb b/lib/drives/item/items/item/workbook/functions/coup_pcd/coup_pcd_request_builder.rb index cd51794116..434ef984fa 100644 --- a/lib/drives/item/items/item/workbook/functions/coup_pcd/coup_pcd_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/coup_pcd/coup_pcd_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a coup_pcd_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CoupPcdRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/csc/csc_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/csc/csc_post_request_body.rb index add906113e..50a963755d 100644 --- a/lib/drives/item/items/item/workbook/functions/csc/csc_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/csc/csc_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class CscPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new cscPostRequestBody and sets the default values. + ## Instantiates a new CscPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,32 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/csc/csc_request_builder.rb b/lib/drives/item/items/item/workbook/functions/csc/csc_request_builder.rb index 4dea6ff604..3a48654d1b 100644 --- a/lib/drives/item/items/item/workbook/functions/csc/csc_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/csc/csc_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a csc_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CscRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/csch/csch_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/csch/csch_post_request_body.rb index 309b05ab4d..db0e6cdf94 100644 --- a/lib/drives/item/items/item/workbook/functions/csch/csch_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/csch/csch_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class CschPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new cschPostRequestBody and sets the default values. + ## Instantiates a new CschPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,32 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/csch/csch_request_builder.rb b/lib/drives/item/items/item/workbook/functions/csch/csch_request_builder.rb index 0c3944e993..27a1ff3384 100644 --- a/lib/drives/item/items/item/workbook/functions/csch/csch_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/csch/csch_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a csch_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CschRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/cum_i_pmt/cum_i_pmt_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/cum_i_pmt/cum_i_pmt_post_request_body.rb index 8d0f2a7f1f..a5060ecb4c 100644 --- a/lib/drives/item/items/item/workbook/functions/cum_i_pmt/cum_i_pmt_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/cum_i_pmt/cum_i_pmt_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,40 +22,22 @@ class CumIPmtPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The endPeriod property - @end_period - ## - # The nper property - @nper - ## - # The pv property - @pv - ## - # The rate property - @rate - ## - # The startPeriod property - @start_period - ## - # The type property - @type - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new cumIPmtPostRequestBody and sets the default values. + ## Instantiates a new CumIPmtPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -72,124 +53,22 @@ def self.create_from_discriminator_value(parse_node) return CumIPmtPostRequestBody.new end ## - ## Gets the endPeriod property value. The endPeriod property - ## @return a json - ## - def end_period - return @end_period - end - ## - ## Sets the endPeriod property value. The endPeriod property - ## @param value Value to set for the endPeriod property. - ## @return a void - ## - def end_period=(value) - @end_period = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "endPeriod" => lambda {|n| @end_period = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "nper" => lambda {|n| @nper = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "pv" => lambda {|n| @pv = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "rate" => lambda {|n| @rate = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "startPeriod" => lambda {|n| @start_period = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "type" => lambda {|n| @type = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the nper property value. The nper property - ## @return a json - ## - def nper - return @nper - end - ## - ## Sets the nper property value. The nper property - ## @param value Value to set for the nper property. - ## @return a void - ## - def nper=(value) - @nper = value - end - ## - ## Gets the pv property value. The pv property - ## @return a json - ## - def pv - return @pv - end - ## - ## Sets the pv property value. The pv property - ## @param value Value to set for the pv property. - ## @return a void - ## - def pv=(value) - @pv = value - end - ## - ## Gets the rate property value. The rate property - ## @return a json - ## - def rate - return @rate - end - ## - ## Sets the rate property value. The rate property - ## @param value Value to set for the rate property. - ## @return a void - ## - def rate=(value) - @rate = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("endPeriod", @end_period) - writer.write_object_value("nper", @nper) - writer.write_object_value("pv", @pv) - writer.write_object_value("rate", @rate) - writer.write_object_value("startPeriod", @start_period) - writer.write_object_value("type", @type) writer.write_additional_data(@additional_data) end - ## - ## Gets the startPeriod property value. The startPeriod property - ## @return a json - ## - def start_period - return @start_period - end - ## - ## Sets the startPeriod property value. The startPeriod property - ## @param value Value to set for the startPeriod property. - ## @return a void - ## - def start_period=(value) - @start_period = value - end - ## - ## Gets the type property value. The type property - ## @return a json - ## - def type - return @type - end - ## - ## Sets the type property value. The type property - ## @param value Value to set for the type property. - ## @return a void - ## - def type=(value) - @type = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/cum_i_pmt/cum_i_pmt_request_builder.rb b/lib/drives/item/items/item/workbook/functions/cum_i_pmt/cum_i_pmt_request_builder.rb index 4ae8a5aaf6..1a6f80f25a 100644 --- a/lib/drives/item/items/item/workbook/functions/cum_i_pmt/cum_i_pmt_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/cum_i_pmt/cum_i_pmt_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a cum_i_pmt_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CumIPmtRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/cum_princ/cum_princ_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/cum_princ/cum_princ_post_request_body.rb index ec1d686561..43ea846091 100644 --- a/lib/drives/item/items/item/workbook/functions/cum_princ/cum_princ_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/cum_princ/cum_princ_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,40 +22,22 @@ class CumPrincPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The endPeriod property - @end_period - ## - # The nper property - @nper - ## - # The pv property - @pv - ## - # The rate property - @rate - ## - # The startPeriod property - @start_period - ## - # The type property - @type - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new cumPrincPostRequestBody and sets the default values. + ## Instantiates a new CumPrincPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -72,124 +53,22 @@ def self.create_from_discriminator_value(parse_node) return CumPrincPostRequestBody.new end ## - ## Gets the endPeriod property value. The endPeriod property - ## @return a json - ## - def end_period - return @end_period - end - ## - ## Sets the endPeriod property value. The endPeriod property - ## @param value Value to set for the endPeriod property. - ## @return a void - ## - def end_period=(value) - @end_period = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "endPeriod" => lambda {|n| @end_period = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "nper" => lambda {|n| @nper = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "pv" => lambda {|n| @pv = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "rate" => lambda {|n| @rate = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "startPeriod" => lambda {|n| @start_period = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "type" => lambda {|n| @type = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the nper property value. The nper property - ## @return a json - ## - def nper - return @nper - end - ## - ## Sets the nper property value. The nper property - ## @param value Value to set for the nper property. - ## @return a void - ## - def nper=(value) - @nper = value - end - ## - ## Gets the pv property value. The pv property - ## @return a json - ## - def pv - return @pv - end - ## - ## Sets the pv property value. The pv property - ## @param value Value to set for the pv property. - ## @return a void - ## - def pv=(value) - @pv = value - end - ## - ## Gets the rate property value. The rate property - ## @return a json - ## - def rate - return @rate - end - ## - ## Sets the rate property value. The rate property - ## @param value Value to set for the rate property. - ## @return a void - ## - def rate=(value) - @rate = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("endPeriod", @end_period) - writer.write_object_value("nper", @nper) - writer.write_object_value("pv", @pv) - writer.write_object_value("rate", @rate) - writer.write_object_value("startPeriod", @start_period) - writer.write_object_value("type", @type) writer.write_additional_data(@additional_data) end - ## - ## Gets the startPeriod property value. The startPeriod property - ## @return a json - ## - def start_period - return @start_period - end - ## - ## Sets the startPeriod property value. The startPeriod property - ## @param value Value to set for the startPeriod property. - ## @return a void - ## - def start_period=(value) - @start_period = value - end - ## - ## Gets the type property value. The type property - ## @return a json - ## - def type - return @type - end - ## - ## Sets the type property value. The type property - ## @param value Value to set for the type property. - ## @return a void - ## - def type=(value) - @type = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/cum_princ/cum_princ_request_builder.rb b/lib/drives/item/items/item/workbook/functions/cum_princ/cum_princ_request_builder.rb index c91a54bb29..2b617f05da 100644 --- a/lib/drives/item/items/item/workbook/functions/cum_princ/cum_princ_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/cum_princ/cum_princ_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a cum_princ_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return CumPrincRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/date/date_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/date/date_post_request_body.rb index 0d26c3eab5..2d991b8e2c 100644 --- a/lib/drives/item/items/item/workbook/functions/date/date_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/date/date_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,31 +22,22 @@ class DatePostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The day property - @day - ## - # The month property - @month - ## - # The year property - @year - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new datePostRequestBody and sets the default values. + ## Instantiates a new DatePostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -63,73 +53,22 @@ def self.create_from_discriminator_value(parse_node) return DatePostRequestBody.new end ## - ## Gets the day property value. The day property - ## @return a json - ## - def day - return @day - end - ## - ## Sets the day property value. The day property - ## @param value Value to set for the day property. - ## @return a void - ## - def day=(value) - @day = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "day" => lambda {|n| @day = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "month" => lambda {|n| @month = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "year" => lambda {|n| @year = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the month property value. The month property - ## @return a json - ## - def month - return @month - end - ## - ## Sets the month property value. The month property - ## @param value Value to set for the month property. - ## @return a void - ## - def month=(value) - @month = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("day", @day) - writer.write_object_value("month", @month) - writer.write_object_value("year", @year) writer.write_additional_data(@additional_data) end - ## - ## Gets the year property value. The year property - ## @return a json - ## - def year - return @year - end - ## - ## Sets the year property value. The year property - ## @param value Value to set for the year property. - ## @return a void - ## - def year=(value) - @year = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/date/date_request_builder.rb b/lib/drives/item/items/item/workbook/functions/date/date_request_builder.rb index 524d0fcb2b..7e3b88b071 100644 --- a/lib/drives/item/items/item/workbook/functions/date/date_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/date/date_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a date_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DateRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/datevalue/datevalue_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/datevalue/datevalue_post_request_body.rb index 47607386f1..11f65ffdcc 100644 --- a/lib/drives/item/items/item/workbook/functions/datevalue/datevalue_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/datevalue/datevalue_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class DatevaluePostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The dateText property - @date_text - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new datevaluePostRequestBody and sets the default values. + ## Instantiates a new DatevaluePostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -57,27 +53,11 @@ def self.create_from_discriminator_value(parse_node) return DatevaluePostRequestBody.new end ## - ## Gets the dateText property value. The dateText property - ## @return a json - ## - def date_text - return @date_text - end - ## - ## Sets the dateText property value. The dateText property - ## @param value Value to set for the dateText property. - ## @return a void - ## - def date_text=(value) - @date_text = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "dateText" => lambda {|n| @date_text = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -87,7 +67,6 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("dateText", @date_text) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/datevalue/datevalue_request_builder.rb b/lib/drives/item/items/item/workbook/functions/datevalue/datevalue_request_builder.rb index 4e5ff38905..74cfefd0ff 100644 --- a/lib/drives/item/items/item/workbook/functions/datevalue/datevalue_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/datevalue/datevalue_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a datevalue_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DatevalueRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/daverage/daverage_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/daverage/daverage_post_request_body.rb index 9e8a970e80..76b4b3ff11 100644 --- a/lib/drives/item/items/item/workbook/functions/daverage/daverage_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/daverage/daverage_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,31 +22,22 @@ class DaveragePostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The criteria property - @criteria - ## - # The database property - @database - ## - # The field property - @field - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new daveragePostRequestBody and sets the default values. + ## Instantiates a new DaveragePostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -63,59 +53,11 @@ def self.create_from_discriminator_value(parse_node) return DaveragePostRequestBody.new end ## - ## Gets the criteria property value. The criteria property - ## @return a json - ## - def criteria - return @criteria - end - ## - ## Sets the criteria property value. The criteria property - ## @param value Value to set for the criteria property. - ## @return a void - ## - def criteria=(value) - @criteria = value - end - ## - ## Gets the database property value. The database property - ## @return a json - ## - def database - return @database - end - ## - ## Sets the database property value. The database property - ## @param value Value to set for the database property. - ## @return a void - ## - def database=(value) - @database = value - end - ## - ## Gets the field property value. The field property - ## @return a json - ## - def field - return @field - end - ## - ## Sets the field property value. The field property - ## @param value Value to set for the field property. - ## @return a void - ## - def field=(value) - @field = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "criteria" => lambda {|n| @criteria = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "database" => lambda {|n| @database = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "field" => lambda {|n| @field = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -125,9 +67,6 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("criteria", @criteria) - writer.write_object_value("database", @database) - writer.write_object_value("field", @field) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/daverage/daverage_request_builder.rb b/lib/drives/item/items/item/workbook/functions/daverage/daverage_request_builder.rb index 3102b6e9a4..5cfda55cb7 100644 --- a/lib/drives/item/items/item/workbook/functions/daverage/daverage_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/daverage/daverage_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a daverage_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DaverageRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/day/day_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/day/day_post_request_body.rb index a4408e8362..d9b772ed2d 100644 --- a/lib/drives/item/items/item/workbook/functions/day/day_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/day/day_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class DayPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The serialNumber property - @serial_number - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new dayPostRequestBody and sets the default values. + ## Instantiates a new DayPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,32 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "serialNumber" => lambda {|n| @serial_number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the serialNumber property value. The serialNumber property - ## @return a json - ## - def serial_number - return @serial_number - end - ## - ## Sets the serialNumber property value. The serialNumber property - ## @param value Value to set for the serialNumber property. - ## @return a void - ## - def serial_number=(value) - @serial_number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("serialNumber", @serial_number) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/day/day_request_builder.rb b/lib/drives/item/items/item/workbook/functions/day/day_request_builder.rb index 2293a98b03..d609854ee2 100644 --- a/lib/drives/item/items/item/workbook/functions/day/day_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/day/day_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a day_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DayRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/days/days_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/days/days_post_request_body.rb index a294e308cd..1e68ee944a 100644 --- a/lib/drives/item/items/item/workbook/functions/days/days_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/days/days_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class DaysPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The endDate property - @end_date - ## - # The startDate property - @start_date - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new daysPostRequestBody and sets the default values. + ## Instantiates a new DaysPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -60,28 +53,11 @@ def self.create_from_discriminator_value(parse_node) return DaysPostRequestBody.new end ## - ## Gets the endDate property value. The endDate property - ## @return a json - ## - def end_date - return @end_date - end - ## - ## Sets the endDate property value. The endDate property - ## @param value Value to set for the endDate property. - ## @return a void - ## - def end_date=(value) - @end_date = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "endDate" => lambda {|n| @end_date = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "startDate" => lambda {|n| @start_date = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -91,25 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("endDate", @end_date) - writer.write_object_value("startDate", @start_date) writer.write_additional_data(@additional_data) end - ## - ## Gets the startDate property value. The startDate property - ## @return a json - ## - def start_date - return @start_date - end - ## - ## Sets the startDate property value. The startDate property - ## @param value Value to set for the startDate property. - ## @return a void - ## - def start_date=(value) - @start_date = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/days/days_request_builder.rb b/lib/drives/item/items/item/workbook/functions/days/days_request_builder.rb index 24210c4a96..c74047eec2 100644 --- a/lib/drives/item/items/item/workbook/functions/days/days_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/days/days_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a days_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DaysRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/days360/days360_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/days360/days360_post_request_body.rb index 86c378f3dd..29b4498c82 100644 --- a/lib/drives/item/items/item/workbook/functions/days360/days360_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/days360/days360_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,31 +22,22 @@ class Days360PostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The endDate property - @end_date - ## - # The method property - @method - ## - # The startDate property - @start_date - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new days360PostRequestBody and sets the default values. + ## Instantiates a new Days360PostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -63,73 +53,22 @@ def self.create_from_discriminator_value(parse_node) return Days360PostRequestBody.new end ## - ## Gets the endDate property value. The endDate property - ## @return a json - ## - def end_date - return @end_date - end - ## - ## Sets the endDate property value. The endDate property - ## @param value Value to set for the endDate property. - ## @return a void - ## - def end_date=(value) - @end_date = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "endDate" => lambda {|n| @end_date = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "method" => lambda {|n| @method = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "startDate" => lambda {|n| @start_date = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the method property value. The method property - ## @return a json - ## - def method - return @method - end - ## - ## Sets the method property value. The method property - ## @param value Value to set for the method property. - ## @return a void - ## - def method=(value) - @method = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("endDate", @end_date) - writer.write_object_value("method", @method) - writer.write_object_value("startDate", @start_date) writer.write_additional_data(@additional_data) end - ## - ## Gets the startDate property value. The startDate property - ## @return a json - ## - def start_date - return @start_date - end - ## - ## Sets the startDate property value. The startDate property - ## @param value Value to set for the startDate property. - ## @return a void - ## - def start_date=(value) - @start_date = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/days360/days360_request_builder.rb b/lib/drives/item/items/item/workbook/functions/days360/days360_request_builder.rb index e75c988b76..70bdcf27d3 100644 --- a/lib/drives/item/items/item/workbook/functions/days360/days360_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/days360/days360_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a days360_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return Days360RequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/db/db_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/db/db_post_request_body.rb index fad3614618..7e806ba4c6 100644 --- a/lib/drives/item/items/item/workbook/functions/db/db_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/db/db_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,58 +22,28 @@ class DbPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The cost property - @cost - ## - # The life property - @life - ## - # The month property - @month - ## - # The period property - @period - ## - # The salvage property - @salvage - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new dbPostRequestBody and sets the default values. + ## Instantiates a new DbPostRequestBody and sets the default values. ## @return a void ## def initialize() @additional_data = Hash.new end ## - ## Gets the cost property value. The cost property - ## @return a json - ## - def cost - return @cost - end - ## - ## Sets the cost property value. The cost property - ## @param value Value to set for the cost property. - ## @return a void - ## - def cost=(value) - @cost = value - end - ## ## Creates a new instance of the appropriate class based on discriminator value ## @param parse_node The parse node to use to read the discriminator value and create the object ## @return a db_post_request_body @@ -89,85 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "cost" => lambda {|n| @cost = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "life" => lambda {|n| @life = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "month" => lambda {|n| @month = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "period" => lambda {|n| @period = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "salvage" => lambda {|n| @salvage = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the life property value. The life property - ## @return a json - ## - def life - return @life - end - ## - ## Sets the life property value. The life property - ## @param value Value to set for the life property. - ## @return a void - ## - def life=(value) - @life = value - end - ## - ## Gets the month property value. The month property - ## @return a json - ## - def month - return @month - end - ## - ## Sets the month property value. The month property - ## @param value Value to set for the month property. - ## @return a void - ## - def month=(value) - @month = value - end - ## - ## Gets the period property value. The period property - ## @return a json - ## - def period - return @period - end - ## - ## Sets the period property value. The period property - ## @param value Value to set for the period property. - ## @return a void - ## - def period=(value) - @period = value - end - ## - ## Gets the salvage property value. The salvage property - ## @return a json - ## - def salvage - return @salvage - end - ## - ## Sets the salvage property value. The salvage property - ## @param value Value to set for the salvage property. - ## @return a void - ## - def salvage=(value) - @salvage = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("cost", @cost) - writer.write_object_value("life", @life) - writer.write_object_value("month", @month) - writer.write_object_value("period", @period) - writer.write_object_value("salvage", @salvage) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/db/db_request_builder.rb b/lib/drives/item/items/item/workbook/functions/db/db_request_builder.rb index 546a418836..6e6e2ae663 100644 --- a/lib/drives/item/items/item/workbook/functions/db/db_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/db/db_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a db_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DbRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/dbcs/dbcs_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/dbcs/dbcs_post_request_body.rb index b0c85bd06c..4056117d69 100644 --- a/lib/drives/item/items/item/workbook/functions/dbcs/dbcs_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/dbcs/dbcs_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class DbcsPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The text property - @text - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new dbcsPostRequestBody and sets the default values. + ## Instantiates a new DbcsPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,7 +58,6 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "text" => lambda {|n| @text = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -72,24 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("text", @text) writer.write_additional_data(@additional_data) end - ## - ## Gets the text property value. The text property - ## @return a json - ## - def text - return @text - end - ## - ## Sets the text property value. The text property - ## @param value Value to set for the text property. - ## @return a void - ## - def text=(value) - @text = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/dbcs/dbcs_request_builder.rb b/lib/drives/item/items/item/workbook/functions/dbcs/dbcs_request_builder.rb index c5909ceff6..81d2d77363 100644 --- a/lib/drives/item/items/item/workbook/functions/dbcs/dbcs_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/dbcs/dbcs_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a dbcs_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DbcsRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/dcount/dcount_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/dcount/dcount_post_request_body.rb index 450e495aa1..289683e638 100644 --- a/lib/drives/item/items/item/workbook/functions/dcount/dcount_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/dcount/dcount_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,31 +22,22 @@ class DcountPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The criteria property - @criteria - ## - # The database property - @database - ## - # The field property - @field - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new dcountPostRequestBody and sets the default values. + ## Instantiates a new DcountPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -63,59 +53,11 @@ def self.create_from_discriminator_value(parse_node) return DcountPostRequestBody.new end ## - ## Gets the criteria property value. The criteria property - ## @return a json - ## - def criteria - return @criteria - end - ## - ## Sets the criteria property value. The criteria property - ## @param value Value to set for the criteria property. - ## @return a void - ## - def criteria=(value) - @criteria = value - end - ## - ## Gets the database property value. The database property - ## @return a json - ## - def database - return @database - end - ## - ## Sets the database property value. The database property - ## @param value Value to set for the database property. - ## @return a void - ## - def database=(value) - @database = value - end - ## - ## Gets the field property value. The field property - ## @return a json - ## - def field - return @field - end - ## - ## Sets the field property value. The field property - ## @param value Value to set for the field property. - ## @return a void - ## - def field=(value) - @field = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "criteria" => lambda {|n| @criteria = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "database" => lambda {|n| @database = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "field" => lambda {|n| @field = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -125,9 +67,6 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("criteria", @criteria) - writer.write_object_value("database", @database) - writer.write_object_value("field", @field) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/dcount/dcount_request_builder.rb b/lib/drives/item/items/item/workbook/functions/dcount/dcount_request_builder.rb index 86ae803b3e..c463539fb5 100644 --- a/lib/drives/item/items/item/workbook/functions/dcount/dcount_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/dcount/dcount_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a dcount_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DcountRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/dcount_a/dcount_a_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/dcount_a/dcount_a_post_request_body.rb index e43cb2e6f9..7057c6fdbc 100644 --- a/lib/drives/item/items/item/workbook/functions/dcount_a/dcount_a_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/dcount_a/dcount_a_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,31 +22,22 @@ class DcountAPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The criteria property - @criteria - ## - # The database property - @database - ## - # The field property - @field - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new dcountAPostRequestBody and sets the default values. + ## Instantiates a new DcountAPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -63,59 +53,11 @@ def self.create_from_discriminator_value(parse_node) return DcountAPostRequestBody.new end ## - ## Gets the criteria property value. The criteria property - ## @return a json - ## - def criteria - return @criteria - end - ## - ## Sets the criteria property value. The criteria property - ## @param value Value to set for the criteria property. - ## @return a void - ## - def criteria=(value) - @criteria = value - end - ## - ## Gets the database property value. The database property - ## @return a json - ## - def database - return @database - end - ## - ## Sets the database property value. The database property - ## @param value Value to set for the database property. - ## @return a void - ## - def database=(value) - @database = value - end - ## - ## Gets the field property value. The field property - ## @return a json - ## - def field - return @field - end - ## - ## Sets the field property value. The field property - ## @param value Value to set for the field property. - ## @return a void - ## - def field=(value) - @field = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "criteria" => lambda {|n| @criteria = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "database" => lambda {|n| @database = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "field" => lambda {|n| @field = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -125,9 +67,6 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("criteria", @criteria) - writer.write_object_value("database", @database) - writer.write_object_value("field", @field) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/dcount_a/dcount_a_request_builder.rb b/lib/drives/item/items/item/workbook/functions/dcount_a/dcount_a_request_builder.rb index e5db317d3a..4e5897172f 100644 --- a/lib/drives/item/items/item/workbook/functions/dcount_a/dcount_a_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/dcount_a/dcount_a_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a dcount_a_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DcountARequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/ddb/ddb_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/ddb/ddb_post_request_body.rb index 2b4ccafec6..30013924dc 100644 --- a/lib/drives/item/items/item/workbook/functions/ddb/ddb_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/ddb/ddb_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,58 +22,28 @@ class DdbPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The cost property - @cost - ## - # The factor property - @factor - ## - # The life property - @life - ## - # The period property - @period - ## - # The salvage property - @salvage - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new ddbPostRequestBody and sets the default values. + ## Instantiates a new DdbPostRequestBody and sets the default values. ## @return a void ## def initialize() @additional_data = Hash.new end ## - ## Gets the cost property value. The cost property - ## @return a json - ## - def cost - return @cost - end - ## - ## Sets the cost property value. The cost property - ## @param value Value to set for the cost property. - ## @return a void - ## - def cost=(value) - @cost = value - end - ## ## Creates a new instance of the appropriate class based on discriminator value ## @param parse_node The parse node to use to read the discriminator value and create the object ## @return a ddb_post_request_body @@ -84,90 +53,20 @@ def self.create_from_discriminator_value(parse_node) return DdbPostRequestBody.new end ## - ## Gets the factor property value. The factor property - ## @return a json - ## - def factor - return @factor - end - ## - ## Sets the factor property value. The factor property - ## @param value Value to set for the factor property. - ## @return a void - ## - def factor=(value) - @factor = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "cost" => lambda {|n| @cost = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "factor" => lambda {|n| @factor = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "life" => lambda {|n| @life = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "period" => lambda {|n| @period = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "salvage" => lambda {|n| @salvage = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the life property value. The life property - ## @return a json - ## - def life - return @life - end - ## - ## Sets the life property value. The life property - ## @param value Value to set for the life property. - ## @return a void - ## - def life=(value) - @life = value - end - ## - ## Gets the period property value. The period property - ## @return a json - ## - def period - return @period - end - ## - ## Sets the period property value. The period property - ## @param value Value to set for the period property. - ## @return a void - ## - def period=(value) - @period = value - end - ## - ## Gets the salvage property value. The salvage property - ## @return a json - ## - def salvage - return @salvage - end - ## - ## Sets the salvage property value. The salvage property - ## @param value Value to set for the salvage property. - ## @return a void - ## - def salvage=(value) - @salvage = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("cost", @cost) - writer.write_object_value("factor", @factor) - writer.write_object_value("life", @life) - writer.write_object_value("period", @period) - writer.write_object_value("salvage", @salvage) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/ddb/ddb_request_builder.rb b/lib/drives/item/items/item/workbook/functions/ddb/ddb_request_builder.rb index 4bfefb29b9..d284f2e0cd 100644 --- a/lib/drives/item/items/item/workbook/functions/ddb/ddb_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/ddb/ddb_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ddb_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DdbRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/dec2_bin/dec2_bin_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/dec2_bin/dec2_bin_post_request_body.rb index 142b26623b..5a1933c2ea 100644 --- a/lib/drives/item/items/item/workbook/functions/dec2_bin/dec2_bin_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/dec2_bin/dec2_bin_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class Dec2BinPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - # The places property - @places - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new dec2BinPostRequestBody and sets the default values. + ## Instantiates a new Dec2BinPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -65,49 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "places" => lambda {|n| @places = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## - ## Gets the places property value. The places property - ## @return a json - ## - def places - return @places - end - ## - ## Sets the places property value. The places property - ## @param value Value to set for the places property. - ## @return a void - ## - def places=(value) - @places = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) - writer.write_object_value("places", @places) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/dec2_bin/dec2_bin_request_builder.rb b/lib/drives/item/items/item/workbook/functions/dec2_bin/dec2_bin_request_builder.rb index f7b7cd66b1..a1fec09d88 100644 --- a/lib/drives/item/items/item/workbook/functions/dec2_bin/dec2_bin_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/dec2_bin/dec2_bin_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a dec2_bin_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return Dec2BinRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/dec2_hex/dec2_hex_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/dec2_hex/dec2_hex_post_request_body.rb index 7a6da824de..1a461fd0e3 100644 --- a/lib/drives/item/items/item/workbook/functions/dec2_hex/dec2_hex_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/dec2_hex/dec2_hex_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class Dec2HexPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - # The places property - @places - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new dec2HexPostRequestBody and sets the default values. + ## Instantiates a new Dec2HexPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -65,49 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "places" => lambda {|n| @places = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## - ## Gets the places property value. The places property - ## @return a json - ## - def places - return @places - end - ## - ## Sets the places property value. The places property - ## @param value Value to set for the places property. - ## @return a void - ## - def places=(value) - @places = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) - writer.write_object_value("places", @places) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/dec2_hex/dec2_hex_request_builder.rb b/lib/drives/item/items/item/workbook/functions/dec2_hex/dec2_hex_request_builder.rb index bd06e814f3..5b4665cfda 100644 --- a/lib/drives/item/items/item/workbook/functions/dec2_hex/dec2_hex_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/dec2_hex/dec2_hex_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a dec2_hex_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return Dec2HexRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/dec2_oct/dec2_oct_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/dec2_oct/dec2_oct_post_request_body.rb index 8eb6669ae7..f4d0a75c1c 100644 --- a/lib/drives/item/items/item/workbook/functions/dec2_oct/dec2_oct_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/dec2_oct/dec2_oct_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class Dec2OctPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - # The places property - @places - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new dec2OctPostRequestBody and sets the default values. + ## Instantiates a new Dec2OctPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -65,49 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "places" => lambda {|n| @places = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## - ## Gets the places property value. The places property - ## @return a json - ## - def places - return @places - end - ## - ## Sets the places property value. The places property - ## @param value Value to set for the places property. - ## @return a void - ## - def places=(value) - @places = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) - writer.write_object_value("places", @places) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/dec2_oct/dec2_oct_request_builder.rb b/lib/drives/item/items/item/workbook/functions/dec2_oct/dec2_oct_request_builder.rb index 8ebe1df05b..cc5902938c 100644 --- a/lib/drives/item/items/item/workbook/functions/dec2_oct/dec2_oct_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/dec2_oct/dec2_oct_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a dec2_oct_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return Dec2OctRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/decimal/decimal_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/decimal/decimal_post_request_body.rb index cc9631f8f8..702eaae808 100644 --- a/lib/drives/item/items/item/workbook/functions/decimal/decimal_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/decimal/decimal_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class DecimalPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - # The radix property - @radix - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new decimalPostRequestBody and sets the default values. + ## Instantiates a new DecimalPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -65,49 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "radix" => lambda {|n| @radix = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## - ## Gets the radix property value. The radix property - ## @return a json - ## - def radix - return @radix - end - ## - ## Sets the radix property value. The radix property - ## @param value Value to set for the radix property. - ## @return a void - ## - def radix=(value) - @radix = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) - writer.write_object_value("radix", @radix) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/decimal/decimal_request_builder.rb b/lib/drives/item/items/item/workbook/functions/decimal/decimal_request_builder.rb index e29137f5d1..23c43f1555 100644 --- a/lib/drives/item/items/item/workbook/functions/decimal/decimal_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/decimal/decimal_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a decimal_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DecimalRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/degrees/degrees_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/degrees/degrees_post_request_body.rb index 7d97d2761d..625669d533 100644 --- a/lib/drives/item/items/item/workbook/functions/degrees/degrees_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/degrees/degrees_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,40 +22,22 @@ class DegreesPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The angle property - @angle - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Gets the angle property value. The angle property - ## @return a json - ## - def angle - return @angle - end - ## - ## Sets the angle property value. The angle property - ## @param value Value to set for the angle property. - ## @return a void - ## - def angle=(value) - @angle = value - end - ## - ## Instantiates a new degreesPostRequestBody and sets the default values. + ## Instantiates a new DegreesPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -77,7 +58,6 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "angle" => lambda {|n| @angle = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -87,7 +67,6 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("angle", @angle) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/degrees/degrees_request_builder.rb b/lib/drives/item/items/item/workbook/functions/degrees/degrees_request_builder.rb index f0b49fefb2..27b5524794 100644 --- a/lib/drives/item/items/item/workbook/functions/degrees/degrees_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/degrees/degrees_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a degrees_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DegreesRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/delta/delta_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/delta/delta_post_request_body.rb index f8a466fe0c..bb8d874cf3 100644 --- a/lib/drives/item/items/item/workbook/functions/delta/delta_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/delta/delta_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class DeltaPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number1 property - @number1 - ## - # The number2 property - @number2 - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new deltaPostRequestBody and sets the default values. + ## Instantiates a new DeltaPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -65,49 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number1" => lambda {|n| @number1 = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "number2" => lambda {|n| @number2 = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number1 property value. The number1 property - ## @return a json - ## - def number1 - return @number1 - end - ## - ## Sets the number1 property value. The number1 property - ## @param value Value to set for the number1 property. - ## @return a void - ## - def number1=(value) - @number1 = value - end - ## - ## Gets the number2 property value. The number2 property - ## @return a json - ## - def number2 - return @number2 - end - ## - ## Sets the number2 property value. The number2 property - ## @param value Value to set for the number2 property. - ## @return a void - ## - def number2=(value) - @number2 = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number1", @number1) - writer.write_object_value("number2", @number2) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/delta/delta_request_builder.rb b/lib/drives/item/items/item/workbook/functions/delta/delta_request_builder.rb index 4a41c39ffd..3dcf8be8d0 100644 --- a/lib/drives/item/items/item/workbook/functions/delta/delta_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/delta/delta_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a delta_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DeltaRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/dev_sq/dev_sq_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/dev_sq/dev_sq_post_request_body.rb index 3c856d6331..d50f2a5a05 100644 --- a/lib/drives/item/items/item/workbook/functions/dev_sq/dev_sq_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/dev_sq/dev_sq_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class DevSqPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The values property - @values - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new devSqPostRequestBody and sets the default values. + ## Instantiates a new DevSqPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,7 +58,6 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "values" => lambda {|n| @values = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -72,24 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("values", @values) writer.write_additional_data(@additional_data) end - ## - ## Gets the values property value. The values property - ## @return a json - ## - def values - return @values - end - ## - ## Sets the values property value. The values property - ## @param value Value to set for the values property. - ## @return a void - ## - def values=(value) - @values = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/dev_sq/dev_sq_request_builder.rb b/lib/drives/item/items/item/workbook/functions/dev_sq/dev_sq_request_builder.rb index e4107b22fc..aa6d9b60c3 100644 --- a/lib/drives/item/items/item/workbook/functions/dev_sq/dev_sq_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/dev_sq/dev_sq_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a dev_sq_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DevSqRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/dget/dget_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/dget/dget_post_request_body.rb index a169a8de75..cc0151f6e1 100644 --- a/lib/drives/item/items/item/workbook/functions/dget/dget_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/dget/dget_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,31 +22,22 @@ class DgetPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The criteria property - @criteria - ## - # The database property - @database - ## - # The field property - @field - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new dgetPostRequestBody and sets the default values. + ## Instantiates a new DgetPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -63,59 +53,11 @@ def self.create_from_discriminator_value(parse_node) return DgetPostRequestBody.new end ## - ## Gets the criteria property value. The criteria property - ## @return a json - ## - def criteria - return @criteria - end - ## - ## Sets the criteria property value. The criteria property - ## @param value Value to set for the criteria property. - ## @return a void - ## - def criteria=(value) - @criteria = value - end - ## - ## Gets the database property value. The database property - ## @return a json - ## - def database - return @database - end - ## - ## Sets the database property value. The database property - ## @param value Value to set for the database property. - ## @return a void - ## - def database=(value) - @database = value - end - ## - ## Gets the field property value. The field property - ## @return a json - ## - def field - return @field - end - ## - ## Sets the field property value. The field property - ## @param value Value to set for the field property. - ## @return a void - ## - def field=(value) - @field = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "criteria" => lambda {|n| @criteria = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "database" => lambda {|n| @database = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "field" => lambda {|n| @field = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -125,9 +67,6 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("criteria", @criteria) - writer.write_object_value("database", @database) - writer.write_object_value("field", @field) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/dget/dget_request_builder.rb b/lib/drives/item/items/item/workbook/functions/dget/dget_request_builder.rb index d5eae844d4..25e95f15d1 100644 --- a/lib/drives/item/items/item/workbook/functions/dget/dget_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/dget/dget_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a dget_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DgetRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/disc/disc_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/disc/disc_post_request_body.rb index fae70b2e8c..e7ff46ecf4 100644 --- a/lib/drives/item/items/item/workbook/functions/disc/disc_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/disc/disc_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,52 +22,22 @@ class DiscPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The basis property - @basis - ## - # The maturity property - @maturity - ## - # The pr property - @pr - ## - # The redemption property - @redemption - ## - # The settlement property - @settlement - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Gets the basis property value. The basis property - ## @return a json - ## - def basis - return @basis - end - ## - ## Sets the basis property value. The basis property - ## @param value Value to set for the basis property. - ## @return a void - ## - def basis=(value) - @basis = value - end - ## - ## Instantiates a new discPostRequestBody and sets the default values. + ## Instantiates a new DiscPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -89,87 +58,17 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "basis" => lambda {|n| @basis = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "maturity" => lambda {|n| @maturity = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "pr" => lambda {|n| @pr = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "redemption" => lambda {|n| @redemption = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "settlement" => lambda {|n| @settlement = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the maturity property value. The maturity property - ## @return a json - ## - def maturity - return @maturity - end - ## - ## Sets the maturity property value. The maturity property - ## @param value Value to set for the maturity property. - ## @return a void - ## - def maturity=(value) - @maturity = value - end - ## - ## Gets the pr property value. The pr property - ## @return a json - ## - def pr - return @pr - end - ## - ## Sets the pr property value. The pr property - ## @param value Value to set for the pr property. - ## @return a void - ## - def pr=(value) - @pr = value - end - ## - ## Gets the redemption property value. The redemption property - ## @return a json - ## - def redemption - return @redemption - end - ## - ## Sets the redemption property value. The redemption property - ## @param value Value to set for the redemption property. - ## @return a void - ## - def redemption=(value) - @redemption = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("basis", @basis) - writer.write_object_value("maturity", @maturity) - writer.write_object_value("pr", @pr) - writer.write_object_value("redemption", @redemption) - writer.write_object_value("settlement", @settlement) writer.write_additional_data(@additional_data) end - ## - ## Gets the settlement property value. The settlement property - ## @return a json - ## - def settlement - return @settlement - end - ## - ## Sets the settlement property value. The settlement property - ## @param value Value to set for the settlement property. - ## @return a void - ## - def settlement=(value) - @settlement = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/disc/disc_request_builder.rb b/lib/drives/item/items/item/workbook/functions/disc/disc_request_builder.rb index e6ebf11909..c5facd7613 100644 --- a/lib/drives/item/items/item/workbook/functions/disc/disc_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/disc/disc_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a disc_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DiscRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/dmax/dmax_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/dmax/dmax_post_request_body.rb index a9971307ab..a86bc635c9 100644 --- a/lib/drives/item/items/item/workbook/functions/dmax/dmax_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/dmax/dmax_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,31 +22,22 @@ class DmaxPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The criteria property - @criteria - ## - # The database property - @database - ## - # The field property - @field - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new dmaxPostRequestBody and sets the default values. + ## Instantiates a new DmaxPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -63,59 +53,11 @@ def self.create_from_discriminator_value(parse_node) return DmaxPostRequestBody.new end ## - ## Gets the criteria property value. The criteria property - ## @return a json - ## - def criteria - return @criteria - end - ## - ## Sets the criteria property value. The criteria property - ## @param value Value to set for the criteria property. - ## @return a void - ## - def criteria=(value) - @criteria = value - end - ## - ## Gets the database property value. The database property - ## @return a json - ## - def database - return @database - end - ## - ## Sets the database property value. The database property - ## @param value Value to set for the database property. - ## @return a void - ## - def database=(value) - @database = value - end - ## - ## Gets the field property value. The field property - ## @return a json - ## - def field - return @field - end - ## - ## Sets the field property value. The field property - ## @param value Value to set for the field property. - ## @return a void - ## - def field=(value) - @field = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "criteria" => lambda {|n| @criteria = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "database" => lambda {|n| @database = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "field" => lambda {|n| @field = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -125,9 +67,6 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("criteria", @criteria) - writer.write_object_value("database", @database) - writer.write_object_value("field", @field) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/dmax/dmax_request_builder.rb b/lib/drives/item/items/item/workbook/functions/dmax/dmax_request_builder.rb index 34d37f50e1..8647bee280 100644 --- a/lib/drives/item/items/item/workbook/functions/dmax/dmax_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/dmax/dmax_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a dmax_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DmaxRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/dmin/dmin_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/dmin/dmin_post_request_body.rb index c9c8546fcf..f100ebe461 100644 --- a/lib/drives/item/items/item/workbook/functions/dmin/dmin_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/dmin/dmin_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,31 +22,22 @@ class DminPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The criteria property - @criteria - ## - # The database property - @database - ## - # The field property - @field - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new dminPostRequestBody and sets the default values. + ## Instantiates a new DminPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -63,59 +53,11 @@ def self.create_from_discriminator_value(parse_node) return DminPostRequestBody.new end ## - ## Gets the criteria property value. The criteria property - ## @return a json - ## - def criteria - return @criteria - end - ## - ## Sets the criteria property value. The criteria property - ## @param value Value to set for the criteria property. - ## @return a void - ## - def criteria=(value) - @criteria = value - end - ## - ## Gets the database property value. The database property - ## @return a json - ## - def database - return @database - end - ## - ## Sets the database property value. The database property - ## @param value Value to set for the database property. - ## @return a void - ## - def database=(value) - @database = value - end - ## - ## Gets the field property value. The field property - ## @return a json - ## - def field - return @field - end - ## - ## Sets the field property value. The field property - ## @param value Value to set for the field property. - ## @return a void - ## - def field=(value) - @field = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "criteria" => lambda {|n| @criteria = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "database" => lambda {|n| @database = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "field" => lambda {|n| @field = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -125,9 +67,6 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("criteria", @criteria) - writer.write_object_value("database", @database) - writer.write_object_value("field", @field) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/dmin/dmin_request_builder.rb b/lib/drives/item/items/item/workbook/functions/dmin/dmin_request_builder.rb index c172f5febb..3df20c596a 100644 --- a/lib/drives/item/items/item/workbook/functions/dmin/dmin_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/dmin/dmin_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a dmin_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DminRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/dollar/dollar_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/dollar/dollar_post_request_body.rb index e215c4ebd5..c3a557187f 100644 --- a/lib/drives/item/items/item/workbook/functions/dollar/dollar_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/dollar/dollar_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class DollarPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The decimals property - @decimals - ## - # The number property - @number - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new dollarPostRequestBody and sets the default values. + ## Instantiates a new DollarPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -60,54 +53,20 @@ def self.create_from_discriminator_value(parse_node) return DollarPostRequestBody.new end ## - ## Gets the decimals property value. The decimals property - ## @return a json - ## - def decimals - return @decimals - end - ## - ## Sets the decimals property value. The decimals property - ## @param value Value to set for the decimals property. - ## @return a void - ## - def decimals=(value) - @decimals = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "decimals" => lambda {|n| @decimals = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("decimals", @decimals) - writer.write_object_value("number", @number) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/dollar/dollar_request_builder.rb b/lib/drives/item/items/item/workbook/functions/dollar/dollar_request_builder.rb index 04e4673fba..268bf6dbef 100644 --- a/lib/drives/item/items/item/workbook/functions/dollar/dollar_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/dollar/dollar_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a dollar_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DollarRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/dollar_de/dollar_de_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/dollar_de/dollar_de_post_request_body.rb index e0ec442b9d..39a8992a39 100644 --- a/lib/drives/item/items/item/workbook/functions/dollar_de/dollar_de_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/dollar_de/dollar_de_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class DollarDePostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The fraction property - @fraction - ## - # The fractionalDollar property - @fractional_dollar - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new dollarDePostRequestBody and sets the default values. + ## Instantiates a new DollarDePostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -60,43 +53,11 @@ def self.create_from_discriminator_value(parse_node) return DollarDePostRequestBody.new end ## - ## Gets the fraction property value. The fraction property - ## @return a json - ## - def fraction - return @fraction - end - ## - ## Sets the fraction property value. The fraction property - ## @param value Value to set for the fraction property. - ## @return a void - ## - def fraction=(value) - @fraction = value - end - ## - ## Gets the fractionalDollar property value. The fractionalDollar property - ## @return a json - ## - def fractional_dollar - return @fractional_dollar - end - ## - ## Sets the fractionalDollar property value. The fractionalDollar property - ## @param value Value to set for the fractionalDollar property. - ## @return a void - ## - def fractional_dollar=(value) - @fractional_dollar = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "fraction" => lambda {|n| @fraction = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "fractionalDollar" => lambda {|n| @fractional_dollar = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -106,8 +67,6 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("fraction", @fraction) - writer.write_object_value("fractionalDollar", @fractional_dollar) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/dollar_de/dollar_de_request_builder.rb b/lib/drives/item/items/item/workbook/functions/dollar_de/dollar_de_request_builder.rb index c1bf551678..3d82958ac8 100644 --- a/lib/drives/item/items/item/workbook/functions/dollar_de/dollar_de_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/dollar_de/dollar_de_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a dollar_de_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DollarDeRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/dollar_fr/dollar_fr_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/dollar_fr/dollar_fr_post_request_body.rb index 5fd4359003..262e487960 100644 --- a/lib/drives/item/items/item/workbook/functions/dollar_fr/dollar_fr_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/dollar_fr/dollar_fr_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class DollarFrPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The decimalDollar property - @decimal_dollar - ## - # The fraction property - @fraction - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new dollarFrPostRequestBody and sets the default values. + ## Instantiates a new DollarFrPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -60,43 +53,11 @@ def self.create_from_discriminator_value(parse_node) return DollarFrPostRequestBody.new end ## - ## Gets the decimalDollar property value. The decimalDollar property - ## @return a json - ## - def decimal_dollar - return @decimal_dollar - end - ## - ## Sets the decimalDollar property value. The decimalDollar property - ## @param value Value to set for the decimalDollar property. - ## @return a void - ## - def decimal_dollar=(value) - @decimal_dollar = value - end - ## - ## Gets the fraction property value. The fraction property - ## @return a json - ## - def fraction - return @fraction - end - ## - ## Sets the fraction property value. The fraction property - ## @param value Value to set for the fraction property. - ## @return a void - ## - def fraction=(value) - @fraction = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "decimalDollar" => lambda {|n| @decimal_dollar = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "fraction" => lambda {|n| @fraction = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -106,8 +67,6 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("decimalDollar", @decimal_dollar) - writer.write_object_value("fraction", @fraction) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/dollar_fr/dollar_fr_request_builder.rb b/lib/drives/item/items/item/workbook/functions/dollar_fr/dollar_fr_request_builder.rb index 244d7f0efe..a7829f3af4 100644 --- a/lib/drives/item/items/item/workbook/functions/dollar_fr/dollar_fr_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/dollar_fr/dollar_fr_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a dollar_fr_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DollarFrRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/dproduct/dproduct_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/dproduct/dproduct_post_request_body.rb index 36274a2036..2c96ffe89b 100644 --- a/lib/drives/item/items/item/workbook/functions/dproduct/dproduct_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/dproduct/dproduct_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,31 +22,22 @@ class DproductPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The criteria property - @criteria - ## - # The database property - @database - ## - # The field property - @field - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new dproductPostRequestBody and sets the default values. + ## Instantiates a new DproductPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -63,59 +53,11 @@ def self.create_from_discriminator_value(parse_node) return DproductPostRequestBody.new end ## - ## Gets the criteria property value. The criteria property - ## @return a json - ## - def criteria - return @criteria - end - ## - ## Sets the criteria property value. The criteria property - ## @param value Value to set for the criteria property. - ## @return a void - ## - def criteria=(value) - @criteria = value - end - ## - ## Gets the database property value. The database property - ## @return a json - ## - def database - return @database - end - ## - ## Sets the database property value. The database property - ## @param value Value to set for the database property. - ## @return a void - ## - def database=(value) - @database = value - end - ## - ## Gets the field property value. The field property - ## @return a json - ## - def field - return @field - end - ## - ## Sets the field property value. The field property - ## @param value Value to set for the field property. - ## @return a void - ## - def field=(value) - @field = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "criteria" => lambda {|n| @criteria = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "database" => lambda {|n| @database = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "field" => lambda {|n| @field = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -125,9 +67,6 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("criteria", @criteria) - writer.write_object_value("database", @database) - writer.write_object_value("field", @field) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/dproduct/dproduct_request_builder.rb b/lib/drives/item/items/item/workbook/functions/dproduct/dproduct_request_builder.rb index fdb3c33179..7424368478 100644 --- a/lib/drives/item/items/item/workbook/functions/dproduct/dproduct_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/dproduct/dproduct_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a dproduct_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DproductRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/dst_dev/dst_dev_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/dst_dev/dst_dev_post_request_body.rb index 9b34cd3f8b..ec224ad327 100644 --- a/lib/drives/item/items/item/workbook/functions/dst_dev/dst_dev_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/dst_dev/dst_dev_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,31 +22,22 @@ class DstDevPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The criteria property - @criteria - ## - # The database property - @database - ## - # The field property - @field - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new dstDevPostRequestBody and sets the default values. + ## Instantiates a new DstDevPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -63,59 +53,11 @@ def self.create_from_discriminator_value(parse_node) return DstDevPostRequestBody.new end ## - ## Gets the criteria property value. The criteria property - ## @return a json - ## - def criteria - return @criteria - end - ## - ## Sets the criteria property value. The criteria property - ## @param value Value to set for the criteria property. - ## @return a void - ## - def criteria=(value) - @criteria = value - end - ## - ## Gets the database property value. The database property - ## @return a json - ## - def database - return @database - end - ## - ## Sets the database property value. The database property - ## @param value Value to set for the database property. - ## @return a void - ## - def database=(value) - @database = value - end - ## - ## Gets the field property value. The field property - ## @return a json - ## - def field - return @field - end - ## - ## Sets the field property value. The field property - ## @param value Value to set for the field property. - ## @return a void - ## - def field=(value) - @field = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "criteria" => lambda {|n| @criteria = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "database" => lambda {|n| @database = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "field" => lambda {|n| @field = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -125,9 +67,6 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("criteria", @criteria) - writer.write_object_value("database", @database) - writer.write_object_value("field", @field) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/dst_dev/dst_dev_request_builder.rb b/lib/drives/item/items/item/workbook/functions/dst_dev/dst_dev_request_builder.rb index 90dce6008e..c501b0129a 100644 --- a/lib/drives/item/items/item/workbook/functions/dst_dev/dst_dev_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/dst_dev/dst_dev_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a dst_dev_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DstDevRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/dst_dev_p/dst_dev_p_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/dst_dev_p/dst_dev_p_post_request_body.rb index a35c71d267..4426774b5a 100644 --- a/lib/drives/item/items/item/workbook/functions/dst_dev_p/dst_dev_p_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/dst_dev_p/dst_dev_p_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,31 +22,22 @@ class DstDevPPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The criteria property - @criteria - ## - # The database property - @database - ## - # The field property - @field - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new dstDevPPostRequestBody and sets the default values. + ## Instantiates a new DstDevPPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -63,59 +53,11 @@ def self.create_from_discriminator_value(parse_node) return DstDevPPostRequestBody.new end ## - ## Gets the criteria property value. The criteria property - ## @return a json - ## - def criteria - return @criteria - end - ## - ## Sets the criteria property value. The criteria property - ## @param value Value to set for the criteria property. - ## @return a void - ## - def criteria=(value) - @criteria = value - end - ## - ## Gets the database property value. The database property - ## @return a json - ## - def database - return @database - end - ## - ## Sets the database property value. The database property - ## @param value Value to set for the database property. - ## @return a void - ## - def database=(value) - @database = value - end - ## - ## Gets the field property value. The field property - ## @return a json - ## - def field - return @field - end - ## - ## Sets the field property value. The field property - ## @param value Value to set for the field property. - ## @return a void - ## - def field=(value) - @field = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "criteria" => lambda {|n| @criteria = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "database" => lambda {|n| @database = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "field" => lambda {|n| @field = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -125,9 +67,6 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("criteria", @criteria) - writer.write_object_value("database", @database) - writer.write_object_value("field", @field) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/dst_dev_p/dst_dev_p_request_builder.rb b/lib/drives/item/items/item/workbook/functions/dst_dev_p/dst_dev_p_request_builder.rb index a15593b1db..03520a5a30 100644 --- a/lib/drives/item/items/item/workbook/functions/dst_dev_p/dst_dev_p_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/dst_dev_p/dst_dev_p_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a dst_dev_p_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DstDevPRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/dsum/dsum_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/dsum/dsum_post_request_body.rb index 62b696b195..5a9722facd 100644 --- a/lib/drives/item/items/item/workbook/functions/dsum/dsum_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/dsum/dsum_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,31 +22,22 @@ class DsumPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The criteria property - @criteria - ## - # The database property - @database - ## - # The field property - @field - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new dsumPostRequestBody and sets the default values. + ## Instantiates a new DsumPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -63,59 +53,11 @@ def self.create_from_discriminator_value(parse_node) return DsumPostRequestBody.new end ## - ## Gets the criteria property value. The criteria property - ## @return a json - ## - def criteria - return @criteria - end - ## - ## Sets the criteria property value. The criteria property - ## @param value Value to set for the criteria property. - ## @return a void - ## - def criteria=(value) - @criteria = value - end - ## - ## Gets the database property value. The database property - ## @return a json - ## - def database - return @database - end - ## - ## Sets the database property value. The database property - ## @param value Value to set for the database property. - ## @return a void - ## - def database=(value) - @database = value - end - ## - ## Gets the field property value. The field property - ## @return a json - ## - def field - return @field - end - ## - ## Sets the field property value. The field property - ## @param value Value to set for the field property. - ## @return a void - ## - def field=(value) - @field = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "criteria" => lambda {|n| @criteria = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "database" => lambda {|n| @database = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "field" => lambda {|n| @field = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -125,9 +67,6 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("criteria", @criteria) - writer.write_object_value("database", @database) - writer.write_object_value("field", @field) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/dsum/dsum_request_builder.rb b/lib/drives/item/items/item/workbook/functions/dsum/dsum_request_builder.rb index 279989ebcb..520bc8a0d0 100644 --- a/lib/drives/item/items/item/workbook/functions/dsum/dsum_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/dsum/dsum_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a dsum_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DsumRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/duration/duration_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/duration/duration_post_request_body.rb index 2bdce4471f..72f19dbf81 100644 --- a/lib/drives/item/items/item/workbook/functions/duration/duration_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/duration/duration_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,76 +22,28 @@ class DurationPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The basis property - @basis - ## - # The coupon property - @coupon - ## - # The frequency property - @frequency - ## - # The maturity property - @maturity - ## - # The settlement property - @settlement - ## - # The yld property - @yld - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Gets the basis property value. The basis property - ## @return a json - ## - def basis - return @basis - end - ## - ## Sets the basis property value. The basis property - ## @param value Value to set for the basis property. - ## @return a void - ## - def basis=(value) - @basis = value - end - ## - ## Instantiates a new durationPostRequestBody and sets the default values. + ## Instantiates a new DurationPostRequestBody and sets the default values. ## @return a void ## def initialize() @additional_data = Hash.new end ## - ## Gets the coupon property value. The coupon property - ## @return a json - ## - def coupon - return @coupon - end - ## - ## Sets the coupon property value. The coupon property - ## @param value Value to set for the coupon property. - ## @return a void - ## - def coupon=(value) - @coupon = value - end - ## ## Creates a new instance of the appropriate class based on discriminator value ## @param parse_node The parse node to use to read the discriminator value and create the object ## @return a duration_post_request_body @@ -102,94 +53,22 @@ def self.create_from_discriminator_value(parse_node) return DurationPostRequestBody.new end ## - ## Gets the frequency property value. The frequency property - ## @return a json - ## - def frequency - return @frequency - end - ## - ## Sets the frequency property value. The frequency property - ## @param value Value to set for the frequency property. - ## @return a void - ## - def frequency=(value) - @frequency = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "basis" => lambda {|n| @basis = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "coupon" => lambda {|n| @coupon = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "frequency" => lambda {|n| @frequency = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "maturity" => lambda {|n| @maturity = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "settlement" => lambda {|n| @settlement = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "yld" => lambda {|n| @yld = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the maturity property value. The maturity property - ## @return a json - ## - def maturity - return @maturity - end - ## - ## Sets the maturity property value. The maturity property - ## @param value Value to set for the maturity property. - ## @return a void - ## - def maturity=(value) - @maturity = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("basis", @basis) - writer.write_object_value("coupon", @coupon) - writer.write_object_value("frequency", @frequency) - writer.write_object_value("maturity", @maturity) - writer.write_object_value("settlement", @settlement) - writer.write_object_value("yld", @yld) writer.write_additional_data(@additional_data) end - ## - ## Gets the settlement property value. The settlement property - ## @return a json - ## - def settlement - return @settlement - end - ## - ## Sets the settlement property value. The settlement property - ## @param value Value to set for the settlement property. - ## @return a void - ## - def settlement=(value) - @settlement = value - end - ## - ## Gets the yld property value. The yld property - ## @return a json - ## - def yld - return @yld - end - ## - ## Sets the yld property value. The yld property - ## @param value Value to set for the yld property. - ## @return a void - ## - def yld=(value) - @yld = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/duration/duration_request_builder.rb b/lib/drives/item/items/item/workbook/functions/duration/duration_request_builder.rb index b5dc15d82b..1e857330ea 100644 --- a/lib/drives/item/items/item/workbook/functions/duration/duration_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/duration/duration_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a duration_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DurationRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/dvar/dvar_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/dvar/dvar_post_request_body.rb index eed6eb5a0d..4e07fa8d23 100644 --- a/lib/drives/item/items/item/workbook/functions/dvar/dvar_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/dvar/dvar_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,31 +22,22 @@ class DvarPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The criteria property - @criteria - ## - # The database property - @database - ## - # The field property - @field - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new dvarPostRequestBody and sets the default values. + ## Instantiates a new DvarPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -63,59 +53,11 @@ def self.create_from_discriminator_value(parse_node) return DvarPostRequestBody.new end ## - ## Gets the criteria property value. The criteria property - ## @return a json - ## - def criteria - return @criteria - end - ## - ## Sets the criteria property value. The criteria property - ## @param value Value to set for the criteria property. - ## @return a void - ## - def criteria=(value) - @criteria = value - end - ## - ## Gets the database property value. The database property - ## @return a json - ## - def database - return @database - end - ## - ## Sets the database property value. The database property - ## @param value Value to set for the database property. - ## @return a void - ## - def database=(value) - @database = value - end - ## - ## Gets the field property value. The field property - ## @return a json - ## - def field - return @field - end - ## - ## Sets the field property value. The field property - ## @param value Value to set for the field property. - ## @return a void - ## - def field=(value) - @field = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "criteria" => lambda {|n| @criteria = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "database" => lambda {|n| @database = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "field" => lambda {|n| @field = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -125,9 +67,6 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("criteria", @criteria) - writer.write_object_value("database", @database) - writer.write_object_value("field", @field) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/dvar/dvar_request_builder.rb b/lib/drives/item/items/item/workbook/functions/dvar/dvar_request_builder.rb index d2fe788a77..11bf6f41bc 100644 --- a/lib/drives/item/items/item/workbook/functions/dvar/dvar_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/dvar/dvar_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a dvar_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DvarRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/dvar_p/dvar_p_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/dvar_p/dvar_p_post_request_body.rb index f8aa0e75dc..c3cf9b3199 100644 --- a/lib/drives/item/items/item/workbook/functions/dvar_p/dvar_p_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/dvar_p/dvar_p_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,31 +22,22 @@ class DvarPPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The criteria property - @criteria - ## - # The database property - @database - ## - # The field property - @field - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new dvarPPostRequestBody and sets the default values. + ## Instantiates a new DvarPPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -63,59 +53,11 @@ def self.create_from_discriminator_value(parse_node) return DvarPPostRequestBody.new end ## - ## Gets the criteria property value. The criteria property - ## @return a json - ## - def criteria - return @criteria - end - ## - ## Sets the criteria property value. The criteria property - ## @param value Value to set for the criteria property. - ## @return a void - ## - def criteria=(value) - @criteria = value - end - ## - ## Gets the database property value. The database property - ## @return a json - ## - def database - return @database - end - ## - ## Sets the database property value. The database property - ## @param value Value to set for the database property. - ## @return a void - ## - def database=(value) - @database = value - end - ## - ## Gets the field property value. The field property - ## @return a json - ## - def field - return @field - end - ## - ## Sets the field property value. The field property - ## @param value Value to set for the field property. - ## @return a void - ## - def field=(value) - @field = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "criteria" => lambda {|n| @criteria = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "database" => lambda {|n| @database = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "field" => lambda {|n| @field = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -125,9 +67,6 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("criteria", @criteria) - writer.write_object_value("database", @database) - writer.write_object_value("field", @field) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/dvar_p/dvar_p_request_builder.rb b/lib/drives/item/items/item/workbook/functions/dvar_p/dvar_p_request_builder.rb index b334b428c6..4f0f967ff8 100644 --- a/lib/drives/item/items/item/workbook/functions/dvar_p/dvar_p_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/dvar_p/dvar_p_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a dvar_p_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return DvarPRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/ecma_ceiling/ecma_ceiling_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/ecma_ceiling/ecma_ceiling_post_request_body.rb index de9d2b9b4e..e115928ecb 100644 --- a/lib/drives/item/items/item/workbook/functions/ecma_ceiling/ecma_ceiling_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/ecma_ceiling/ecma_ceiling_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,21 +22,15 @@ class EcmaCeilingPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - # The significance property - @significance - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -65,51 +58,17 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "significance" => lambda {|n| @significance = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) - writer.write_object_value("significance", @significance) writer.write_additional_data(@additional_data) end - ## - ## Gets the significance property value. The significance property - ## @return a json - ## - def significance - return @significance - end - ## - ## Sets the significance property value. The significance property - ## @param value Value to set for the significance property. - ## @return a void - ## - def significance=(value) - @significance = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/ecma_ceiling/ecma_ceiling_request_builder.rb b/lib/drives/item/items/item/workbook/functions/ecma_ceiling/ecma_ceiling_request_builder.rb index d1d793050f..5f3bb0941b 100644 --- a/lib/drives/item/items/item/workbook/functions/ecma_ceiling/ecma_ceiling_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/ecma_ceiling/ecma_ceiling_request_builder.rb @@ -23,7 +23,7 @@ module Ecma_Ceiling class EcmaCeilingRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## - ## Instantiates a new Ecma_CeilingRequestBuilder and sets the default values. + ## Instantiates a new EcmaCeilingRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request ## @param request_adapter The request adapter to use to execute the requests. ## @return a void @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a ecma_ceiling_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return EcmaCeilingRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/edate/edate_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/edate/edate_post_request_body.rb index ca8655f4fd..b3b1cb43cf 100644 --- a/lib/drives/item/items/item/workbook/functions/edate/edate_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/edate/edate_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class EdatePostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The months property - @months - ## - # The startDate property - @start_date - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new edatePostRequestBody and sets the default values. + ## Instantiates a new EdatePostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -65,51 +58,17 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "months" => lambda {|n| @months = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "startDate" => lambda {|n| @start_date = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the months property value. The months property - ## @return a json - ## - def months - return @months - end - ## - ## Sets the months property value. The months property - ## @param value Value to set for the months property. - ## @return a void - ## - def months=(value) - @months = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("months", @months) - writer.write_object_value("startDate", @start_date) writer.write_additional_data(@additional_data) end - ## - ## Gets the startDate property value. The startDate property - ## @return a json - ## - def start_date - return @start_date - end - ## - ## Sets the startDate property value. The startDate property - ## @param value Value to set for the startDate property. - ## @return a void - ## - def start_date=(value) - @start_date = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/edate/edate_request_builder.rb b/lib/drives/item/items/item/workbook/functions/edate/edate_request_builder.rb index 4990e75391..dd6a53bf9e 100644 --- a/lib/drives/item/items/item/workbook/functions/edate/edate_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/edate/edate_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a edate_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return EdateRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/effect/effect_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/effect/effect_post_request_body.rb index e2a00ad070..3c4df837c7 100644 --- a/lib/drives/item/items/item/workbook/functions/effect/effect_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/effect/effect_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class EffectPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The nominalRate property - @nominal_rate - ## - # The npery property - @npery - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new effectPostRequestBody and sets the default values. + ## Instantiates a new EffectPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -65,49 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "nominalRate" => lambda {|n| @nominal_rate = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "npery" => lambda {|n| @npery = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the nominalRate property value. The nominalRate property - ## @return a json - ## - def nominal_rate - return @nominal_rate - end - ## - ## Sets the nominalRate property value. The nominalRate property - ## @param value Value to set for the nominalRate property. - ## @return a void - ## - def nominal_rate=(value) - @nominal_rate = value - end - ## - ## Gets the npery property value. The npery property - ## @return a json - ## - def npery - return @npery - end - ## - ## Sets the npery property value. The npery property - ## @param value Value to set for the npery property. - ## @return a void - ## - def npery=(value) - @npery = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("nominalRate", @nominal_rate) - writer.write_object_value("npery", @npery) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/effect/effect_request_builder.rb b/lib/drives/item/items/item/workbook/functions/effect/effect_request_builder.rb index 1eb30fe5c1..74f5183efc 100644 --- a/lib/drives/item/items/item/workbook/functions/effect/effect_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/effect/effect_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a effect_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return EffectRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/eo_month/eo_month_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/eo_month/eo_month_post_request_body.rb index 4973556e31..f4897040cb 100644 --- a/lib/drives/item/items/item/workbook/functions/eo_month/eo_month_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/eo_month/eo_month_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class EoMonthPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The months property - @months - ## - # The startDate property - @start_date - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new eoMonthPostRequestBody and sets the default values. + ## Instantiates a new EoMonthPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -65,51 +58,17 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "months" => lambda {|n| @months = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "startDate" => lambda {|n| @start_date = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the months property value. The months property - ## @return a json - ## - def months - return @months - end - ## - ## Sets the months property value. The months property - ## @param value Value to set for the months property. - ## @return a void - ## - def months=(value) - @months = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("months", @months) - writer.write_object_value("startDate", @start_date) writer.write_additional_data(@additional_data) end - ## - ## Gets the startDate property value. The startDate property - ## @return a json - ## - def start_date - return @start_date - end - ## - ## Sets the startDate property value. The startDate property - ## @param value Value to set for the startDate property. - ## @return a void - ## - def start_date=(value) - @start_date = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/eo_month/eo_month_request_builder.rb b/lib/drives/item/items/item/workbook/functions/eo_month/eo_month_request_builder.rb index 4f95c7ae41..7eda170d24 100644 --- a/lib/drives/item/items/item/workbook/functions/eo_month/eo_month_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/eo_month/eo_month_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a eo_month_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return EoMonthRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/erf/erf_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/erf/erf_post_request_body.rb index 7b5e1ae34a..57291ccea1 100644 --- a/lib/drives/item/items/item/workbook/functions/erf/erf_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/erf/erf_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class ErfPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The lowerLimit property - @lower_limit - ## - # The upperLimit property - @upper_limit - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new erfPostRequestBody and sets the default values. + ## Instantiates a new ErfPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -65,51 +58,17 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "lowerLimit" => lambda {|n| @lower_limit = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "upperLimit" => lambda {|n| @upper_limit = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the lowerLimit property value. The lowerLimit property - ## @return a json - ## - def lower_limit - return @lower_limit - end - ## - ## Sets the lowerLimit property value. The lowerLimit property - ## @param value Value to set for the lowerLimit property. - ## @return a void - ## - def lower_limit=(value) - @lower_limit = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("lowerLimit", @lower_limit) - writer.write_object_value("upperLimit", @upper_limit) writer.write_additional_data(@additional_data) end - ## - ## Gets the upperLimit property value. The upperLimit property - ## @return a json - ## - def upper_limit - return @upper_limit - end - ## - ## Sets the upperLimit property value. The upperLimit property - ## @param value Value to set for the upperLimit property. - ## @return a void - ## - def upper_limit=(value) - @upper_limit = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/erf/erf_request_builder.rb b/lib/drives/item/items/item/workbook/functions/erf/erf_request_builder.rb index 30e71cd2dd..a23f496647 100644 --- a/lib/drives/item/items/item/workbook/functions/erf/erf_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/erf/erf_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a erf_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ErfRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/erf_c/erf_c_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/erf_c/erf_c_post_request_body.rb index fa5b3ef2f4..4f6091ba29 100644 --- a/lib/drives/item/items/item/workbook/functions/erf_c/erf_c_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/erf_c/erf_c_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class ErfCPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The x property - @x - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new erfCPostRequestBody and sets the default values. + ## Instantiates a new ErfCPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,7 +58,6 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "x" => lambda {|n| @x = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -72,24 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("x", @x) writer.write_additional_data(@additional_data) end - ## - ## Gets the x property value. The x property - ## @return a json - ## - def x - return @x - end - ## - ## Sets the x property value. The x property - ## @param value Value to set for the x property. - ## @return a void - ## - def x=(value) - @x = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/erf_c/erf_c_request_builder.rb b/lib/drives/item/items/item/workbook/functions/erf_c/erf_c_request_builder.rb index 4dd623a5fa..9e85af99c8 100644 --- a/lib/drives/item/items/item/workbook/functions/erf_c/erf_c_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/erf_c/erf_c_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a erf_c_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ErfCRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/erf_c_precise/erf_c_precise_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/erf_c_precise/erf_c_precise_post_request_body.rb index 1170315aea..5dc3ee393f 100644 --- a/lib/drives/item/items/item/workbook/functions/erf_c_precise/erf_c_precise_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/erf_c_precise/erf_c_precise_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,18 +22,15 @@ class ErfCPrecisePostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The X property - @x - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -62,7 +58,6 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "X" => lambda {|n| @x = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -72,24 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("X", @x) writer.write_additional_data(@additional_data) end - ## - ## Gets the X property value. The X property - ## @return a json - ## - def x - return @x - end - ## - ## Sets the X property value. The X property - ## @param value Value to set for the X property. - ## @return a void - ## - def x=(value) - @x = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/erf_c_precise/erf_c_precise_request_builder.rb b/lib/drives/item/items/item/workbook/functions/erf_c_precise/erf_c_precise_request_builder.rb index 9c56755feb..708fc569ed 100644 --- a/lib/drives/item/items/item/workbook/functions/erf_c_precise/erf_c_precise_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/erf_c_precise/erf_c_precise_request_builder.rb @@ -23,7 +23,7 @@ module ErfC_Precise class ErfCPreciseRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## - ## Instantiates a new ErfC_PreciseRequestBuilder and sets the default values. + ## Instantiates a new ErfCPreciseRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request ## @param request_adapter The request adapter to use to execute the requests. ## @return a void @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a erf_c_precise_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ErfCPreciseRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/erf_precise/erf_precise_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/erf_precise/erf_precise_post_request_body.rb index 5fd32824ed..05b8a7ddd8 100644 --- a/lib/drives/item/items/item/workbook/functions/erf_precise/erf_precise_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/erf_precise/erf_precise_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,18 +22,15 @@ class ErfPrecisePostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The X property - @x - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -62,7 +58,6 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "X" => lambda {|n| @x = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -72,24 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("X", @x) writer.write_additional_data(@additional_data) end - ## - ## Gets the X property value. The X property - ## @return a json - ## - def x - return @x - end - ## - ## Sets the X property value. The X property - ## @param value Value to set for the X property. - ## @return a void - ## - def x=(value) - @x = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/erf_precise/erf_precise_request_builder.rb b/lib/drives/item/items/item/workbook/functions/erf_precise/erf_precise_request_builder.rb index c8be4dc7bf..726105c666 100644 --- a/lib/drives/item/items/item/workbook/functions/erf_precise/erf_precise_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/erf_precise/erf_precise_request_builder.rb @@ -23,7 +23,7 @@ module Erf_Precise class ErfPreciseRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## - ## Instantiates a new Erf_PreciseRequestBuilder and sets the default values. + ## Instantiates a new ErfPreciseRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request ## @param request_adapter The request adapter to use to execute the requests. ## @return a void @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a erf_precise_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ErfPreciseRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/error_type/error_type_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/error_type/error_type_post_request_body.rb index 8a109a8fc5..0a9755825a 100644 --- a/lib/drives/item/items/item/workbook/functions/error_type/error_type_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/error_type/error_type_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,18 +22,15 @@ class ErrorTypePostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The errorVal property - @error_val - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @@ -57,27 +53,11 @@ def self.create_from_discriminator_value(parse_node) return ErrorTypePostRequestBody.new end ## - ## Gets the errorVal property value. The errorVal property - ## @return a json - ## - def error_val - return @error_val - end - ## - ## Sets the errorVal property value. The errorVal property - ## @param value Value to set for the errorVal property. - ## @return a void - ## - def error_val=(value) - @error_val = value - end - ## ## The deserialization information for the current model ## @return a i_dictionary ## def get_field_deserializers() return { - "errorVal" => lambda {|n| @error_val = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -87,7 +67,6 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("errorVal", @error_val) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/error_type/error_type_request_builder.rb b/lib/drives/item/items/item/workbook/functions/error_type/error_type_request_builder.rb index 6d01d4e8dd..66c05b44b9 100644 --- a/lib/drives/item/items/item/workbook/functions/error_type/error_type_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/error_type/error_type_request_builder.rb @@ -23,7 +23,7 @@ module Error_Type class ErrorTypeRequestBuilder < MicrosoftKiotaAbstractions::BaseRequestBuilder ## - ## Instantiates a new Error_TypeRequestBuilder and sets the default values. + ## Instantiates a new ErrorTypeRequestBuilder and sets the default values. ## @param path_parameters Path parameters for the request ## @param request_adapter The request adapter to use to execute the requests. ## @return a void @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a error_type_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ErrorTypeRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/even/even_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/even/even_post_request_body.rb index bcec9b00b3..f48ce55f77 100644 --- a/lib/drives/item/items/item/workbook/functions/even/even_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/even/even_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class EvenPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new evenPostRequestBody and sets the default values. + ## Instantiates a new EvenPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,32 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/even/even_request_builder.rb b/lib/drives/item/items/item/workbook/functions/even/even_request_builder.rb index b8e6a1dd62..f6d8769c8e 100644 --- a/lib/drives/item/items/item/workbook/functions/even/even_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/even/even_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a even_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return EvenRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/exact/exact_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/exact/exact_post_request_body.rb index d84a73ad16..95b65ef554 100644 --- a/lib/drives/item/items/item/workbook/functions/exact/exact_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/exact/exact_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,28 +22,22 @@ class ExactPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The text1 property - @text1 - ## - # The text2 property - @text2 - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new exactPostRequestBody and sets the default values. + ## Instantiates a new ExactPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -65,8 +58,6 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "text1" => lambda {|n| @text1 = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, - "text2" => lambda {|n| @text2 = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## @@ -76,40 +67,8 @@ def get_field_deserializers() ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("text1", @text1) - writer.write_object_value("text2", @text2) writer.write_additional_data(@additional_data) end - ## - ## Gets the text1 property value. The text1 property - ## @return a json - ## - def text1 - return @text1 - end - ## - ## Sets the text1 property value. The text1 property - ## @param value Value to set for the text1 property. - ## @return a void - ## - def text1=(value) - @text1 = value - end - ## - ## Gets the text2 property value. The text2 property - ## @return a json - ## - def text2 - return @text2 - end - ## - ## Sets the text2 property value. The text2 property - ## @param value Value to set for the text2 property. - ## @return a void - ## - def text2=(value) - @text2 = value - end end end end diff --git a/lib/drives/item/items/item/workbook/functions/exact/exact_request_builder.rb b/lib/drives/item/items/item/workbook/functions/exact/exact_request_builder.rb index 1564464e1e..2b58aa5034 100644 --- a/lib/drives/item/items/item/workbook/functions/exact/exact_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/exact/exact_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + request_info.headers.try_add('Accept', 'application/json') return request_info end + ## + ## Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + ## @param raw_url The raw URL to use for the request builder. + ## @return a exact_request_builder + ## + def with_url(raw_url) + raise StandardError, 'raw_url cannot be null' if raw_url.nil? + return ExactRequestBuilder.new(raw_url, @request_adapter) + end end end end diff --git a/lib/drives/item/items/item/workbook/functions/exp/exp_post_request_body.rb b/lib/drives/item/items/item/workbook/functions/exp/exp_post_request_body.rb index 9161ba8986..f7bea8bc84 100644 --- a/lib/drives/item/items/item/workbook/functions/exp/exp_post_request_body.rb +++ b/lib/drives/item/items/item/workbook/functions/exp/exp_post_request_body.rb @@ -1,6 +1,5 @@ require 'microsoft_kiota_abstractions' require_relative '../../../../../../../microsoft_graph' -require_relative '../../../../../../../models/json' require_relative '../../../../../../drives' require_relative '../../../../../item' require_relative '../../../../items' @@ -23,25 +22,22 @@ class ExpPostRequestBody # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @additional_data ## - # The number property - @number - ## - ## Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. ## @return a i_dictionary ## def additional_data return @additional_data end ## - ## Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - ## @param value Value to set for the additionalData property. + ## Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + ## @param value Value to set for the AdditionalData property. ## @return a void ## def additional_data=(value) @additional_data = value end ## - ## Instantiates a new expPostRequestBody and sets the default values. + ## Instantiates a new ExpPostRequestBody and sets the default values. ## @return a void ## def initialize() @@ -62,32 +58,15 @@ def self.create_from_discriminator_value(parse_node) ## def get_field_deserializers() return { - "number" => lambda {|n| @number = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) }, } end ## - ## Gets the number property value. The number property - ## @return a json - ## - def number - return @number - end - ## - ## Sets the number property value. The number property - ## @param value Value to set for the number property. - ## @return a void - ## - def number=(value) - @number = value - end - ## ## Serializes information the current object ## @param writer Serialization writer to use to serialize this model ## @return a void ## def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? - writer.write_object_value("number", @number) writer.write_additional_data(@additional_data) end end diff --git a/lib/drives/item/items/item/workbook/functions/exp/exp_request_builder.rb b/lib/drives/item/items/item/workbook/functions/exp/exp_request_builder.rb index 137770b98a..3af666cd60 100644 --- a/lib/drives/item/items/item/workbook/functions/exp/exp_request_builder.rb +++ b/lib/drives/item/items/item/workbook/functions/exp/exp_request_builder.rb @@ -43,8 +43,7 @@ def post(body, request_configuration=nil) body, request_configuration ) error_mapping = Hash.new - error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } - error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } + error_mapping["XXX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::WorkbookFunctionResult.create_from_discriminator_value(pn) }, error_mapping) end ## @@ -56,17 +55,26 @@ def post(body, request_configuration=nil) def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() - request_info.url_template = @url_template - request_info.path_parameters = @path_parameters - request_info.http_method = :POST - request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.add_request_options(request_configuration.options) end - request_info.set_content_from_parsable(@request_adapter, "application/json", body) + request_info.set_content_from_parsable(@request_adapter, 'application/json', body) + request_info.url_template = @url_template + request_info.path_parameters = @path_parameters + request_info.http_method = :POST + {"code":"deadline_exceeded","msg":"operation timed out"}